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.