Making a simple game using OOP
              in 
             Programming Questions 
              •  
              2 years ago    
            
 
           
             So, I'm starting to try and program games and use Object Oriented Programming while doing it. Processing has been great so far with it's ease of use and me not having to worry about making a game loop, etc. but I hit a wall and I'm not sure how to do this (or how I should 
            properly do this to be more accurate.)
            
             
            
            
             
            
            
             
            
            
             
            
            
 
            
           
             So here is the game and the (little) progress I have made:
            
            
            
             Since I'm relatively new to game programming and OOP, I've been a bit confused (as you can tell from my code comments). What I want to be able to implement next is a click event (I know how to do that...) that will cause the player class to call shoot() which will create a new Bullet object (I'm a bit iffy on this and whether that's right) and lastly, have the bullet actually update and draw on screen.
            
            
             While reviewing my code, I feel like I've messed up my draw method by putting in myPlayer methods. Should I have a broader umbrella method that updates 
             all classes? I'm not even sure how I could do that but that's just what my brainstorming came up with.
            
            
             So... How do I go about doing this? Am I doing this right or am I way off?
            
 
            
              
              1  
            
 
            