You are not logged in.

#1 15 Mar 2014 22:43

ImATootsieRollPOP
New Member
Registered: 15 Mar 2014
Posts: 4

Can somebody help me with colors?

Hi, I'm Andrew/ImATootsieRollPOP and I am a batch game developer. I can use Graphic.exe, Kbd.exe, CmdMenuSel.exe, and some colous and bg.exe

In the game SokoBox, the maps have colors, same for Viewpoint in batch. I have tried to read the code of these games to figure out how they added the
map color. I can make the color with colous, but I would rather use bg.exe. So, can someone please give me an explination of how this works and the coliders for them. Thanks, Andrew.

Offline

#2 17 Mar 2014 08:29

Honguito98
Member
From: Mexico
Registered: 19 Sep 2013
Posts: 57

Re: Can somebody help me with colors?

Well, my game 'Viewpoint' in batch uses a engine that I developed, called Seta:GPU (This is a hybrid version). I used ANSI Escapes Sequences for get more speed on get colours. If you want use only few colours for enemies (without coloured scenario), you can modify some things:

Note: is recommended use arrays for graphics on screen instead "each pixel as variable"

Rem      ________________ Row
Rem    /
Rem   v  0123456789... <-- Column
Set F[1]=.................
Set F[2]=.................
Set F[3]=.................
Set F[4]=.................
Set F[5]=X............O...

First, it's necessary set the background used by sprite as well as the player, enemies, etc.

Rem Number count for Cols. it's fixed to 'one' instead zero based index
Rem Set Old[Y.X]=%ground%
Set Old[5.1]=%ground%
Set Old[5.14]=%ground%

etc.

Now, the point is adding a unique variable for modify only the graphics, not game program.
Note 2: always use the DelayedExpansion for advanced programing

Set LF=^


:: Two blank lines above is required!
:: LF contains a LineFeed for get a second line in a only 'echo' command
Set Display=
For /L %%# in (1,1,5) Do Set "Display=!Display!!F[%%#]!!LF!"
Set Display=!Display:X=$[1;32mX$[m!
Set Display=!Display:O=$[1;31mO$[m!
Echo(!Display!

Where '$' are the ESC char. number 27. ( Alt + 27 in cmd.exe )
Note 3: I used Ansicon for 'emulate' theses ansi escapes sequences.
Note 4: You can get it extracting for my game abovenamed in Core\bin\:
  ansi.dll and ansi32.dll

The other metod is more complex, and I don't have terminated my game engine that supports 'each pixel with different colour'
An very 'simple' game that I developed is 'Batch Adventures'
All my game demos is on my youtube channel:

youtube.com/user/honguito98

Sorry for my bad english hmm


.::{Honguito98}::.

Offline

#3 28 Mar 2014 08:55

ImATootsieRollPOP
New Member
Registered: 15 Mar 2014
Posts: 4

Re: Can somebody help me with colors?

.

Offline

Board footer

Powered by