My very first p*p scroller.
- {Nathan}
- Veteran
- Posts: 1169
- Joined: Thu Aug 19, 2004 6:08 pm
- Location: The wetlands of central Ohio, USA
- Contact:
My very first p*p scroller.
This is the very first engine I ever made, in QB/QBASIC or FreeBASIC, that uses p*p scrolling. I must say, I am very proud. The code is short, sweet, and too the point, but most of all -- organized. A very good learning source (although it is currently uncommented).
This zip contains source code, .bmp's needed (thank god for bload), and compiled source code (on FB .16).
http://www.petesqbsite.com/downloads/fb_pixel_.01.zip
Tell me what you think! I plan on improving it a TON later this week.
This zip contains source code, .bmp's needed (thank god for bload), and compiled source code (on FB .16).
http://www.petesqbsite.com/downloads/fb_pixel_.01.zip
Tell me what you think! I plan on improving it a TON later this week.
- {Nathan}
- Veteran
- Posts: 1169
- Joined: Thu Aug 19, 2004 6:08 pm
- Location: The wetlands of central Ohio, USA
- Contact:
I honestly am not sure as to what I am going to make of it. Mostly I plan of a RPG engine that can create a whole new game (well, almost) with just a loadmap(map2938.dat). It is going to be completely configureable from outside files.
I once read a tutorial that stated you only have to make 1 engine, then modify the maps and scripts to make a whole new game.
And dammit, it made sense.
I once read a tutorial that stated you only have to make 1 engine, then modify the maps and scripts to make a whole new game.
And dammit, it made sense.
If you will make an RPG out of it then I'm looking forward to itNathan1993 wrote:I honestly am not sure as to what I am going to make of it. Mostly I plan of a RPG engine that can create a whole new game (well, almost) with just a loadmap(map2938.dat). It is going to be completely configureable from outside files.
My site = animaproductions.us.tf
i tryied it and its flickering...maybe you should have to use a double buffer or lock/unlock page or something like that...and dont use CLS in your DrawScreen sub (you will always redraw old stuff with new one, so dont need to clear this page)
and just one small tip - dont use * and / for operations with numbers which are power of 2 (0, 1, 2, 4, 8, 16, 32, 64...), use bit operations (shift left and shift right) instead, its faster than * or / operation
e.g. line 82 of your code:
should be done:
and just one small tip - dont use * and / for operations with numbers which are power of 2 (0, 1, 2, 4, 8, 16, 32, 64...), use bit operations (shift left and shift right) instead, its faster than * or / operation
e.g. line 82 of your code:
Code: Select all
put (x * 32 - xOffset, y * 32 - yOffset), Wall
Code: Select all
put ((x SHL 5) - xOffset, (y SHL 5) - yOffset), Wall
FreeBASIC optimizes that itself, no use in obfuscating your code.Robot2037 wrote:i tryied it and its flickering...maybe you should have to use a double buffer or lock/unlock page or something like that...and dont use CLS in your DrawScreen sub (you will always redraw old stuff with new one, so dont need to clear this page)
and just one small tip - dont use * and / for operations with numbers which are power of 2 (0, 1, 2, 4, 8, 16, 32, 64...), use bit operations (shift left and shift right) instead, its faster than * or / operation
e.g. line 82 of your code:should be done:Code: Select all
put (x * 32 - xOffset, y * 32 - yOffset), Wall
Code: Select all
put ((x SHL 5) - xOffset, (y SHL 5) - yOffset), Wall
I have left this dump.
okay, im not so skilled in FB...i programmed in QB couple of years ago. Then i learned the java and now im writing j2me games for mobiles and i know, you have to optimalize your code and make you game as fast as possible, every single milisecond is needed
Now i trying to do some game in FB, so im used to use bithifting and other kinds of code optimalizations...i didnt know that FB makes it automatically during compilation.
Now i trying to do some game in FB, so im used to use bithifting and other kinds of code optimalizations...i didnt know that FB makes it automatically during compilation.
.Robot2037's website.
http://robot2037.mysteria.cz
Need a music (MOD, S3M, XM, IT) for your game? Feel free to contact me via ICQ or mail...you can also check music section at my web.
http://robot2037.mysteria.cz
Need a music (MOD, S3M, XM, IT) for your game? Feel free to contact me via ICQ or mail...you can also check music section at my web.
- {Nathan}
- Veteran
- Posts: 1169
- Joined: Thu Aug 19, 2004 6:08 pm
- Location: The wetlands of central Ohio, USA
- Contact:
New release!
Changelog -
Now uses page flipping with two pages
Supports much more versitile maps and "tilesets" (check readme.txt)
Default map is slightly less boring
Comes with compiled source code for linux and windows -- tested on both.
Check readme.txt and you can make your own maps with your own graphics - as many tiles as you want.
Link: http://www.filefactory.com/?ecb03b
Tell me what you think. Pretty soon I will actually implement a player...
Changelog -
Now uses page flipping with two pages
Supports much more versitile maps and "tilesets" (check readme.txt)
Default map is slightly less boring
Comes with compiled source code for linux and windows -- tested on both.
Check readme.txt and you can make your own maps with your own graphics - as many tiles as you want.
Link: http://www.filefactory.com/?ecb03b
Tell me what you think. Pretty soon I will actually implement a player...