Lets say to be RPG game. Project ispired by Zelda in Python.
Project in development. Recent state:
- TSX, TMX file support
- Field of view with clipping
- TSM extra properties (place ontop, stack shift, can be moved, etc.)
- Better animation signal distribution, TSX interval/duration usage
- Lighting, light sources
- TMX groups usege as elevations
- Staircase implementation
- Ingame objects placement and interactions
Steps:
- select nearby objects (thin yellow border in the image),
- evaluate collision separately in x and y and merge results (thick yellow border in the image),
Rectangles drawn using separate debbuging renderer.
Huge update and refactoring of entire code.
Game object is introduced. It stores dictionary of properties, and list of 3 types of methods introduced by those properties:
- input - feeding data to next stage,
- update - evaluating data and interaction with other properties,
- render - passing results to separate rendering classes.
Properties derive from 3 types of Abstract properties which introduce previously mentioned methods:
- InputProperty with abstract method input,
- UpdateProperty with abstract method update,
- RenderProperty with abstract method render.
Using multiple inheritance of Python each property can have any of above methods.
Properties can be used to create objects with any mix of functionalities, some of those are:
- SpriteProperty - applying texture to object,
- AnimationProperty - generic animation driving neighbouring SpriteProperty,
- MovingProperty - used to move objects with speed and direction,
- MovementAnimationProperty - specific type of animation used in moving of entities requiring MovingProperty.
Data exported as .csv from Tiled can be loaded. It is then split amoung 3 layers:
- floor,
- details,
- entities (or objects).
This separation helps in sorting.
Introduced list of obstacles interacting with CollisionProperty used to help evaluate collision detection.
Invisible borders (or limits) are used to prevent player from escaping the world. Those can be removed making e.g. walkable water.
Game is meant to be pixel-art. 20x40px for character is more than enough. Global scale option - world is rendered to scaled down surface and then scaled up to fill entire window. GUI elements are not treated with the scale. Antialiasing if turned off to obtain hard pixeled edge.
So far graphics were only placeholders. Final tilesize is sublimating, probably it will be 32px so some more concrete graphics are needed.
Changes:
- Added new tilesets.
- Reworked animation system, now world has its won list of timers. One timer can sontrol water, plants and other similar animations.
- Added images metadata to make the code more DRY.
- Player (entities) has idle animation state.
There is need for tiles builder and some reuse of common static properties.
Added another graphics, some of them needs tweaks and changes but it is not important.
Tiled was used to prepare map. There is need to create height layers and stack floor details.
Changes:
- Supported TSX, TMS fileformats with additional properties.
- Added multiple hitboxes with spanning hitbox for optimization.
Changes:
- Added global timers and global controllers for animations.
Timers are executing lists of handler functions. Controllers are driven by timers and are used to keep track of frames so that all tiles with the same animation are in sync.
Changes:
- Added lightsources with TSX fileformat support.
- Added daynight cycle.