jaylow Posted September 17, 2013 Share Posted September 17, 2013 Hi, i was wondering how to move a image over a 9x9 grid of other images The 9x9 would be 81 images of a size, lets say 32px by 32px The images that moves over them the same size 32x32. The 9x9 would be the background and the image that needs to be moved should stay centered. In what direction should i look, and are there any tutorials on the mather ? i was thinking that if i move the background the image would always stay centered but i dont know i that is a good idea. an exemple would be http://www.pardus.at or http://sylfex.redirectme.net Link to comment Share on other sites More sharing options...
justsomeguy Posted September 17, 2013 Share Posted September 17, 2013 I'm not familiar with those games and don't really want to set up an account to look at it, but if you're talking about drag and drop then do a search for Javascript dragging and dropping. In general, research Javascript motion tweening or Javascript animation. Link to comment Share on other sites More sharing options...
jaylow Posted September 17, 2013 Author Share Posted September 17, 2013 its not drag and drop its on click move to location. i will have a look into Javascript animation it sounds promising. i was thinking some php should be there, as well and maybe a database, so that other images could be stored on them like a building and stay on that spot. Link to comment Share on other sites More sharing options...
justsomeguy Posted September 17, 2013 Share Posted September 17, 2013 PHP and databases are great, but if you're talking about animation in the browser then that is Javascript. PHP runs on the server, not in the browser. Link to comment Share on other sites More sharing options...
davej Posted September 17, 2013 Share Posted September 17, 2013 There are various options for a 9x9 grid of images but for visual games you should start reading tutorials for using the HTML5 canvas. Here is an intorduction... http://www.w3schools.com/html/html5_canvas.asp Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now