Uhfgood Posted July 31, 2014 Share Posted July 31, 2014 I'm working on an asteroids game, but first I just took the ship movement code from GameMechanicExplorer.com and then modified it to use multiple files. It works, except now I'm trying to substitute a different image instead of the "ship" image that's in there. Only problem is, when I reload the game, the new image does not show up. I have some code from pastebin that you can look at -- i mean it's really that simple. http://pastebin.com/FdG5J2zz Let me know if you can tell what the problem is -- if not then I don't know then. Thanks! Link to comment Share on other sites More sharing options...
lewster32 Posted July 31, 2014 Share Posted July 31, 2014 I can't see anything obvious - your layout is somewhat odd as it made me think perhaps you'd tried to add state-like functionality to your Player object by adding preload, create etc, but then I noticed you were calling those functions from the correct places in your state code. I don't see how that would cause this specific problem. Very puzzling indeed! Could you maybe upload this game so we can see it actually running? Link to comment Share on other sites More sharing options...
Uhfgood Posted August 1, 2014 Author Share Posted August 1, 2014 I figured it out, thanks. Apparently I had added a forward slash at the beginning of the path -- so it was looking for the graphics in the root, but it doesn't know, so everything is cool. Thanks! lewster32 1 Link to comment Share on other sites More sharing options...
lewster32 Posted August 1, 2014 Share Posted August 1, 2014 Aha! Link to comment Share on other sites More sharing options...
Recommended Posts