|
Post by Mairtrus on Dec 31, 2008 8:20:58 GMT -5
First, you must load the tiles into the VRAM in order to show them. You do this with the instruction LoadTiles. Eg:
LoadTiles My_Tiles,140,256 This will load 140 tiles marked in the label "My_Tiles", and will start to load them in the position 256 (end of the ASCII alphabet) in the VRAM.
So now you can display them. You can do it in two ways: Suposing that you loaded different tiles and you want to put them in a specific location on the screen, you must use the instruction DrawTile.Eg:
DrawTile 256,0,0 This will draw the first tile that you loaded, in the first position on the X-axis and the Y-axis.
If, instead, the tiles do a map, and are ordered (say first in the X-axis and then the Y-axis), you can use the DrawTilesInc, or DrawTilesInc2 in case you've checked the option "Drawing in the Y direction first, then in the X". Eg:
DrawTiles 256,0,14,10,4 This will draw a map of 10 tiles wide and 4 tiles high, completely to the left and half of the screen, and starting with the tile 256.
|
|
|
Post by Mairtrus on Dec 30, 2008 7:00:14 GMT -5
|
|
|
Post by Mairtrus on Dec 19, 2008 7:58:58 GMT -5
Here is a little modification that worked for me:
drawloop: if baddiesturn=speed then baddiesturn=0 if baddiesturn=speed then baddiesturn=0 if baddiesdir=0 then ' up (-Y Axis) dx=0:dy=-1 maxmovement=5 elseif baddiesdir=1 then ' right (+X Axis) dx=1:dy=0 maxmovement=32 elseif baddiesdir=2 then ' down (+Y Axis) maxmovement=5 dx=0:dy=1 elseif baddiesdir=3 then ' left (-X Axis) dx=-1:dy=0 maxmovement=32 endif for a=0 to 39 if baddies(a)<>0 then shiftsprite baddies(a),dx,dy endif next a=0: while a<>6 if baddylaser(a)=0 then b=rnd(39) if baddies(b)<>0 then baddylaser(a)=addsprite(1,1) movesprite baddylaser(a),spriteposx(baddies(b))+4,spriteposy(baddies(b))+16 propsprite baddylaser(a),257,0 endif endif a++: wend baddiesmove=baddiesmove+1 if baddiesmove=maxmovement then baddiesdir=baddiesdir+1%4 baddiesmove=0 endif
Pay attention to changes:
First, I added a line to movement's check, putting the number of pixels that should move at maximum.
Second, some lines below, I changed the line that check of whether they had moved 32 pixels in any direction, with a new one, according to the new variable used.
|
|
|
Post by Mairtrus on Dec 1, 2008 7:58:33 GMT -5
|
|
|
Post by Mairtrus on Nov 21, 2008 19:55:08 GMT -5
Did you added some lines to the Vertical Interrupt part? Some time ago, I experienced something similar because I was trying to do some code work off the VBlank Period.
|
|
|
Post by Mairtrus on Nov 15, 2008 10:18:04 GMT -5
You need to set a 6-button joypad in your emulator. Otherwise, it will not work.
|
|
|
Post by Mairtrus on Nov 8, 2008 18:43:08 GMT -5
This will be epic. I don't remember any spacial shotter that have a co-op mode.
|
|
|
Post by Mairtrus on Oct 23, 2008 10:08:15 GMT -5
You can set a new zero (for example 32768 or $8000) and make separated parser routines for each negative or positive value. Also, remember that the Genesis maths are "cyclical": Put a tile in the column 0 or in the column 64 are the same; or put a sprite in the position 0 or 512 are the same.
|
|
|
Post by Mairtrus on Oct 20, 2008 6:34:26 GMT -5
With these commands: SETGFXPLANE SETSCROLLPLANE SETTEXTPLANE The arguments for all them can be SCROLL_A/SCROLL_B. Just, for example, in the start set the gfx plane as the plane b(SCROLL_B), and the text in the plane a(SCROLL_A).
|
|
|
Post by Mairtrus on Oct 19, 2008 19:34:51 GMT -5
Cool Good job men!! You do not have the obligation to release the source code. Unless it is for educational purposes, of course... Now, some criticisms. You did an excellent work with Shiru's the sound driver. The music is great and very catchy. The detection of collisions would need a little more work. Is not bad done, but I feel is a bit "demanding". Also, if, in the initial menus, you put the background and the letters in differents planes, it would seen more nice. Keep up the good work, guys!!
|
|
|
Post by Mairtrus on Oct 18, 2008 19:49:42 GMT -5
Your guide need to be Sticky, ScroGer. Is the unique way that the people will learn to manage correctly the graphical features of BEX.
|
|
|
Post by Mairtrus on Oct 18, 2008 10:48:21 GMT -5
From version 1.00 (I think?? ), the argunerics do not return the values 0 and 1, they now return the values 0 and "any other value". The correct way to make this is: if joypad(0).0 then heady-- endif if joypad(0).1 then heady++ endif if joypad(0).2 then headx-- endif if joypad(0).3 then headx++ endif drawblock 356,headx,heady,4 sleep 2 drawblock 372,headx,heady,4 In this way, by not including a comparision into the "if" is compared to "non-zero." This: if joypad(0).0 then and this: if joypad(0).0 <> 0 then are exactly the same.
|
|
|
Post by Mairtrus on Sept 25, 2008 12:00:16 GMT -5
Yeah, this is good, but impossible to do due the M68000 ASM.
Wait a minute... I'm talking shit. This IS possible in ASM, as far I remember. At least, you can asign the content of DC.X statement to the content of another DC.X, right?
Devster, why some of those ASM tricks can't be did in BEX?
|
|
|
Post by Mairtrus on Sept 21, 2008 16:37:11 GMT -5
There is only one solution for the first 3 errors: Windows XP. For the fourth, which is exactly what we're trying to do? Once declared a constant, is ready to be used as a value, no need to put it into a DATA segment. For example: const #MyConst=123 print #MyConst ' will print "123" It is understood?
|
|
|
Post by Mairtrus on Sept 19, 2008 19:26:42 GMT -5
Are you sure you have the checked the option "After compilation, run the ROM/ISO in the emulator"? It's in Tools->Options->Compiler Options. It should work. I don't use this option but, I tested it with Gens K-Mod ans Kega, and with both works.
|
|