<commit_before>pyPlatformer
==========

## About
A 2D sidescrolling platforming engine.

Currently this is being developed alongside a generic game. At the moment, there isnt necessarily
much of a distinction between the engine and the game, but slowly game functionality is being moved
out into seperate files.

Random list of features:
- Parallax background scrolling
- Arbitrarily zoomable viewport onto the map
- NPCs (very basic AI (almost non-existent))
- Simple particle emitters (used for weapon firing and NPC spawns)

## Setup

## TODO:
### Engine vs Game
- Menus should probably be represented a in a flat file and loaded into the Game rather than
hardcoded into Game itself.
- MChar should be moved to game-space since Char is generic, but MChar is very specific to the
particular tileset and game
- Gravity currently is applied per-entity. This should really be a level attribute, and objects
should opt-in to being effected by gravity.

### add triggers/textual triggers 
- When colliding with this it will make some action happen.
- Textual trigger would be a bit of text that shows up on screen when a trigger is hit.

### sound
- Add sound effects on actions
- This could piggyback triggers, but also sounds associated with things like jumping would be ideal.

### Menus
- menus with keyboard input

### savestate
- Save and load gamestates

### More AI
- walk-Paths

### moving platforms
- Allow platforms (e.g. moving objects that allow something sitting on top of them (e.g. the player) to move with that object when it moves).

### slopes
- Each block would either:
    - be completely solid of a particular type (to save computation)
    - have 8 control points (4 for the corners, and 4 for halfway between each corner)
        + Two points per block can be connected form a line that will be the terrain for that block.
        + Then simply detect for collision with that line segment and appropriately push out depending on the type of collision.

### ledge grabbing and wall jumping
- The way its done in Stealth Bastard is really nice.
<commit_msg>Updated readme for more descriptive direction<commit_after>pyPlatformer
==========

## About
A 2D sidescrolling platforming engine.

At the moment, there isnt necessarily much of a distinction between the engine and the game inside of it, but slowly game functionality is being moved out.

Random list of features:
- Parallax background scrolling
- Arbitrarily zoomable viewport into the level 
- Simple particle emitters (used for weapon firing and NPC spawns)
- NPCs (very basic AI (almost non-existent))

## Setup

## TODO:
### Cleanup of existing things
- Menu attriubutes should be represented a in a flat file and loaded rather than being hardcoded into Game itself.
- MChar specification sould be factored out. Its essentially a Char with specific settings.
- Gravity is currently an entity attribute. This should really be a level attribute, and objects should opt-in to being affected by gravity.
- Objects sitting on top of one another should move with that the object its sitting on top of. Get this working for current Enemy objects, and you've got free moving platforms.
- tilesets are just tuples and are adhoc loaded at the moment. A `Tileset` should be an object that manages loading, keeps track of size and whatnot
- backgrounds
    - should be map attributes not loaded in the level
    - probably be genericized to be an array of `Tileset`s with only 1 tile that's the size of the background. This would (hopefully) allow for lazy loading for really really big maps.

### Add triggers
- An object with whom objects can register in order to trigger some event. This is already someone done through the event system, but its not generic enough to be aribitrarily used for triggering events.

### Sound
- Add a sound engine with which other objects can register to play sounds. I was thinking this might work well using a decorator that wraps relevent events or method calls (like a jump method).

### Menus
- menus with keyboard input, there's no technical limitation to this really, i just cant immediately think of a clean way to specify connections between menu items for good movement. Maybe {keyEvent: nextButton} per button?

### Savestate
- clean way of serialising gamestate.
    - maybe objects inherit from Serializable and on __serialise__ we gather state from Game which traverses down through all contained objects and return it. Then the reverse for __deserialise__. A good solution would only require each object to specify *what* their state is and not require manual loading and saving for each piece.

### Slopes
- Each block would either:
    - be completely solid of a particular type (to save computation)
    - have 8 control points (4 for the corners, and 4 for halfway between each corner)
        + Two points per block can be connected form a line that will be the terrain for that block.
        + Then simply detect for collision with that line segment and appropriately push out depending on the type of collision.

### More AI
- Pathing
- Goals (follow players, shoot at players, etc)
- Line of site or radius of awareness

{'fraction_non_alphanumeric': 0.04779483194093647, 'fraction_numerical': 0.0017485914124732854, 'mean_word_length': 3.978723404255319, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6141274', 'n_tokens_mistral': 1261, 'n_tokens_neox': 1212, 'n_words': 787}