eco2d/foundation.md

114 lines
3.4 KiB
Markdown
Raw Normal View History

2023-02-13 08:15:46 +00:00
## Foundation:
* platform
* viewer system ??
* camera
* game
* debug ui
* packet utils
* arch
* input
* profiler
* renderer
* signal handling
* zpl options
* gen/textgen -> assets
* items
* inventory
* crafting
* notifications
* tooltips
* chunk
* blocks
* tiles (and chunk baker)
* systems (core systems)
* components
* net
* packets (but add custom messaging, and security)
* compression
* world
* wrold_view
* entity_view
2023-02-13 08:12:32 +00:00
2023-02-13 08:15:46 +00:00
## Components
2023-02-13 08:12:32 +00:00
-------
2023-02-13 08:15:46 +00:00
* app - thing that runs game
* game - the game stuff, includes client and server
* packet - structure that has data written/read by client/server
* asset - structure that describes tile/block/object/entity, something that can be visualized
* module - a thing that uses a set of ecs components and systems to create a self-contained ecs module
2023-02-13 08:12:32 +00:00
------------
2023-02-13 08:15:46 +00:00
* world - a map of chunks within the game world
* world-view - a representation of the world recreated by the client
2023-02-13 08:12:32 +00:00
----------
2023-03-12 08:52:44 +00:00
* chunk - entity that contains set of tiles and blocks
2023-02-13 08:15:46 +00:00
* tile - basic thing that makes up the chunks
* block - 2nd level of things that make up the chunk
2023-03-08 17:11:53 +00:00
* entity - an grid-independant static or dynamic entity that can exist in the world and has some systems controlling it
2023-03-12 12:19:59 +00:00
primary archetypes:
* item - an entity in the world, that can have a different state when its picked up
* object - an item that can be placed in the world
* device - an object that can be interacted with
* mob - an entity that can be controlled by ai
* player - an entity that can be controlled by a player
* vehicle - an entity that can be used to transport other entities
* craft - a recipe that can be used to craft an item
2023-02-13 08:12:32 +00:00
2023-02-13 08:15:46 +00:00
## Naming
2023-02-13 08:12:32 +00:00
2023-02-13 08:15:46 +00:00
* zpl.eco
* foundation
* sandbox
* survival
* prefix: efd_
2023-02-13 08:12:32 +00:00
2023-03-12 12:19:59 +00:00
## Concepts
2023-03-12 08:52:44 +00:00
* tile
* block
* entity
2023-03-12 12:19:59 +00:00
* item
* object
* device
* mob
2023-03-12 08:52:44 +00:00
* player
* vehicle
* craft
2023-03-08 17:11:53 +00:00
2023-03-12 12:19:59 +00:00
## Transitions
* item -> tile (item destroyed, tile replaced)
* item -> block (item destroyed, block created)
* item -> entity (item hidden and untracked, entity component added) // item becomes entity, just changes state
* item -> item (crafting) (item destroyed, item created)
* tile -> item (tile replaced, item created)
* block -> item (block destroyed, item created)
* block -> block (crafting) (block destroyed, block created)
* entity -> item (entity component removed, item shown and tracked) // entity becomes item, just changes state
2023-03-08 17:11:53 +00:00
## Features
* In-memory lists
* assets
* items
* crafting recepies
* prafabs for entities (pipeline for entities)
* built in server->client RPC
*
2023-03-12 12:19:59 +00:00
// // register game specific input bindings
// // pre-defined bindings and controlsets
// efd_controlset_apply(EFD_ACTION_MOVE, EFD_CONTROLSET_WASD | EFD_CONTROLSET_ARROWS | EFD_CONTROLSET_GAMEPAD_LEFT);
// efd_controlset_apply(EFD_ACTION_POINT, EFD_CONTROLSET_MOUSE | EFD_CONTROLSET_GAMEPAD_RIGHT);
// // custom bindings and controlsets
// efd_controlset_keyboard(CONTROLSET_ACCELERATE, EFD_KEY_DOWN, EFD_KEY_SHIFT_LEFT | EFD_KEY_SHIFT_RIGHT);
// efd_controlset_gamepad(CONTROLSET_ACCELERATE, EFD_GAMEPAD_LEFT_TRIGGER, 0.5f);
// efd_controlset_apply(EFD_ACTION_SPRINT, CONTROLSET_ACCERLATE);
// // custom input bindings for custom actions
// efd_controlset_register(ACTION_USE);
// efd_controlset_keyboard(CONTROLSET_USE, EFD_KEY_DOWN, EFD_KEY_E);
// efd_controlset_gamepad(CONTROLSET_USE, EFD_GAMEPAD_BUTTON_A, 0.5f);
// efd_controlset_apply(ACTION_USE, CONTROLSET_USE);