This site requires JavaScript, please enable it in your browser!
Greenfoot back
awent0428
awent0428 wrote ...

2014/9/5

Platform Problems щ(ಥДಥщ)

awent0428 awent0428

2014/9/5

#
I can not get collisions correct on this game. Could someone please help? I need the edited code and a descriptions of what it does. Thanks!
danpost danpost

2014/9/5

#
The source on that scenario is not currently available.
awent0428 awent0428

2014/9/5

#
I'm sorry, did not notice.
awent0428 awent0428

2014/9/5

#
It is added now.
danpost danpost

2014/9/5

#
I do not see any attempt at coding any collision. What have your tried? Things I have noticed: * class names should begin with uppercase characters (by convention) * method names should begin with lowercase characters (by convention) * the setting of the images for your cat, as coded, need to be read from file to create the image and then set every act method the cat moves; this is far from efficient and may cause lag; it would be far better to hold the images in fields and set the cat to the appropriate image only when a change in direction is detected. This means you would need three fields in the class -- two for the left and right facing images of the cat and one for the current direction the cat is facing * the fall method is limited, as written; that is, the only vertical movement the cat can do right now is in the downward direction at a constant rate of 5 pixels per act cycle; a field can be used to hold a variable rate of falling. This will allow for the implementation of gravity and jumping (movement in the upward direction) as well.
You need to login to post a reply.