Chomper Stomping
jQuery/JavaScript/CSS 3/HTML 5, Java/PHP/Python/ActionScript, Git, Chrome/Firefox Extensions, Wordpress/Game/iPhone App Development and other random techie tidbits I've collected



flash games

September 26, 2007

Side Scrolling

More articles by »
Written by: Christopher McCulloh

Just a little update post. We’ve got scrollage (remember, you can move the ball with the arrow keys. You might have to click on the game to activate it though).

It hit me today that I didn’t need the ball to move, I needed the stage to move. It took some doing, but I’ve now got the ball staying still in the dead center of the stage, and the stage zooms around the ball. This probably will get some tweaking, but here is basically what I had to do:

1. Move the ball.

2. Capture the x, y values of the ball.

3. Put the ball back in the middle of the stage.

4. Capture the difference between where the ball was and where the ball is.

5. Move the stage by that difference.

I’ll explain in more detail in my forthcoming tutorial.

All that’s left now is to make the ball react to left sloping ground. Once I have that done, I’ll clean up the code and make a big level. Once I have *that* done I’ll play with it a bunch and either get bored with it, or I’ll add monsters and upgrades and actually make it into a game.



About the Author

Christopher McCulloh
E-Commerce developer at Finish Line Co-Author of HTML, XHTML and CSS All-in-one Desk Reference for Dummies Graduated from IU with a Bachelors of Media Arts and Science and a Certificate in Applied Computer Science. Tech Editor for Building Facebook Applications for Dummies and Building Websites All-in-one for Dummies 2nd Edition. Creator and maintainer of the Status-bar Calculator Firefox Extension Three years professional experience in Java E-Commerce Development and four years professional experience with PHP for a combined total of seven years professional JavaScript/HTML/CSS experience




 
 

 
Screen Shot 2012-05-02 at 10.23.54 AM

Douglas Crockford – JavaScript the Good Parts

Really good lecture on JavaScript, especially if you are new to the language from another language like Java.
by Christopher McCulloh
0

 
 
cloudwars

Let the Cloud Wars Begin!!!

This is all going the same direction. They are all going to end up with unlimited storage for the same price point per year, so, the sooner one of them calls it and just offers that, the better that one will do. They need to ju...
by Christopher McCulloh
0

 
 
logo

dynode Batch Get Item

Working a lot with node.js, dynode and dynamoDB recently. Still trying to wrap my head around it all. Had a horrible time getting dynode.batchGetItem to work. Here is the error I was getting: { name: 'AmazonError', type: 'Valid...
by Christopher McCulloh
0

 

 
mysqlerror

WP phpBB Bridge: Warning: mysql_set_charset() expects parameter 2 to be resource, boolean given

Warning: mysql_set_charset() expects parameter 2 to be resource, boolean given in wp-content/plugins/wp-phpbb-bridge/inc/widgets/wpbb_topics_widget.php on line 149 This is an error caused by the fact that the WP phpBB Bridge pl...
by Christopher McCulloh
0

 
 
 

Events Calendar Pro Nav Formatting Messed up on Empty Calendar

The Events Calendar Pro (from http://tri.be/) has a few problems. If you are trying to figure out why a calendar with no events in that month has completely screwed up header navigation, just put this line of code inside of tab...
by Christopher McCulloh
5

 




3 Comments


  1. Sweet! I seriously had fun for at least a full two minutes, which is saying a lot. It’s interesting that you can’t get the ball to fly using just “up,” unless it is already in the air. If you start from the ground and push up, the ball won’t fly. But you can “bounce” the ball by clicking up a few times to get it in the air, then it will fly. Good times.

    Also, why is it that sometimes the ball won’t bounce off of the blocks? If you fly up underneath, sometimes it won’t recognize the block at all, and sometimes only the “top” of the block. You really don’t have to answer, it’s just fun playing around in there after seeing you start from scratch. Thanks man.


  2. I’m enjoying seeing the progress of your game. I can’t believe you’ve gotten it to do what it does, that seems impossible to me. I hope you keep going after you create your level and release constant updates and patches to the physics engine and continue to improve on it. How much time has it taken you so far, total?

    I did notice that when the ball gets to the end of the level, if you push and hold left after it falls off the last cliff and bounce it against the wall as it’s falling, it will start creeping back up and you’ll be able to get back up to the ground.


  3. Yeah, there are still lots of bugs. In the version you guys commented on, onle the bottom left corner of the ball was really registering hits. Now all four corners are registering. However there are still bugs. Like if the left side hits a solid vertical wall, it considers it a left corner hit, and you can sort of just crawl up the wall. This is a bug.

    There are lots of things I need to work on on this.

    As to how much time I have spent on it… probably about… 25 hours… maybe… It’s really hard to say. There was a lot of time “wasted” prototyping and learning everything, and if I did it all over again it would only take me five to ten hours at the most to get to this point again I think.

    I think I will definitely keep working on it, depending on how many of these bugs I can work out…



Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>