Commit Graph

27 Commits

Author SHA1 Message Date
Jeremy Rand
6afbf4eb85 Finish reworking the network high score code to be independent of BuGS itself so it can be put into its own library. 2023-06-11 22:51:21 -04:00
Jeremy Rand
3660b47fd3 Rename globalScores to netScores to work towards moving it to NetScoresGS 2023-06-08 20:04:22 -04:00
Jeremy Rand
25a8fbeacd Display a better message when a score upload fails so it is more clear what happened. 2021-07-08 00:13:26 -04:00
Jeremy Rand
739d89add0 Display the position of the players score after upload. 2021-06-28 23:12:06 -04:00
Jeremy Rand
701585df1a Move non-game code out of the main segment to make more room for more high score code. 2021-06-28 22:33:01 -04:00
Jeremy Rand
08be64a61c Add some more prompts to be clearer when the network is busy. Allow the user to retry uploading their score. Even if things go wrong, add a retry mechanism so that we will try to get the network connection up after three minutes. 2021-06-28 00:03:32 -04:00
Jeremy Rand
14cbdbac2b Fix a problem where the players initials were not going to the correct place in the global high score request. Make the set high score request message a multiple of 2. It seems that the hash functions do not agree between the GS and the server when the request is an odd number of bytes. 2021-06-02 00:33:53 -04:00
Jeremy Rand
35930c72e2 Add the code to send high scores to the server, although it is being rejected right now due to a md5 hash problem in the request that I don't yet understand. 2021-06-01 23:53:52 -04:00
Jeremy Rand
815758f3ff Rework the game logic to support one and two player games. 2021-01-20 00:06:32 -05:00
Jeremy Rand
230d1f344c Fix the message to print the right player number when there is a high score. 2021-01-14 23:18:52 -05:00
Jeremy Rand
384a9ea233 Make more globals per player and index into them with the player number at game time. 2021-01-10 23:17:05 -05:00
Jeremy Rand
1cd4ccea3a Start work on supporting two player games. When the user starts a two player game now, two scores are initialized and the number of lives of the two players are independently tracked. Also, all of the score code has been updated to increment the player one or player two score correct. Still need to implement the logic to save the game state per player and switch between the players on each death. 2021-01-06 23:27:51 -05:00
Jeremy Rand
3bb4572eb8 Prompt for the initials of the player when they get a high score. 2021-01-01 23:09:46 -05:00
Jeremy Rand
767a8ba9ab Fix bug in how the old scores are pushed down. They must be copied backwards. 2020-12-31 15:03:08 -05:00
Jeremy Rand
4c7e52af58 Scores are now added to the top ten list of high scores and saved to the settings file. There seems to be a bug with moving all of the other scores down but it is a start. The initials are hard coded to my own for now. 2020-12-31 14:04:20 -05:00
Jeremy Rand
4d6f8d39f1 Change the prompt when the stereo channels are swapped so the user gets some feedback. Display the high score list. Still need to add the code to update the high score list. 2020-12-30 23:10:22 -05:00
Jeremy Rand
34d16c9944 Implement the code to compare and update the high score. Add a todo for a high score list with initials. Remove the border colour performance debug. 2020-11-20 00:31:09 -05:00
Jeremy Rand
2abb57b1a5 Add the code for detecting player collisions, exploding the player, decrementing the number of lives and maybe ending the game. 2020-11-11 23:51:09 -05:00
Jeremy Rand
c24b8ad072 Change the spider score colour to be the same as mushroom colours so the player does not detect it as a collision. Add code to display the number of lives and add to the number of lives ever 12,000 points. This lays the groundwork for handling player death and collisions. 2020-11-09 00:12:51 -05:00
Jeremy Rand
bb66ef4b03 Replace the C code which built tables at game launch time with a script which generates these tables at build time. This reduces the start time of the application and saves code space and is a necessary step before adding some new tables to handle the mouse efficiently. 2020-11-04 22:48:18 -05:00
Jeremy Rand
0fa9b45f45 Rework the LHS side of the game screen to have some BuGS branding. Move the number of lives indicator to the left and add a player 1 and player 2 section. 2020-10-27 23:59:06 -04:00
Jeremy Rand
0dd8222611 Add the code to handle restricting the spider to lower and lower rows as the score goes up. This is the final bit of game logic necessary for the bugs in the game I think. 2020-10-26 22:32:46 -04:00
Jeremy Rand
96a6b6f51f Implement the code to add the flea at the right time. This includes tracking the score in multiples of 20,000 and adjusting the number of mushrooms required in the infield before a flea will appear. Simplify the other score based thresholds which are based on multiples of 20,000 to use this test. Add debug which allows me to add 20,000 to the score whenever I want so I can test these thresholds more easily. 2020-10-25 23:11:11 -04:00
Jeremy Rand
9a34532d77 Implement the code to add spiders to the game. From my testing, it looks like 2 seconds after a spider leaves the game (either shot or off the screen), another one is added. Also, once the score is about 5000, the spiders added will be fast. The only spider behaviour I know of which is so far not implemented is as the player reaches higher levels, the spider constrains itself closer and closer to the bottom of the screen. 2020-10-22 00:00:16 -04:00
Jeremy Rand
99c7d98998 Add some comments about the lack of checking of a score "overflow". 2020-10-13 23:28:39 -04:00
Jeremy Rand
a1b4013e1c Hook up the score. Shooting fleas, spiders, scorpions or segments will increase the score. We track the score in two ways. One is just as a 32-bit unsigned integer for doing numeric comparisons on the score (say to the high score list to be implemented in the future) and secondly as a series of numeric digits displayed in a tile. Both are updated. 2020-10-13 23:24:15 -04:00
Jeremy Rand
b85000b4ed Start adding the infrastructure for levels and score. 2020-10-13 00:09:37 -04:00