My lack of Problem Solving abilities
Posted: Sat Mar 21, 2015 8:45 am
Hello! I have gotten to the point of my programming knowledge to know that I have surpassed the noobs. I may have even consider myself surpassing the intermediates but there's really something holding me back from that. Say for example, I wanted to make a shmup. I wouldn't know how to go about doing that to the level of efficiency and object orientedness that I would like. It's not because I don't know how to program with the libraries I need, I just don't know how to program it. There's obviously more than one way to make a vertical shmup. The only way that comes naturally to me is grotesque.
To be more specific, I would cram everything into the main loop and as many local-scoped variables to get the job done. The whole practice that programmers should keep their main loops small and tidy just shuts me down because I cant do it.
When I try to program more cleanly, lets say I add update and render functions to all the objects I want on screen for the shmup. The update function controls all the logic for Object. Lets say that for the alien enemies in the shmup, the fire a laser when they're leveled to the player, the spaceship. Its something simple like this that I cant figure out. How do I get the coordinates of the player into a function of another object? Do I pass it through the function as a parameter? To me, that's messy coding. And how would I create a laser that would update each loop when it is create inside of an if statement? Do I have to suck it up and program dirty? How do professionals program something like this? Am I just trying to be to perfect with my programs? Do I have to find a way that works for me? I haven't found any simple games like shmups that are open source.
What would you recommend?
I also apologize for any grammar mistakes I make. I'm typing this on a kindle fire and they were not meant for typing this much.
To be more specific, I would cram everything into the main loop and as many local-scoped variables to get the job done. The whole practice that programmers should keep their main loops small and tidy just shuts me down because I cant do it.
When I try to program more cleanly, lets say I add update and render functions to all the objects I want on screen for the shmup. The update function controls all the logic for Object. Lets say that for the alien enemies in the shmup, the fire a laser when they're leveled to the player, the spaceship. Its something simple like this that I cant figure out. How do I get the coordinates of the player into a function of another object? Do I pass it through the function as a parameter? To me, that's messy coding. And how would I create a laser that would update each loop when it is create inside of an if statement? Do I have to suck it up and program dirty? How do professionals program something like this? Am I just trying to be to perfect with my programs? Do I have to find a way that works for me? I haven't found any simple games like shmups that are open source.
What would you recommend?
I also apologize for any grammar mistakes I make. I'm typing this on a kindle fire and they were not meant for typing this much.