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.

Dark GDK / Tile game in DarkGDK

Author
Message
Fency Federejshn
16
Years of Service
User Offline
Joined: 8th Dec 2007
Location:
Posted: 9th Dec 2007 14:30
I was making a tile game in SDL for quite some time, and i want to konvert it to DarkGDK,

The first thing on my mind is drawing the map, does anyone have experience with this?

In SDL i made a class for this and every sprite had its type... and by geting the sprites type i made collision reactions etc...

My question is how do i draw a 2D tile game in DarkGDK, (i know the basic idea) and how do i tell my player_sprite to when ever in collision with the SAME IMAGE (the wall) it stops???

thank's

fency federejshn
Zotoaster
19
Years of Service
User Offline
Joined: 20th Dec 2004
Location: Scotland
Posted: 9th Dec 2007 16:26
I'm guessing you can just keep the same data and functions, and just replace the actual drawing commands, but really, I can't really tell you until I see your code.

"It's like floating a boat on a liquid that I don't know, but I'm quite happy to drink it if I'm thirsty enough" - Me being a good programmer but sucking at computers
Fency Federejshn
16
Years of Service
User Offline
Joined: 8th Dec 2007
Location:
Posted: 10th Dec 2007 22:09
Hello, I've started making my tile game and the problem I am currently Facing is tile movement, i want my player to move on a 40x40 tile grid
in other words tile by tile but not just jumping tile by tile but smooth moving.

that means that if i press the say, left key my sprite moves left but when i realise my left key and my sprite isn't centerd on the tile it moves a bit forvard.

this is the code for the right arrow key:



this code works perfectly and does just what i want but the problem is when i combine all of the arrow key comands it messes up the movement... cause when right is not pressed left MIGHT be pressed but right still STOPS MY SPRITE!!!!!!!!

can anyone help!?

fency federejshn

Login to post a reply

Server time is: 2024-11-19 18:27:36
Your offset time is: 2024-11-19 18:27:36