Jump to content

Joystick and Parallax samples


rtlehr
 Share

Recommended Posts

Hey all,
 
     I've started the process of creating some games (just a hobby).  I'm very new to this and looking for advice on a couple tools I created and plan on using over and over.  The two items work as I need them to do, but, I'm not sure how to test their efficiency.  Links to the items are below.
 

Joystick

 

sample

 

http://rosslehr.com/modx/demos/joystick/index.html
 

code

 

https://github.com/rtlehr/gameControls

 

If viewing on a desktop browser use the arrow keys to control the ship, on mobile, use the joystick graphic in the bottom left.  Touch and drag the center circle to move the ship.  The outer circle is the bounds.
 

Parallax background

 

sample

 

http://rosslehr.com/modx/demos/parallax/index.html
 

code

 

https://github.com/rtlehr/parallax

 

 

This uses the same controls as the joystick.  (This takes a second or two to load and there is no loading bar)
 
The way this works, is, I'm using the length of an image to set the speed the background images move with the ship.  Doing this allows me to change the image and never having to change the code to  change the speed.
 
I really appreciate any help, advice, and suggestions.
 
Thanks,

Ross


 

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...