top of page
Search

Enhancement Three: Databases Pt 2

  • Writer: Raymond Agosto
    Raymond Agosto
  • Mar 2
  • 1 min read

After establishing the First in, Last Out Queue structure, I realized I could also apply the same principle to something that needed sorting like the High Scores. Select it sorted the way I want, compare until I find the insertion spot, and repeat the previous Queue pattern after that index. This worked perfectly.




Finally I fixed the simultaneous boss-player move fatal error by introducing a check for null or invalid movement options being passed on through the NPC decision logic.



Correction: if(npcHorizontalMove!=null||npcVerticalMove!=null)

Checking both made it so the boss would never catch up to the player, but has been once again fixed.


The only thing I did not finish was the implementation of user-defined names, though I left room for names in the high scores table of the database.

 
 
bottom of page