bg.exe sprites help?

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
JWinslow23
Posts: 58
Joined: 17 Jun 2014 10:38

bg.exe sprites help?

#1 Post by JWinslow23 » 17 Jun 2014 10:43

Hello! I'm new here on the forums, and I have a big aspiration to port 2048 to the command line using Batch. Problem is, I want to make it graphical, using the Sprite function in bg.exe, and I need a bit of help understanding the syntax for it. And should I use sprites at all, or should I just use colored text? I would appreciate any help I got on this. Thanks!

AiroNG
Posts: 46
Joined: 17 Nov 2013 15:00
Location: Germany

Re: bg.exe sprites help?

#2 Post by AiroNG » 17 Jun 2014 17:09

You can find the post from carlos where he points out how to use bg.exe here.

Hope it helps.

JWinslow23
Posts: 58
Joined: 17 Jun 2014 10:38

Re: bg.exe sprites help?

#3 Post by JWinslow23 » 17 Jun 2014 17:18

I saw that, but for some reason, the only characters it seems to accept as pixels are /0, /20, and /DB. I understand everything else, but shouldn't there be other characters available for use? There seem to have been in the example game, SokoBox. :?

AiroNG
Posts: 46
Joined: 17 Nov 2013 15:00
Location: Germany

Re: bg.exe sprites help?

#4 Post by AiroNG » 18 Jun 2014 04:05

Maybe this will help:
try this code and you can see that a few characters wont work.

Code: Select all

@echo off & cls & setlocal enabledelayedexpansion & Color 07
bg.exe sprite 5 2 a \0\1\2\3\4\5\6\7\8\9\n
bg.exe sprite 6 2 a  \11\12\13\14\15\16\17\18\19\20\21\22\23\24\25\26\27\28\29\30\31\32\33\34\35\36\37\38\39\40\41\42\43\44\45\46\47\48\49\50\51\52\53\54\55\56\57\58\59\60\n
bg.exe sprite 7 2 a \61\62\63\64\65\66\67\68\69\70\71\72\73\74\75\76\77\78\79\80\81\82\83\84\85\86\87\88\89\90\91\92\93\94\95\96\97\98\99\100\101\102\103\104\105\106\107\108\109\110\111\112\113\114\115\116\117\118\119\120\n
bg.exe sprite 8 2 a \121\122\123\124\125\126\127\128\129\130\131\132\133\134\135\136\137\138\139\130\131\132\133\134\135\136\137\138\139\140\141\142\143\144\145\146\147\148\149\150\151\152\153\154\155\156\157\158\159\160\161\162\163\164\165\166\167\168\169\170\171\172\173\174\175\176\177\178\179\180\n
bg.exe sprite 9 2 a \181\182\183\184\185\186\187\188\189\190\191\192\193\194\195\196\197\198\199\201\202\203\204\205\206\207\208\209\210\211\212\213\214\215\216\217\218\219\220\221\222\223\224\225\226\227\228\229\230\231\232\233\234\235\236\237\238\239\230\231\232\233\234\235\236\237\238\239\n
bg.exe sprite 10 2 a \240\241\242\243\244\245\246\247\248\249\250\251\252\253\254\255\256\n

pause > nul

This is what i see when i run the code above:
Image

keep in mind that some ascii-characters are used as controll characters (see http://www.ascii-code.com/) so they might not be displayed.
Also: different codepages might result in different ascii characters.

carlos
Expert
Posts: 503
Joined: 20 Aug 2010 13:57
Location: Chile
Contact:

Re: bg.exe sprites help?

#5 Post by carlos » 18 Jun 2014 06:49

The last version of bg (2.8) use hexadecimal notation in the sprite unlike decimal notation in previous version. For example, the space character is \20 instead of previous version \32

Also, I'm updating the bg, and the sprite function will be replaced. It will be other thing different. It will read the sprite from a binary file.
Coming soon I will post it, because I only develop it in the weekend in the free time.
It will fly.

The develop version is found only in source code, every change I left here:

Code: Select all

http://consolesoft.com/p/bg/

JWinslow23
Posts: 58
Joined: 17 Jun 2014 10:38

Re: bg.exe sprites help?

#6 Post by JWinslow23 » 18 Jun 2014 12:11

Oh! My problem was that my version used decimal notation, and I was using HEXADECIMAL! :lol:

But the weirdest part of that is, the hexadecimal Space Invaders alien example did work for me, too. :\

I bet I can figure it out from here. Thanks!

Post Reply