Work for Friday 6/30


  • Created random UFO enemies.
    • Fly across top of screen (gif has higher appearance rate for sake of recording)
    • Worth 100 points
    • Basically the same code-wise as enemies but with less functions (no shooting, etc)
    • Randomly picks a side to come from
Time: 3 hours

Work for Thursday 6/29


  • Added game over condition when enemies reach player.
  • Added sprite drawing system.
  • Encountered problem where nothing is showing when I try to load the sprite for the player. It is rendering and the player position is changing, but I'm not sure what I'm supposed to be setting the call equal to. If I do player.sprite = the call to the sprite drawer, that causes an error. 
  • Time: 4 hours

Work for Wednesday 6/28


  • Working on fixing a bug where if the most far-left row of enemies is completely destroyed the enemy movement is screwed up.
  • Couldn't quite figure out how to fix this but the reset is now working. Will work on it later. It's not extremely vital at the moment as opposed to getting the game to actually work, but is annoying as I am testing with only one row of enemies and I'm being forced to destroy the far left one last every time.
  • Sped up movement per level works!
  • Now need to fix movement of enemies as testing has revealed errors.
  • Fixed movement of enemies by changing the update function from updating the left side of the box based on the first enemy in the list every time to just adding the number that Enemy.vx changes by.
  • Other tweaks:
    • Changed shields to be smaller
    • Lowered fire rate of enemies
Total time: 4 hours

Work for Tuesday 6/27


  • Moved enemy creation into the enemyblock class, which was renamed enemycontroller. Enemy creation method is called in the init method of enemycontroller. Enemycontroller now holds enemy list, which is accessed in update.
  • Created reset method in enemycontroller, which clears the list and then makes a new one.
  • Encountering errors, most likely due to the location where I'm calling the reset method.
  • Total Time: 3 hours

Work for Friday 6/23


  • Added shields in.
  • Not sure how big they needed to be, but can change easily.
  • Currently take 5 hits to destroy and instead of changing sprite, they change color with hits.
Time: 3 hours
Total Time: 16 hours

Work for next week will probably mostly be trying to set up a level system, since that seems like a pain.

Work for Thursday 6/22


  • Added position parameter to textMaker class so that text can be placed on screen.
  • Added score system to enemies so that they're worth different amounts.
  • Added updateScore class to ui.py so that score can be updated onscreen in the same way lives can
  • Added screen that says game over before game ends
  • Couldn't implement onscreen FPS counter in the way that it's written in ttf.py because it relies too heavily on world/sdl2.ext classes that use world. Not sure if there's another better way to do this.
  • Working on level system:
    • When enemies is empty, the game needs to display that the level was beaten, reset the enemies and player, don't reset lives and score, and increase the speed of the enemies.
    • Wrote reset function that's basically just the same thing as creating the sprites, but saved lives and score from the player. Not sure where to put it in the code so that it can continue to update correctly.
  • Time: 3 hours 

Work for Wednesday 6/21


  • Finally got text working after 18 years. Realized after setting up different text system based on file sent to me that I wasn't initiating TTF correctly. Now works. Will need to add position parameter later so that I can place the rectangle where the text is.
  • For now, created class that updates lives specifically so that the lives of the player can update and run it. Created update function in class that changes lives without needing to run the renderer in every time.
  • Will probably also change font later and move it so it isn't right up against the edge. Tomorrow will work on score and game over screen.
  • Time: 4 hours


Work for Tuesday 6/20


  • Install commands: 
    • cd Downloads
    • tar xvzf SDL2_ttf-2.0.14.tar.gz 
    • cd SDL2_ttf-2.0.14
    • ls
    • pwd  
    • sudo su
    • [then type in your normal user password to log into your mac]
    • ./configure
    • make install
  • Achieved nothing today. Tried to get sprites working again to no avail. Eventually got it to the point where no errors are coming up, but still showing black screen. Not sure if they're actually rendering or not.
  • If I have it print the type of the variable sprite when it uses the drawable method, it does say they're texturesprites. Positions also appear to be changing when I fire bullets, etc. Still, nothing is showing onscreen.
  • Time: 4 hours

Work for Monday 6/19


  • Created test file to try and figure out renderer. Texture sprites seem fairly nonviable unless I want to go back and change how I make every single sprite in the game. May have to do this for text.
  • Considered making text sprites in separate files and just uploading as sprites. This is what I did for text in my game dev class :^) That might be a cop-out, though. It would certainly allow me to progress past this annoying text phase, at least, because I could use my normal sprite renderer.

Work for Friday 6/16


  • Working on getting text functioning.
  • Created texture render system but didn't actually use it, because it created an error. Will try to get it working later, but for now just made a basic SDL_Renderer to run into the text creation function.
  • Currently segfaulting somewhere in the text creation function, but can't figure out where.
  • Time: 3 hours
  • Total Time: 12 hours

Work for Wednesday 5/14


  • Changed collision system to be based off two points rather than whole square. Swept collision is still messed up- because the lower left point is in the back for player bullets and the front for enemy bullets, it was messing up collisions. I ended up taking it out for now.
  • Got clearing the screen to work by removing enemies from array. Turned out I needed to render the world again after I cleared the list.
Total time: 2 hours

Work for Monday 5/12 and Tuesday 5/13

Monday:

  • Created lives system for ship and game over
  • Read up on text rendering: one method involves using the SDL_ttf library, which is included (I think) so I will probably use this one. Need to figure out if the software renderer in the code is an acceptable renderer.
  • Tried to figure out how to clear the screen before ending the game, but nothing worked successfully. Will probably also need to use the software renderer for this.
  • Total time: 3 hours
