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 / Displaying Scores, coords and colision check

Author
Message
Brandon Heat
15
Years of Service
User Offline
Joined: 28th Nov 2008
Location:
Posted: 7th Jan 2009 03:35
I'm currently making my own collision methods for my game, it very long and i'm not sure if i'm doing it right, basically what i'm doing in this 2d game is with the image that is the background i'm drawing imaginary boxs around it which act as bounds that the character can not go though (the game is a top view maze), just wanting to check if that is a good way of dealling with collison.

My other question is: Is there a way to display ints such as Score and the current x and y position as this would speed up the process of finding all the colision bounds.

I've tried string streams and ato i but have gotten issues with conversion. If i could have an example of this it would help muchly.
Zuka
16
Years of Service
User Offline
Joined: 21st Apr 2008
Location: They locked me in the insane asylum.
Posted: 7th Jan 2009 04:04
dbText(dbStr(val));
Brandon Heat
15
Years of Service
User Offline
Joined: 28th Nov 2008
Location:
Posted: 7th Jan 2009 06:13
Ahh thanks i missed that command.

About the colision, i'll try and explain it a bit better..

What i'm doing is say there is a 4 walls in the shape of a box some where in the maze, what i am doing is basically getting the position of those walls and writting a few if statements for it such as if(player_x >= start_of_wall && player_x <= end_of_wall && player_y >= top_of_wall ect...)

Its just that this method is taking a long time and i was wondering if there is a better way of doing it. Also seeing as though its just one maze per level i didn't see the need for tiles was that a bad idea? Should i have used tiles?

Thanks again Zuka, i was tearing my hair out using char arrays and string stream and itoa and all sorts of different things to get it to work can't beleive it was so easy.

Login to post a reply

Server time is: 2024-09-30 15:21:55
Your offset time is: 2024-09-30 15:21:55