Where can I learn Batch?

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
StickIGuess
Posts: 2
Joined: 22 Dec 2020 19:28

Where can I learn Batch?

#1 Post by StickIGuess » 23 Dec 2020 18:46

Hi, I'm new to this forum and also the Batch language. I saw some games written in batch that were kinda cool, and I wanted to try to make my own. But I needed to know Batch. Where are some good learning resources for batch? Thanks

T3RRY
Posts: 117
Joined: 06 May 2020 10:14

Re: Where can I learn Batch?

#2 Post by T3RRY » 24 Dec 2020 09:27

StickIGuess wrote:
23 Dec 2020 18:46
Hi, I'm new to this forum and also the Batch language. I saw some games written in batch that were kinda cool, and I wanted to try to make my own. But I needed to know Batch. Where are some good learning resources for batch? Thanks
Hi, Welcome to dostips.

Some resources for getting started:

https://www.robvanderwoude.com/batchstart.php

and his site at large

A good reference source for batch commands and usage examples:

https://ss64.com/nt/

Other tips:
** Explore this site or Stackoverflow.com, making use of the search facilities of either site to seek out methods for completing certain tasks -
IE:
- how to make a menu
- hot to save / load
- how to play music

** Examine, use and / or modify examples of games found on this site to see how the script works.

My games archive [ FOR WINDOWS 10 ] can be downloaded from here:
https://drive.google.com/file/d/1cAQLd- ... sp=sharing
- The download also includes Antonio's getkey.exe which most of the included games use for player input, as well as Dave Benham's sleep.bat used to control 'ticks' in games.
- Archive contains Def_Macros.bat which defines a series of macros for a sprite system that makes scripting Arcade style games easy; and SpriteDemo.bat that examples the use of the Macro's in a simple game.

======================================================================================

Most importantly though, I'd recommend before starting to code any Game that you take the time to understand some of the concepts you'll need:

For AI behaviours, here as an article that covers some of the most important concepts - No actual code is exampled here - the discussion relates to what steps need to be considered for a given task.

https://www.gamedev.net/tutorials/progr ... -ai-r4942/

When your ready to start writing a script, You'll make things much easier on yourself by describing first what your script aims to achieve on a step by step basis.
An example of this applied to the snake game in my batch archive:

Code: Select all

::: Game Requirements
::: Directional control left right up down
::: Additional controls - Pause ; Exit
::: Momentum for the last selected direction
::: Block Selection of direction that opposes the current direction to prevent player turning back on their tail
::: Collision detection { fatal } for Border and Tail characters
::: Collision detection { non-fatal } for food that apppends the food Y;X location to tail
::: Function to Generate food at game start / when eaten that tests that the new food Y;X location does not correspond to occupied Cell
:::  and does reside within the playfield
::: Shift the location of 1st tail cell to heads last location, and each other tail cell to previous tail cells position after every move
::: Controllable / Variable delay timing for changing difficulty level
::: Game Aesthetics Options - Selectable Themes for Border character, and snake head / tail characters; colors
::: tracking and Save / load of previous highscore
From here, you can then list the specific tools / recources / coding techniques you will apply toward achieving those steps and goals.

StickIGuess
Posts: 2
Joined: 22 Dec 2020 19:28

Re: Where can I learn Batch?

#3 Post by StickIGuess » 24 Dec 2020 20:13

Thank you so much for the good resources and advice, T33ry!

T3RRY
Posts: 117
Joined: 06 May 2020 10:14

Re: Where can I learn Batch?

#4 Post by T3RRY » 28 Dec 2020 08:48

StickIGuess wrote:
24 Dec 2020 20:13
Thank you so much for the good resources and advice, T33ry!
No worries, if your interested in arcade style games, Check out my game_engine.bat.
The Archive mentioned above has a couple of demo games in there that exxample how to use it; and I'm more than happy to explain the how-to if asked
One of which can be seen here: https://youtu.be/Wi3izdqbwcw

edcolley
Posts: 1
Joined: 27 Dec 2020 20:23
Contact:

Re: Where can I learn Batch?

#5 Post by edcolley » 28 Dec 2020 19:39

You can find beginner tutorial on tutorialspoint or coursera.

Post Reply