06-23-2005, 11:36 AM
Yup, I did it! Finally something useful from me. This was actually done two weeks ago but I wasn't able to upload it till today.
The engine features:
* pixel by pixel scrolling using GFXLib 2 graphic statements
* engine compatible with GFXLib screen modes from mode 11 to mode 21
* PUT(PP256 file format) file loader
* pixel perfect collision with moving NPCs
* PP256 custom font printing routines(ported to FB!)
* map file loader
* engine packed in a nice demo(20*20 pixels large tiles)
* two compiled sources(one in screen mode 13 and one in screen mode 18)
Download the engine here: http://kentauri.digitalblackie.com/FBscrollEd1.zip
Screenshots:
http://kentauri.digitalblackie.com/scrollhi.gif
http://kentauri.digitalblackie.com/scrolllow.gif
If you are not familiar with the original engine I'm talking about Richard Eric Lope's pixel by pixel scrolling engine made in QBasic with RelLib. Eric created it to show the powers of the mentioned library. The very engine helped me in the beginnings and it was the backbone of my several games, like Dark Quest or Ball Blazing Fantasy. I also released a couple of "advance" versions of the engine, mainly with game design oriented additions.
This was not the only reason why I wanted to port it to FreeBASIC. I've notice quite few people, including me, having problem switching to FB so to help myself and others I decide to port this lovely engine and heavily comment it. It uses GFXLib 2 graphic statements and Eric's FB PUT file loader(Pixel Plus 256 standard file format). You can create any kind of ZELDA style game in it, from an action game to a RPG.
Not much porting was needed to be done so this is mainly Richard Eric Lope's peace of work. I just felt that community would benefit from something more user-friendly than Space Impakto source code. So this engine is also a very useful GFXLib 2 example program and anyone who wants to create a game in FB and doesn't know where to start should take a look at this. Like I said before, the engine is heavily commented, very easy to understand and modify for his/her game design needs.
It's not perfect so this is what might come in the next versions and I could use(from you):
* sprite translucency(the latest version of GFXLib 2 probably already features it)
* BMP to PUT converter(FB compilable, QB one already exists)
* different type of sprite/tile loading(do you have some sort of routine?)
* different custom font printing routine(s)
* larger tiles and sprites suitable for screen modes like mode 18(40*40 pixels large tiles)
* different map loader compatible with some map maker(do you know any?)
* milisecond perfect delay routine(independent of external libraries)
* more features in the engine demo, game design related(to help newbies)
Known bugs in the engine:
Pixel perfect collision with moving NPCs is not the best but I doubt it can be improved much. Anyway, the collision routine is meant to work with a different type of collision(projectile collision or similar; action game related).
Strange tremble(delay in screen refreshing). I'm pretty sure this is a bug in the very GFXLib 2 or a problem with video card compatibility. If I put WAIT &h3DA, 8 before SCREENCOPY in my main loop I get a lot of this tremble. On the other hand, if I put WAIT &h3DA, 8 after SCREENCOPY in the main loop the tremble is almost ignorable. Please, send me your thoughts on this.
The engine is not meant to OpenGL freaks and people who dream of creating his/her own version of EverQuest. The scrolling engine was created for to people who are interested in old-school game design, what most QBasic game designers used to be, or still are.
Why should you desing 2D, 256 colors games in FreeBASIC when you can do it all in QBasic, you might ask yourself. Well, here are the benefits of working in FreeBASIC:
* you programs will be 32-bit compatible
* goodbye 64Kb memory limit; no more memory related problems; create huge maps, huge tiles and sprites, complex worlds, add layers and layers of stuff, create wild cinematics
* super-easy way of adding sound and music to your programs with FMOD
* you can ship your program/game with Linux and Windows compiled run file
* and all the other things that FreeBASIC has to offer and QBasic doesn't
Don't worry about the engine speed. It's around 70 FPS because of the WAIT &h3DA, 8 statement. Try to REM it and enjoy in 2000+ FPS. GFXLib 2 emulation of the QBasic WAIT statement doesn't seem to be useful for anything other than to nicely slow down your program in FB. So if I find or if someone decides to code a nice FB ASM millisecond delayer usage of WAIT statement will become obsolete. Me thinks. Maybe I'm wrong. I dunno.
One notable problem. In Pixel Plus you can't create a PUT file larger than 64Kb. I'll try to find PP256 source code to change this. Not a huge problem but if you decide to work with large tiles working in PP256 won't be much more convinient from capturing tiles saved in BMP or GIF images.
I'm opened to all the suggestion, critics, changes and additions to my engine. Especially from Eric and lillo. Tell me what is wrong with the engine and can be improved.
The engine features:
* pixel by pixel scrolling using GFXLib 2 graphic statements
* engine compatible with GFXLib screen modes from mode 11 to mode 21
* PUT(PP256 file format) file loader
* pixel perfect collision with moving NPCs
* PP256 custom font printing routines(ported to FB!)
* map file loader
* engine packed in a nice demo(20*20 pixels large tiles)
* two compiled sources(one in screen mode 13 and one in screen mode 18)
Download the engine here: http://kentauri.digitalblackie.com/FBscrollEd1.zip
Screenshots:
http://kentauri.digitalblackie.com/scrollhi.gif
http://kentauri.digitalblackie.com/scrolllow.gif
If you are not familiar with the original engine I'm talking about Richard Eric Lope's pixel by pixel scrolling engine made in QBasic with RelLib. Eric created it to show the powers of the mentioned library. The very engine helped me in the beginnings and it was the backbone of my several games, like Dark Quest or Ball Blazing Fantasy. I also released a couple of "advance" versions of the engine, mainly with game design oriented additions.
This was not the only reason why I wanted to port it to FreeBASIC. I've notice quite few people, including me, having problem switching to FB so to help myself and others I decide to port this lovely engine and heavily comment it. It uses GFXLib 2 graphic statements and Eric's FB PUT file loader(Pixel Plus 256 standard file format). You can create any kind of ZELDA style game in it, from an action game to a RPG.
Not much porting was needed to be done so this is mainly Richard Eric Lope's peace of work. I just felt that community would benefit from something more user-friendly than Space Impakto source code. So this engine is also a very useful GFXLib 2 example program and anyone who wants to create a game in FB and doesn't know where to start should take a look at this. Like I said before, the engine is heavily commented, very easy to understand and modify for his/her game design needs.
It's not perfect so this is what might come in the next versions and I could use(from you):
* sprite translucency(the latest version of GFXLib 2 probably already features it)
* BMP to PUT converter(FB compilable, QB one already exists)
* different type of sprite/tile loading(do you have some sort of routine?)
* different custom font printing routine(s)
* larger tiles and sprites suitable for screen modes like mode 18(40*40 pixels large tiles)
* different map loader compatible with some map maker(do you know any?)
* milisecond perfect delay routine(independent of external libraries)
* more features in the engine demo, game design related(to help newbies)
Known bugs in the engine:
Pixel perfect collision with moving NPCs is not the best but I doubt it can be improved much. Anyway, the collision routine is meant to work with a different type of collision(projectile collision or similar; action game related).
Strange tremble(delay in screen refreshing). I'm pretty sure this is a bug in the very GFXLib 2 or a problem with video card compatibility. If I put WAIT &h3DA, 8 before SCREENCOPY in my main loop I get a lot of this tremble. On the other hand, if I put WAIT &h3DA, 8 after SCREENCOPY in the main loop the tremble is almost ignorable. Please, send me your thoughts on this.
The engine is not meant to OpenGL freaks and people who dream of creating his/her own version of EverQuest. The scrolling engine was created for to people who are interested in old-school game design, what most QBasic game designers used to be, or still are.
Why should you desing 2D, 256 colors games in FreeBASIC when you can do it all in QBasic, you might ask yourself. Well, here are the benefits of working in FreeBASIC:
* you programs will be 32-bit compatible
* goodbye 64Kb memory limit; no more memory related problems; create huge maps, huge tiles and sprites, complex worlds, add layers and layers of stuff, create wild cinematics
* super-easy way of adding sound and music to your programs with FMOD
* you can ship your program/game with Linux and Windows compiled run file
* and all the other things that FreeBASIC has to offer and QBasic doesn't
Don't worry about the engine speed. It's around 70 FPS because of the WAIT &h3DA, 8 statement. Try to REM it and enjoy in 2000+ FPS. GFXLib 2 emulation of the QBasic WAIT statement doesn't seem to be useful for anything other than to nicely slow down your program in FB. So if I find or if someone decides to code a nice FB ASM millisecond delayer usage of WAIT statement will become obsolete. Me thinks. Maybe I'm wrong. I dunno.
One notable problem. In Pixel Plus you can't create a PUT file larger than 64Kb. I'll try to find PP256 source code to change this. Not a huge problem but if you decide to work with large tiles working in PP256 won't be much more convinient from capturing tiles saved in BMP or GIF images.
I'm opened to all the suggestion, critics, changes and additions to my engine. Especially from Eric and lillo. Tell me what is wrong with the engine and can be improved.