Attempting to program more enemies
- Added some trig functions to scripting engine
- Put bullet spawning in scripting engine
--> The problem with bullet spawning now though is that I probably have to write like 20 commands to do the equivalent of the Enemy's fire method, though, so I'm concerned about that.
8 directional movement instead of rotation movement
- Rotation movement control code commented out for possible future use
- Player's test changed to rainbow to distinguish it from the enemy bullets
- Removal of more test prints
Experimenting with text boxes. Trying to think up of how to best implement our GUI...
JURY-RIGGED IT. IT WORKS NOW
JURY-RIGGED IT. IT WORKS NOW
Worked on bullet patterns.
There is a major problem with the whole thread paradigm. It works to get the function and run it perfectly, but it  utterly bombs at getting the local memory box, which it's supposed to. This needs fixing... and soon
Initial work on upgrade shop
- Does not compile at this time because not everything has been implemented yet.
- New entity.upgrades package.
After testing, realized that there was nothing actually wrong.
- In fact, the reason the thread function did not work was that I wrote the thread incorrectly so that its being called had no effect
- Going to work on collision detection now...
Please read what I have written in this commit message:
- I added in Entity.java a Shape object
- I made a setter and a getter.
- In SpaceInvaders I wrote code which loops through each weapon out there and sees whether it collides with the Player. It does so by grabbing the shape from the Player and grabbing the shape from the weapon and then seeing whether they collide. It doesn't work yet because what I need you to do is write the code which loads the Shape in the first place. We know this shape, to keep things simple, should be a circle.
All entities now have a radius for their collision box.
- All entity constructors changed.
- Clone methods in EntityGroup.java changed
- Collision detection for player with weapons work now.
More work on collisions.
The following collisions now work:
- Enemy bullets hitting the player with proper damage calculation taking into account enemy's attack, bullet's attack, and player's defense.
- The player running into an enemy (or vice versa).
 
The following still need work:
- Player bullets hitting the enemy.
 
Other changes:
- Organization of SpaceInvaders.java: loadScripts(), continueStepping()
- New static EntityGroup methods: checkCollision() and calculateDamage()
- Max HP for player works now, in preparation for saving.
- Dialog boxes commented out.
- Freeze section commented out.
- Minor changes to upgrades package so the project compiles.
More work on collisions - working version
The following collisions now work:
- Enemy bullets hitting the player with proper damage calculation taking into account enemy's attack, bullet's attack, and player's defense.
- The player running into an enemy (or vice versa).
 
The following still need work:
- Player bullets hitting the enemy.
 
Other changes:
- Organization of SpaceInvaders.java: loadScripts(), continueStepping()
- New static EntityGroup methods: checkCollision() and calculateDamage()
- Max HP for player works now, in preparation for saving.
- Dialog boxes commented out.
- Freeze section commented out.
- Minor changes to upgrades package so the project compiles.