Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[feat]Construct a more complex setting with more balls, more cubes, and direct exit once the player loses or wins. #91

Open
wants to merge 23 commits into
base: main
Choose a base branch
from

Conversation

chenzunh23
Copy link

@chenzunh23 chenzunh23 commented Jan 18, 2024

A more difficult setting

This game involves 1 player ball, 3 enemy balls of different sizes and masses, 8 stationary cubes with infinite masses, changeable texture of balls and cubes in command line, and some basic keyboard extensions. There is more fun!
Changing Textures:
There are 7 textures of balls, namely blue1, blue2, white, orange, tile, grey, and Moon, based on the immutable assets of GameX. It would have been even funnier had there been more textures of planet surfaces! Simply type the names of these textures, and you can set the color of all four balls. To set the floor tiles, simply type 0-8. You can only set the colors of the basic playground and the starting block.
Keyboard Extensions:
In addition to AWSD, we have:
B: Enhanced by only allowing braking while the player is not jumping.
J: Jump on the surface of the blocks.
1:Add mass by 10% in the supply base(0,0,0).
0:Lower mass by 10% at will anywhere.
R:Return to the supply base at (0,0,0) and increase mass to 1.0f if the player ball has mass lower than 0.5f. This can be used to handle falls. But there are only 2 chances.
ESCAPE:Leave the program when it is not halted.
E:The player can choose to exit the program if its mass is higher than 2.0f. This is safer than a brutal escape.
H:Halt the game, enter a four-digit password, and return by entering again. This halt also provides an option to exit the game, which is more stable than a brutal escape. If you entered the wrong password three times, the game would automatically end.
T:Halt the player only. Return by pressing T again.
Winning or Losing:
Each time the player pushes off an enemy ball, the game removes that enemy ball.
If there is an enemy ball out of reach of the player ball, or the player ball has gone into an irreversible fall, the game destroys the player and declares failure.
The player wins if and only if it has pushed all enemy balls off the edge of the main block. Then the program will destroy the player, declare success and exit.
Known Issues:

  1. Seg-faults when quitting with an escape. In my program. Every time I encounter this kind of fault, Visual Studio tells me that the fault directly comes from xtree and map, and is strongly associated with Render(), not the player. Maybe the problems are caused by the incomplete removal of lighting and patterns on the screen?
  2. Incomplete removal of balls after a player has been removed. This issue is also mentioned by lemonchu in [feat] Safe Ball Removal #81.
  3. Due to limited knowledge, I haven't implemented a GUI interface for changing textures.

@chenzunh23 chenzunh23 changed the title Construct a more complex setting with more balls, more cubes, and direct exit once the player loses or wins. [feat]Construct a more complex setting with more balls, more cubes, and direct exit once the player loses or wins. Jan 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant