Post by ScroGer on Apr 1, 2006 1:39:42 GMT -5
Updated 8\21\08
This tutorial will cover these things
(1) Setup of BasiEgaXorx
(2) Making & displaying of sprites using sgtd get newest version here devster.retrodev.com/sega/sgtd/sgtd046.zip
(3) Talking control over your sprites
Here it goes
(1) open BasiEgaXorz and click on tools and options or just press F7 click Path Options then click Emulator Path and find your SEGA Emulator path.
(2) Making & displaying of sprites using sgtd
Sgtd is a great tool that you make your sprites with if you don't know what a sprite is I tell you ;D it's the character that to play with in the game like Sonic,Mario,Metrod and so on I hope you understand ;D................
All right now let's get to the fun stuff first open sgtd and take a look around play with a few thing most of this is pretty easy and obvious but there are a few tricky things that I well explain in a bit but lets do some easy things start by clicking Grid Toggel this function makes it easyier to see what your drawing then read over this devster.monkeeh.com/sega/sgtd/ it well tell you more about stgd's features
Now lets set the tile height and width by clicking height and selecting 8 pixles do the same thing to width that will give you a small and easy 8*8[1 tile] drawing pad to work with now go ahead and start making your sprite I suggest making a ship
But you can make any thing you want but a ship will make more sense when we are done
So you made your self a cool little sprite now what, well go ahead and click Export Tile Data then click Generate Data and click Copy Text Data To Clipboard and you are ready to add your sprite to your code so open BasiEgaXorz and paste that code to BasiEgaXorz it sould look like this
DATALONG $00044000 ' Tile: 0
DATALONG $00066000
DATALONG $00077000
DATALONG $70077007
DATALONG $70788707
DATALONG $70788707
DATALONG $70788707
DATALONG $77788777
Now its time to write some commands so that you can see the sprite on screen when you run it in Gens try this
Make sure that every thing other then sprites:,and pallette1: has a space before them now click compile code then find the Bin file and run it using Gens after that you should see the sprite ship if not ask for help [note: u only need to find and click the Bin file once after that u can just go to rom history in Gens and run it there] or just set run complied code in emu in the options ..........
Now I well explain a few things regarding the sprite these are the commands that display the sprite
\pallettes pallette1,0,0,16 [read the BEX manual if u dont understand something then ask for help]
\loadtiles sprites,1,256 [read the BEX manual if u dont understand something then ask for help]
\ship=addsprite(1,1) \ read the BEX manual
\propsprite ship,256,0 \ read the BEX manual
\movesprite ship,x,y \ read the BEX manual
[Note: I do not explain some things that have already been said in the BEX manual
\pallette1: DATAINT $0000,$0000,$0000,$000C,$0EE0,$0000,$0E00,$0888
DATAINT $0CCC,$0000,$0000,$0000,$0000,$0000,$0000,$0000
This helps our first command [pallettes pallette1,0,0,14] To find our color code......the color code for each color can be found in sgdt under Manage Pallettes look above the colors in Manage Pallettes u will see 0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F thats were u enter the color code now look at this example
I hope that makes sence read more about this subject here devster.proboards22.com/index.cgi?board=basiegaxorz&action=display&thread=1081949286
(3) Talking control over your sprites
Now that we have every thing set up now we can enter the joypad: commands to get that ship moving using keyboard try this
I like to say that there are many other ways to control your sprite this is just one way to do it......
If you have any questions feel free to ask............
One more thing thank you Devster for making BasiEgaXorz this shit is dope
This tutorial will cover these things
(1) Setup of BasiEgaXorx
(2) Making & displaying of sprites using sgtd get newest version here devster.retrodev.com/sega/sgtd/sgtd046.zip
(3) Talking control over your sprites
Here it goes
(1) open BasiEgaXorz and click on tools and options or just press F7 click Path Options then click Emulator Path and find your SEGA Emulator path.
(2) Making & displaying of sprites using sgtd
Sgtd is a great tool that you make your sprites with if you don't know what a sprite is I tell you ;D it's the character that to play with in the game like Sonic,Mario,Metrod and so on I hope you understand ;D................
All right now let's get to the fun stuff first open sgtd and take a look around play with a few thing most of this is pretty easy and obvious but there are a few tricky things that I well explain in a bit but lets do some easy things start by clicking Grid Toggel this function makes it easyier to see what your drawing then read over this devster.monkeeh.com/sega/sgtd/ it well tell you more about stgd's features
Now lets set the tile height and width by clicking height and selecting 8 pixles do the same thing to width that will give you a small and easy 8*8[1 tile] drawing pad to work with now go ahead and start making your sprite I suggest making a ship
But you can make any thing you want but a ship will make more sense when we are done
So you made your self a cool little sprite now what, well go ahead and click Export Tile Data then click Generate Data and click Copy Text Data To Clipboard and you are ready to add your sprite to your code so open BasiEgaXorz and paste that code to BasiEgaXorz it sould look like this
DATALONG $00044000 ' Tile: 0
DATALONG $00066000
DATALONG $00077000
DATALONG $70077007
DATALONG $70788707
DATALONG $70788707
DATALONG $70788707
DATALONG $77788777
Now its time to write some commands so that you can see the sprite on screen when you run it in Gens try this
pallettes pallette1,0,0,16
loadtiles sprites,1,256
ship=addsprite(1,1)
propsprite ship,256,0
x=286
y=340
movesprite ship,x,y
sprites:
DATALONG $00044000 ' Tile: 0
DATALONG $00066000
DATALONG $00077000
DATALONG $70077007
DATALONG $70788707
DATALONG $70788707
DATALONG $70788707
DATALONG $77788777
pallette1: DATAINT $0000,$0000,$0000,$000C,$0EE0,$0000,$0E00,$0888
DATAINT $0CCC,$0000,$0000,$0000,$0000,$0000,$0000,$0000
Make sure that every thing other then sprites:,and pallette1: has a space before them now click compile code then find the Bin file and run it using Gens after that you should see the sprite ship if not ask for help [note: u only need to find and click the Bin file once after that u can just go to rom history in Gens and run it there] or just set run complied code in emu in the options ..........
Now I well explain a few things regarding the sprite these are the commands that display the sprite
\pallettes pallette1,0,0,16 [read the BEX manual if u dont understand something then ask for help]
\loadtiles sprites,1,256 [read the BEX manual if u dont understand something then ask for help]
\ship=addsprite(1,1) \ read the BEX manual
\propsprite ship,256,0 \ read the BEX manual
\movesprite ship,x,y \ read the BEX manual
[Note: I do not explain some things that have already been said in the BEX manual
\pallette1: DATAINT $0000,$0000,$0000,$000C,$0EE0,$0000,$0E00,$0888
DATAINT $0CCC,$0000,$0000,$0000,$0000,$0000,$0000,$0000
This helps our first command [pallettes pallette1,0,0,14] To find our color code......the color code for each color can be found in sgdt under Manage Pallettes look above the colors in Manage Pallettes u will see 0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F thats were u enter the color code now look at this example
[0] [1] [2] [3] [4] [5] [6] [7]
$0000,$0000,$0000,$000C,$0EE0,$0000,$0E00,$0888
[8] [9] [A] [B] [C] [D] [E] [F]
$0CCC,$0000,$0000,$0000,$0000,$0000,$0000,$0000
I hope that makes sence read more about this subject here devster.proboards22.com/index.cgi?board=basiegaxorz&action=display&thread=1081949286
(3) Talking control over your sprites
Now that we have every thing set up now we can enter the joypad: commands to get that ship moving using keyboard try this
pallettes pallette1,0,0,16
loadtiles sprites,1,256
ship=addsprite(1,1)
propsprite ship,256,0
x=286
y=340
joypad: 'main loop
do
movesprite ship,x,y
sleep 1
j=joypad()
if j.2 then x--
if j.3 then x++
if j.0 then y--
if j.1 then y++
loop
sprites:
DATALONG $00044000 ' Tile: 0
DATALONG $00066000
DATALONG $00077000
DATALONG $70077007
DATALONG $70788707
DATALONG $70788707
DATALONG $70788707
DATALONG $77788777
pallette1: DATAINT $0000,$0000,$0AAA,$000C,$0EE0,$0000,$0E00,$0888
DATAINT $0CCC,$0000,$0000,$0000,$0000,$0000,$0A00,$0000
I like to say that there are many other ways to control your sprite this is just one way to do it......
If you have any questions feel free to ask............
One more thing thank you Devster for making BasiEgaXorz this shit is dope