Commit graph

17 commits

Author SHA1 Message Date
e159f62260 ctrl: also listen on tcp 2023-04-11 01:22:00 +02:00
e2830e3d68 be lazy, always transmit dooms MaxEvents (64) input events 2023-02-23 21:58:08 +01:00
663be5c54b prep for input publishing to dooms 2023-02-23 07:12:18 +01:00
98c44f66df preparations for also using nng_tcp as a transport 2023-02-22 19:17:06 +01:00
cbe6f76920 dp_doom: use 4 bytes per pixel and fix the colors 2023-02-19 23:48:02 +01:00
366bf9b75c ctrl: better networking, can render received frames, still a broken mess 2023-02-19 10:44:57 +01:00
feb0bc995c work on rendering - can draw rectangles into buffers and display those
Approach is to have one SDL_Texture per doom and use SDL_RenderCopy() with
different destination rectangles to compose the layout. Apart from
SDL_UpdateTexture() and SDL_RenderCopy() no work is done per doom.

This scales up to ~200 doomsim instances. After that the frametime
increases rapidly and all my cores are maxed out.

TODO: test without spawning doomsim processes!
2023-02-19 01:24:52 +01:00
9dab0ccf70 rename QuitDoom -> Endoom :) 2023-02-18 23:04:34 +01:00
86dcd6f92d get rid of the doomId concept, use the pid instead
The internal unique id should not be needed, the pid is unique enough :)

Also this can allow starting dooms externally without having to pass an id
parameter that's not already in use. The externally started doom sends its
pid with the DoomReady message and the controller can add a new entry if it
needs to. Of course the controller will not be able to kill() these
externally started dooms.
2023-02-18 22:28:15 +01:00
42a2d01f2a build tiny messaging infrastructure, refactor, hack till it sort of works
When usleep()'ing in doomsim it misses most of the quit messages. I think
it's because the controller spams RunDoom all the time and the quit
messages get discarded while doomsim is sleeping.
2023-02-18 22:08:12 +01:00
e26e406f29 caturday work: leak fixes, can now tell dooms to quit, nng util functions 2023-02-18 12:30:53 +01:00
7dbcf4bbb5 use _Static_assert to ensure DP_DoomState_Strings matches DP_Doomstate enum 2023-02-18 12:30:53 +01:00
823932af16 posix_spawn() doomsims
The doomsim startup routine or the controller startup publish are broken.
The doomsims never transition from DP_DS_Ready state.
2023-02-18 12:30:53 +01:00
e4cf3deecc First steps with Dear ImGui. It's awesome! 2023-02-12 15:48:15 +01:00
28489b9ee8 add my standard typedefs for integrals 2023-02-12 13:38:54 +01:00
cd99af391f doomsim updates: state machine, nng_recvmsg/nng_sendmsg, first actual logic 2023-02-11 23:52:20 +01:00
a7b31a6f49 refactoring all the things
- Move from spdlog to log.c by rxi
- Create dp_common c library
- Create empty doomsim executable
2023-02-08 06:39:23 +01:00