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.

Newcomers DBPro Corner / Tile based 2D Game

Author
Message
Chris Hunter
21
Years of Service
User Offline
Joined: 17th Mar 2003
Location:
Posted: 17th Mar 2003 14:42
I want to programm a 2D tile game.
i have startet with the game field.
whole game field is 20x20 tiles

each tile 40x40 pixel width

i use the following code for output:




but it seems to be terrible slow and i only have a plain field of tiles. later it should be read out of a array which tile to be used. i dont know how to optimize. could anybody give me a hint.


i ve also startet a thread asking how to calculate ftp since i dont know the real ftp rate. i only saw that the mouse cursor moved very slow and ugly.

please help me i am very new to programming dark basic. maybe i do something wrong.
Superbeest
21
Years of Service
User Offline
Joined: 9th Mar 2003
Location: Netherlands
Posted: 17th Mar 2003 16:01
Nice idea, that tile system. I used that once too (when I still worked with Div)
I think you mean fps, instead of ftp, so the command for that is this:
screen fps()
paste something like this in your main loop
print screen fps()
that will give you the refresh rate (frames per second)
You can try to make a plain object of that size and then make a bitmap.



hope this will help.

Magister Mundi sum!
Superbeest
21
Years of Service
User Offline
Joined: 9th Mar 2003
Location: Netherlands
Posted: 17th Mar 2003 16:05
O yes, forgot to ask you: are you working in DBC or DBPro, for I have noticed DBC isn't that good in 2D.
That's why I also advice you to make a plain object and texture that. By the way. I haven't tested my snippet, so I hope it works

Magister Mundi sum!

Login to post a reply

Server time is: 2024-11-13 00:00:48
Your offset time is: 2024-11-13 00:00:48