Tuesday:
  • Still working on clearing screen and text.
  • Just tried to figure out how to clear screen and text the whole time. Tried several methods.
  • Total time: 4 hours

Work for Friday 5/9


  • Fixed enemy bullet speed by moving it into the main update loop and not having it in the enemy update function, since it was updating for every enemy.
  • Changed collision boxes so that they extend backwards conditionally based on which type of object it is. Also added slight padding around the sides of the bullets shot by the player in an attempt to stop them traveling between enemies and hitting ones in the back row. This might cause problems later, so I may add padding to the enemies instead. Needs to be tested.
  • Have a pull request that needs to be committed before I can push these changes.
  • Final product for the week:
Time: 1 hour
Total for week: 15 hours

Plan for next week:

  • Implement scoring system, player lives and game over/win conditions

Work for Thursday 5/8


  • Implemented shooting for bullets. Currently collide with player ship and disappear or fly off screen. Nothing happens to player on collision- plan on implementing lives system tomorrow.
    • One weird thing is that the bullets move extremely fast even when given the same speed as the player bullets.
  • Also may want to slow down bullet shooting later, but for testing purposes, have them firing pretty frequently.
  • Tomorrow, I plan to try and implement a game over. After playing Space Invaders online, I saw that the player has three lives and when it is hit, the enemies freeze, the player does a little explosion animation and a sound plays, and then the position resets and the enemies resume moving from the same spot. When the player runs out of lives, the screen clears and GAME OVER shows on it, along with your score.
Time: 3 hours

Work for Wednesday 5/7


  • Got alien movement working
    • Currently has no stopping point and will go infinitely
    • Does something where the bullet can pass between the aliens and hit ones in the back rows- I don't know if this was possible in the original Space Invaders, so I don't know if I should look for a way to fix it. 
Total time: 4 hours

Work for Tuesday 5/6


  • Made bullets narrower so it's more like actual space invaders
  • Changed scaling on spaceship so it's set and doesn't scale with window size- the aliens are more difficult to scale since the space between them changes strangely
  • Changed collision on bullets to implement swept volume
  • Changed how sprites are deleted when they are hit
  • Trying to set up movement- running into the problem that the enemies are not one collective object, so variables for direction, etc, can not be set in the update for loop as they change every time a new enemy is examined. I think I need to make a class for all the enemies and set things in there, but then I would need a way to check the edges of the group to see what direction to go in.
  • Somehow managed to get this to happen:
Time: 4 hours

Work for Monday 6/5


  • Working on getting bullets to eliminate enemies.
  • Created collision checker that checks if two objects are collided.
  • First problem: objects are being correctly removed from their respective lists, so other objects can move past them, but the sprites of these removed objects remain onscreen.
  • Second problem: I'm not sure if I have this all happening in the correct location- I couldn't figure out another way to do it aside from putting the check in the runloop, but this seems incorrect. Because the enemy list and bullet list are created in the main method and only the individuals themselves have objects, I couldn't think of another way to remove them from their lists.
  • Ended up doing this by creating a method in both the bullet and the enemy called hit that runs before it's removed from the list. This sets the sprite to width and height 0, so there isn't a sprite anymore. Then it can be safely removed.
  • Tried to create pull request for this and it had been automatically merged again. Not sure why it's doing that (I have an idea I will try next time I need to commit changes), but you can check what I did by going to the most recent commit.
  • Time: 3 hours

Work for Friday 6/2


  • Began working on creating aliens. Added them as a drawable class. Not sure if later we want different categories of aliens, or whether we just want to have different sprites within the alien class- in that case, I can add a parameter to the class later that specifies which sprite to use.
  • For now, since I'm only creating one enemy, I have a single creation statement. However, when I'm creating more, I think I'll loop to add them to a list (I don't know data structures in Python, so I'm not sure if there's any sort of 2D array I could use for each row), and increment the spacing each time by a variable so they're spaced like the actual game.
  • Have implemented loop system that creates all of the alien sprites onscreen. 
  • Still need to find a way to fix the aspect ratio of the game so that sprites don't scale.
  • I'm not sure what method to take for the scaling- port to iOS was added as a task to complete, and that has a much taller, narrower screen size than what I'm currently using. In that case, my original idea of simply having the user only input width or height and having the other scale wouldn't work, since a different ratio would be needed. In that case, I'd probably have to find a way to make only the x-size of all the sprites scale and then y-size respond to that, rather than the y-size of the screen.

Update: changed the size and spacing of aliens after checking what an actual space invaders game looks like.

Total time for today: 3 hours
Total time for week: 11 hours

Plan for next week includes:
  • Implementing movement for the aliens- should move to the far right one step at a time before lowering and moving to the far left
  • Implementing health for the aliens so that they can be destroyed by the bullets.


Work for Thursday 6/1


  • Successfully created bullets that fire when you hit spacebar
    • Adds bullets to list created in both player and main method (set main method list equal to player list, because that list is created when the player object is)
    • Then run through the list in update and update for each bullet in it
  • Not sure if we want a limit for how many bullets can be fired in a certain time
    • Ended up limiting it to 5 bullets at a time, though this can be changed easily. Once there are aliens the limit will probably need to be lowered, but for the time being only one at a time seemed very slow.
  • Somehow managed to commit my changes without making a pull request. They're all in the files on github now.
  • Time: 3 hours