Commit graph

15 commits

Author SHA1 Message Date
a72253131c prep for input publishing to dooms 2023-02-23 07:12:18 +01:00
65e8f5eec1 preparations for also using nng_tcp as a transport 2023-02-22 19:17:06 +01:00
e1979a2321 dp_doom: use 4 bytes per pixel and fix the colors 2023-02-19 23:48:02 +01:00
af517ab00b ctrl: better networking, can render received frames, still a broken mess 2023-02-19 10:44:57 +01:00
5502ab3b53 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
c2726d1881 rename QuitDoom -> Endoom :) 2023-02-18 23:04:34 +01:00
3ab1f6eee3 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
26c7f69b42 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
7d8978f6b8 caturday work: leak fixes, can now tell dooms to quit, nng util functions 2023-02-18 12:30:53 +01:00
76beee977d use _Static_assert to ensure DP_DoomState_Strings matches DP_Doomstate enum 2023-02-18 12:30:53 +01:00
3d9da20335 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
1674946bed First steps with Dear ImGui. It's awesome! 2023-02-12 15:48:15 +01:00
b75fb8961e add my standard typedefs for integrals 2023-02-12 13:38:54 +01:00
aa6438783a doomsim updates: state machine, nng_recvmsg/nng_sendmsg, first actual logic 2023-02-11 23:52:20 +01:00
ec041cf83b 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