It looks like you're new here. If you want to get involved, click one of these buttons!
I have a lot of code for this game I am making. So I guess this is a two part question. First of all how do I link lots of code to a forum (Here I worked around the issue by making a google doc with the code . . . link below)? Secondly I would love some simple feedback about this program. I'm afraid it is very repetitive. There is also a problem with the scoring which I cannot figure out. Thanks a lot!
link to code: https://docs.google.com/document/d/1J2IRLH-s15AN0mnvXWPqG3kpRbjWBEVw7ERBp6ptENU/edit?usp=sharing
Comments
You need to learn about tables. That will cut down the size of the program a lot. What is the game supposed to do.
The game is a first person shooter (2d of course) with dots as the enemy. You have thirty seconds to eliminate as many as you can. As soon as you kill all 5 and new 5 pop up moving faster. You control your "gun" using the accelerometer.
Interesting game. I replaced the sprite I don't have with a small circle. One problem, if you tilt the iPad too far, the screen rotates. You need to lock the screen.
Thanks @dave1707 ! Do you have any idea how to fix the scoring?
you can put your code on Github
@AIDENCODER123 Before worrying about why the scoring isn't working properly, I would spend the time learning about tables. You have so much repetitive code and tables could eliminate a lot of it. Once you reduce the code, it would be so much easier to fix the scoring. You have a very interesting game and you should continue to learn more coding. You could then make the code easier to update or fix errors. After learning tables, you should then look into classes. Classes can also eliminate a lot of repetitive coding.
Thank you both!
@AIDENCODER123 - I've written an ebook on Lua that tries to explain tables, among other things. I also have a bunch of blog posts on tables.
You can find all of them here, ebooks at the top
http://coolcodea.wordpress.com/2013/06/19/index-of-posts/
@AIDENCODER123 Here's an example of what tables can do. I took your example and wrote something similar. I think you should look at this example and learn what you can from it and then try to modify your code. Your code is a great start and I think you can learn a lot by trying to condense it. That's the quickest way to learn.