|
Post by Mairtrus on Jan 5, 2009 12:03:47 GMT -5
Well, after taking a little break, I resumed the BEX developing, and I returned with a pleasant surprise for all (I think): an engine scroll completely written in BEX. Currently works with 64X64 blocks of pixels (8X8 tiles), because I followed the Devster's idea, but, actually, works pretty slow. I am working to create a more fluid movement. It works drawing each tile separately, reading it directly from a list. By using the command DrawTile instead of DrawTiles or DrawTilesInc, you can make, within the same block, that the tiles has different palettes, priorities or reflections. I know what everyone is thinking while reading this message, and the answer is YES: it will be open source for anyone who intends to use it.Just let me improve it a bit to make it as accurate as possible, although I may take a while ... For now I leave with a small demo that shows part of the level 1-1 of Super Mario Bros for NES. You can scroll it with the D-Pad. Just 3 observations... 1) Only shows a small part of the level because I am too lazy to finish it just to release a demo. 2) When the ground moves vertically, may appear to the same drawing, but no. It is just a test to demonstrate both the ability to scroll horizontally and vertically. 3) The numbers listed top right are just of verification, and are nothing more than the number of horizontal interruptions that were executed during the drawing of the tiles. You have been warned. Now, enjoy it. EDIT: Last minute adition. I found the way to speed it a lot more. Some values was being calculated a lot of times, and they should have the same value during all the drawing process, so I stored them on some variables, BEFORE get used. This is the new version.
|
|
|
Post by ScroGer on Jan 6, 2009 1:43:34 GMT -5
yes i to haven't coded in a while but recently I have been wanting to finish up Skate...... I did see devsters scroll engine but I did not play with it yet to see what I could do.. But this new scroll engine based off of devsters seems to run much smother and has got me excited and hopeful for my new Skate game and many games to come ;D ;D ;D ;D ;D Hopefully u can get it to run even smother and have some collision detection added...... Thank u devster and Mairtrus for this great engine
|
|
|
Post by Mairtrus on Jan 6, 2009 7:26:15 GMT -5
Mmm, I haven't thought yet to collisions detection, but I created a small system some time ago. I think I could adapt it. But my main purpose is to release an scrolling engine that can be used both as in your Skate game, as in the Snyphas's AirStrike, as in the Tulio Adriano's Pier Solar (oh, the ego ;D). So, the collisions isn't important for me at this moment. I mean, the system that you will use depends exclusivelly of the game that you pretend to make.
|
|
|
Post by ScroGer on Jan 6, 2009 8:43:59 GMT -5
I mean, the system that you will use depends exclusivelly of the game that you pretend to make. Thats true
|
|
|
Post by Syniphas on Jan 6, 2009 15:38:00 GMT -5
as in the Snyphas's AirStrike it's Syniphas and it's Airstriker, although noone seemed to notice there's no air in space
|
|
|
Post by ScroGer on Jan 6, 2009 23:45:50 GMT -5
lolololoolol i know i didnt ;D
|
|
oompa loompa
I AM THE GOVERNATOR
"Git 'Er Dun!"
Posts: 1,301
|
Post by oompa loompa on Jan 17, 2009 2:59:16 GMT -5
hey, good job your engine runs pretty smooth . i can see it pause a little bit when it's doing calculations, or writing to the video memory. i encountered the same problem when i was working on my code , that bex is pretty slow , so i had to put in some tricks to prevent the engine from re-drawing over what was already drawn on the screen it seems that either the looping is slowing down code, or writing to vram is very slow. i think that creating a routine in assembly to aid in these intensive loops would make your maps move like sonic . like, a routine that draws only a row or column of tiles on the screen based on your map data. i was planning this before because just drawtilesinc won't cut it (only good for drawing entire maps, not portions). and maybe animations too (eg, in mario, make the coin blocks blink)? collision detection was something else that i wanted to improve as well . i was starting to make a routine that would read the tiles that a sprite was on top of, given the programmer supply the sprite number, the direction that the sprite wants to move in (eg, if sonic is only walking right, then only check the tiles that overlap on the right), and how much sonic needs to move. it could make a lot of games that are all professional like , but before, i never knew anybody would want to make super cool games in bex
|
|
|
Post by Syniphas on Jan 17, 2009 14:57:09 GMT -5
hah, I guess things are looking up again for BEX
If you make that function and fix ImaGenesis, then you could see many games coming for the Genesis on the near future
|
|
oompa loompa
I AM THE GOVERNATOR
"Git 'Er Dun!"
Posts: 1,301
|
Post by oompa loompa on Jan 17, 2009 15:27:22 GMT -5
i'd make the functions (i'll call it drawtilesmap and onwall for collision) only if there is a big demand for it. otherwise, it'd just be a couple of new functions that a majority of newcomers will have no clue how to use . i'd include a tutorial with the functions, and a few sample codes on how to use them though . uh, 2 or 3 people requesting the thing would pretty much be a big demand too, since this is a tiny little community i don't know about the imagenesis thing haha . i haven't touched the code in years, but i could work on it (just like what i did with sgtd). optimized octree was the mainstream back then too
|
|
|
Post by ScroGer on Jan 17, 2009 16:37:35 GMT -5
PLEASE DO IT!!!!!!!!!!!!!!!!!!!!
I think this is needed and well help people make the games they want!!!!!!!!!!!
and trust me u will see more professional looking games from me.........And if any one that isnt good wit pixel art feels held back then hit me up and ill be glad to make Sprites and Backgrounds as long as Im in to the concept u want in you're game.......
|
|
|
Post by Mairtrus on Jan 17, 2009 17:37:06 GMT -5
Sure, why not? But it will cut the extra-funny process of test-and-code of create a engine. Btw, I still prefer to do some thing by myself but, as ScroGer says, more people will be interested on create games that they want. If you don't have suficient time to write some demos or example codes, I offer myself to help you. I have a lot of free time until february. Also, if you hace some free time, try to add to BEX support for negative numbers, something with the BPL or BMI. And check if is something wrong with the command MemCopy. So, again on the topic, I noticed that less tiles drawn by each step, means more smother movement, so I modified the engine to work with 32*32 and 16*16 blocks, and here is the result: 32*32 block16*16 blockBecause the pause is produced by the draw process, not by te calculation. This last one is optimized as hell. EDIT: I forgot something. Pressing the (A) button you will increase the scrolling speed.
|
|
|
Post by ScroGer on Jan 17, 2009 18:38:31 GMT -5
wow Mairtrus ur new demos run even better, and when i turn it up to desp 6 then it really runs smooth..
Get work!!
|
|
|
Post by Tiido on Jan 18, 2009 16:10:48 GMT -5
This is nice stuff PS: it runs 2x faster in 50Hz, for obvious reasons
|
|
|
Post by Mairtrus on Jan 18, 2009 16:29:46 GMT -5
PS: it runs 2x faster in 50Hz, for obvious reasons The M68K of the PAL genesis works faster than the NTSC genesis? when i turn it up to desp 6 then it really runs smooth.. My fault. Desp is for Desplazamiento(Displacement). Is just I forgot to translate this, because I usually do all my code in spanish.
|
|
|
Post by Tiido on Jan 18, 2009 16:41:06 GMT -5
in 50Hz, you have 20% more time for CPU between the frames Your engine does not finish its business within single frame in 60Hz, so it will take 2 frames.... in 50Hz, the time between frames is longer, and there will not be 2 frames needed. This along with greatly increased DMA and higher possible res in 50Hz are the main reasons I like 50Hz more than 60Hz.
|
|