I have merged the exsisting Ashes and Severok branches.
I am seeing the intro dialog, but NPCs do not appear to be spawning.
Edit: NPC issue resolved.
Bug count: 5 resolved.
-
Audio bug under linux
-
Screen wrap bug
-
Railgun reloads on charging shot instead of after firing.
-
NPC not appearing after spawning (Not yet in bug list)
-
Possibly fixed: game over not relyably triggering.
-
Confirmed un-resolved, but possibly less common?
-
Issue repeated upon death while charging railgun
-
May be caused by NPCs & sheilds occupying Player_list
* Done so as convenience method as they fit the profile - Collsision with Bullets + Enemies -
Have Segregated Player from NPCs/Shield. Should Insha Allah resolve issue with triggering Game over.
- Lose of player now means empty Player_list
Now working on: Game Slowdown - Slowdown on holding attack button
Additional:
- Railgun can be obtained in game from drop.
- Bullet frame processing time decreased
- No need to recalculate rotation of bullet sprite as bullets have no change of direction after spawning.
- Bullets now have simplified move function in their subclass.
- Rotation is assigned to bullet sprite in bullet subclass init.
- Finished Player Deflector shield (Formally sword)
- Provides mouse-controlled point defence over a small area
- Can be used to push back enemies or deflect enemy weapon fire.
- Fun to use and feels more thematically approriate.
- Tweaked player ship speed. Much more responsive now.
- Doubled NPC movement speed.
- Intend to NPC to be valnerable to make them a higher immediate priority for players. Boosted speed as per request on github issues page.
Issues encountered:
- Pistol reloading instantly bug - Can not be reproduced. Can you please confirm this bug still exists?
Audio bug under linux has been resolved. - Culprit appears to be syntax of calling sound to be played, EG
Original:
def update(self):
if self.__shots_left == 0 and not self.is_reloading():
self.__shots_left = self.__total_shots
self.reload_sound.play
Corrected:
def update(self):
if self.__shots_left == 0 and not self.is_reloading():
self.__shots_left = self.__total_shots
self.reload_sound.play()
Adding ā()ā calls for play function of player class to be processed.
I am guessing that the python interpreter used on your windows system is less particular than the version I am using. Once I added the (), reloading sound plays as requested.
Player screen-warp bug resolved.
- I am allowing the player to wrap from 1 side of the screen to the other in the style of Asteroids. A bug allowed the player to screen wrap on the bottom and left, but not top and right.
- Old code was in place to keep player on screen. Code kept player contained in upper and right regions preventing screen wrap.
Ammo decreases on player triggering attack.
Usually not an issue, but for charging attacks this causes premature reloading.
Solution: Added conditional to player.fire() to check current weapon type is not ārailā before decreasing ammo count.
On rail_charge entity death (Transition from charging to firing), player.reload() (Manual reload function attached to key:r) is called to trigger reloading after fire.
NPC AI function started with check āNPC.is_on_screenā.
NPC spawns off screen, thus never recives command to wander on screen.
Removed check. NPC AI should never direct an NPC off screen.
On player death (In event of bug):
- Onscreen text removed
- No game over text or score displayed.
- AI persists.
- Occurs regardless of player weapon (previous theory of occuring during rail charge)
- NPCs still spawning
- Subsequent crash occured when left to run in failure state as Player_list[0] now contains NPC not Player entity. Some code triggered player weapon swich on entity that does not have this function.
Possible solution:
- in object move function on evaluating health < 1: Added self.on_death() call.
- Not sure if good fix, but Game over now triggers reliably.
- No error state triggered since fix implemented. Previously occured roughtly 50%
- Error state occured again. Significantly less common than before.
Better solution:
- Added NPC_list and segregated Player object from NPC
- Player list now empty on player death, probbably as intended during original game-over scripting.
Checking out now.
3 remaining bugs
- Minor: Player ship does not spawn in correct position. Updates as soon as moves.
- Looks strange
- Minor: Slowdown on players continual attacking
- Possibly due to rapidly checking and comparing timestamps to find when ready to fire again? Otherwise possibly due to checking for existance of rail-charge from bullet list while holding button.
- Minor: Pistol reloading instantly bug from github list - Can not reporduce.
The remaining bugs are fairly minor. With the exception of the player ship originally appearing in wrong position, remanining bugs not particularly noticeable.
If time tomorrow, will attempt the player ship bug again. Otherwise shifting to aiding art team with sprite assets.
Quick question regarding the config file for storing variables.
Is there much consideration needed for time required to pull a value from the config file using your function?
Earlier I was considering setting the ship thrust and rotation variables in the config file so that blood can tweak it, but those values are read fairly regularly and I was concerned about the required overheads vs having those values hard-coded.
As far as I understand it, the config code reads the file on each request?