Hi guys, I am working on a gun simulator, and I wanted to see if you guys had any tips for optimizing it as it is my first project with Snap!, and I don't know the tricks. It is not ready to be played yet however it does function. Click HERE to see it!!!
I liked it. Sort of nice project.
Some improvements:
- Make every sprite NOT draggable (uncheck draggable from each sprite).
- Add a reload on-screen button for mobile devices.
- Use <mouse down?> instead of when I am [clicked V] as it allows the gun to shoot even when the mouse pointer doesn't touch the gun.
I like the simulator by the way, it's cool.
Hi! Thanks for replying!
- Yes I did this for the gun but now that you mention it I should do it to the other objects haha, thanks!
- I do plan on adding mobile compatibility however more important tasks have taken priority.
- That is definitely a good idea, thanks for pointing that out I will implement it now.
I'm also using inkscape to create some sprites! So the graphics will be better. I just added a better Basic Gun sprite so those who test it at least have something nice to look at. And I am about to implement a shooting range backdrop so we have some depth.
You can't click "Button" because "Gun" follows the mouse and captures the event.
Bring the "Button" to the front.
You may describe the concepts used by your simulation, like shaking hand, recoil, projectile trajectory... And tell us if you plan to deal with wind, barrel heat, hand fatique, trap shooting.
Or just go into the arcade shooting.
To stop the gun moving press the space bar. It is not fully explained in the notes and I just modified the code about it so that's probably it. If you press space then the gun stops moving so you can reload and press other things. Plus, you only need to press the button once to start the game. It is just a placeholder for the future where I add more guns and thus will need buttons to switch guns.
Yes, there is much more work to be done, and I just whipped up a description quickly so people would know what buttons to press. I've just opened the project up to people for suggestions, fixes, and performance advice.