Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Globox Adventures :P
Index -> Programming, Turing -> Turing Submissions
Goto page Previous  1, 2
View previous topic Printable versionDownload TopicRate TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
Monduman11




PostPosted: Sat Jun 19, 2010 3:10 pm   Post subject: Re: RE:Globox Adventures :P

Cezna @ Sat Jun 19, 2010 2:11 pm wrote:
Another thing you might want to do is have several points at the bottom of the picture, such as left corner, middle and right corner, and check whatdotcolour at all of these spots to see if your character is standing on anything.

ah kk ill try that
Sponsor
Sponsor
Sponsor
sponsor
Magix




PostPosted: Fri Jun 25, 2010 1:20 am   Post subject: Re: Globox Adventures :P

You might wanna look into this for the player movement.

Not only does it have perfect wall detection, but the wall detection is stored with a boolean, not just calculated and used. This means you can easily edit your code to set the boolean to true/false based on certain position, making it easy to map out your levels.
Cezna




PostPosted: Fri Jun 25, 2010 8:58 am   Post subject: RE:Globox Adventures :P

Using boolean variables for wall detection would seem to be a lot more code, as this would essentially be hard coding everything, rather than leading to an easier way t o edit levels.
Magix




PostPosted: Fri Jun 25, 2010 10:43 am   Post subject: RE:Globox Adventures :P

However, it would lead to the most accurate collision detection. With the program currently, you sometimes "fall" through the ground before coming back up. This might be because the OP has his/her "draw player" before he detects the edge. This would lead to the player being drawn, then found to be past the border, then redrawn in the next loop.

How are the edges currently being detected?
Cezna




PostPosted: Fri Jun 25, 2010 8:20 pm   Post subject: RE:Globox Adventures :P

But hard coded collision detection is nightmarish to edit, or understand.
It is usually best (especially with games of the scale of this one) to stay away from hard coded boundaries (figuratively of course, lol)
Display posts from previous:   
   Index -> Programming, Turing -> Turing Submissions
View previous topic Tell A FriendPrintable versionDownload TopicRate TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 2 of 2  [ 20 Posts ]
Goto page Previous  1, 2
Jump to:   


Style:  
Search: