Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

2D All the way! / 2d tile scrolling tutorial (DBpro and im not sure if it works in DBO)

Author
Message
Indigo
23
Years of Service
User Offline
Joined: 9th Mar 2003
Location: United States
Posted: 3rd Aug 2004 05:07 Edited at: 3rd Aug 2004 05:14
okay, so its not exactly a tutorial. but its remmed alot so you can probably figure it out. I made this cuz I keep on seeing newbs with extremely slow tile engines that either dont scroll or dont crop. (cropping is the key to a fast tile engine)



here is the tile image:
save it as "jungle tiles.png" wherever your source is located.


and click here to download the .map file that the program needs:
also put this wherever the source is located.
http://www.geocities.com/gamebert2001/demolvl.zip

tell me what you think of it.
I probably should've just zipped the whole darn thing together, but i got lazy... meh... oh well

I get about 60 FPS on my comp and I have probably *THE* worst graphics card ever. (im gunna buy a new one soon) So please state what FPS you get as well.

Here is a screenshot of it:


Shoot for the moon. Even if you miss, you'll land amongst the stars.
pizzaman
22
Years of Service
User Offline
Joined: 18th Feb 2004
Location: Gateshead, UK
Posted: 3rd Aug 2004 07:22
hey

Could you email me the map file or fix the link (geocities is rubish) I would like to test this.


thanks

pizzaman
Indigo
23
Years of Service
User Offline
Joined: 9th Mar 2003
Location: United States
Posted: 3rd Aug 2004 08:05
alright, if the link isn't working, copy this code into a notpad file and save it as "demo lvl.map"



k, hope that works for ya

Shoot for the moon. Even if you miss, you'll land amongst the stars.
Indigo
23
Years of Service
User Offline
Joined: 9th Mar 2003
Location: United States
Posted: 3rd Aug 2004 08:13
LOL, geocities doesn't like remote linking. all you have to do is copy and paste the url into your address bar. It should download it then. tell me what you think as soon as you get it working please

Shoot for the moon. Even if you miss, you'll land amongst the stars.
pizzaman
22
Years of Service
User Offline
Joined: 18th Feb 2004
Location: Gateshead, UK
Posted: 3rd Aug 2004 08:55 Edited at: 3rd Aug 2004 08:58
hey

I Tested it, I think this is pretty good but its not the best I've seen (no offense). The reason being the resolution is low so the frame rates are good; 150fps (which is very good for me I have a rubbish PC), however if I up the resolution to 800,600,32 (my normal resolution) and double the size of image, so the tiles are double the size (40 by 40 pixels); hence nearly the whole screen is filled; and the framerate is 50fps; not so good.

Two quick ways to improve the speed are put this at the end of the setup code set sprite 1,0,1 then take out the command cls you don't need as your updating the screen with your tiles constantly; I got a 20fps boost in both resolutions which makes it much better.

(Note : I tested this with sync rate 0 to get the maximum fps)

Here is the code



Check out IanM's code in the code base as his tile system is good; also I've got a very good system which I'm not willing to share just yet, still doing work on it, also might be using it commercially; currently I can get 75-80fps with a tile size of 20 by 20 pixels and its not optimized yet.

Good luck with this you've done good things with this just needs tweaking

pizzaman
Indigo
23
Years of Service
User Offline
Joined: 9th Mar 2003
Location: United States
Posted: 3rd Aug 2004 09:32
well, i tried out the new code and with sync rate: 0 but my frame rate didn't improve at all. I think ill blame my graphics card for this. meh, oh well.

To tell ya the trueth, i kinda wanted it in 320,240. makes for a nice retro - megamanish feel. plus i get speed benifits from it. and what was the use for putting it in a larger screen setting if your just gunna enlargen all the sprites anyways? lol, thats the exact same as 320 by 240, except for slower. whatever

Shoot for the moon. Even if you miss, you'll land amongst the stars.
pizzaman
22
Years of Service
User Offline
Joined: 18th Feb 2004
Location: Gateshead, UK
Posted: 3rd Aug 2004 11:45 Edited at: 3rd Aug 2004 11:46
hi

It should improve the frame rate, strange that it doesn't. Also the point for making the screen resolution bigger and making the sprites bigger was to test out how good your tile system was against other tile systems I used, like IanM's, mine etc. For me 800,600,32 is a kind of benchmark test for me on this PC I'm using, by enlargening the sprites I was able to test out how fast your system was at updating the whole screen (not just a quarter, hence I needed larger sprites due to a higher resolution), at a resolution 800,600,32.

I do get your point it did look the same, but with the higher resolution the tiles can be more detailed if they were redone, as now they would be 40 by 40 pixels for the same area onscreen; as opposed to the 20 by 20 pixels for a screen resolution of 320 by 240.

anyways keep improving your system it has a lot of potential - trust me

pizzaman

Login to post a reply

Server time is: 2026-06-11 14:49:06
Your offset time is: 2026-06-11 14:49:06