Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a trivial cgame module which can view a map #1430

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

slipher
Copy link
Member

@slipher slipher commented Nov 10, 2024

Stacked on #1421.

Add a cgame module that simply loads and displays a map, with no entities. It can be useful to quickly test how a map renders or to make sure a simple gamelogic builds correctly in the CI. loadmap is the command to enter a map. The only way to change position for now is setviewpos.

Future directions:

  • Add controls for moving
  • Draw some help text when not in a map
  • Move commands like testmodel to Daemon and build them in
  • Load and draw stationary entities

@illwieckz
Copy link
Member

is there some plan to make it loaded by default if there is no game?

@slipher
Copy link
Member Author

slipher commented Nov 12, 2024

is there some plan to make it loaded by default if there is no game?

No. The uses I have in mind are renderer testing, and making sure there are no build errors in the shared gamelogic. The way I deploy it for renderer testing is building it in a separate directory and using -libpath to grab its gamelogic.

@slipher
Copy link
Member Author

slipher commented Nov 13, 2024

Fixed color grading in a less hacky way and changed a shader to white instead of gfx/colors/white so it will work with the daemon base pak. Now ready, though #1421 is still waiting.

@slipher slipher marked this pull request as ready for review November 13, 2024 12:57
@illwieckz
Copy link
Member

Is there something preventing to name this command devmap?

@slipher
Copy link
Member Author

slipher commented Nov 13, 2024

There is an engine command named devmap. I don't use that since I want to do it without an sgame.

@slipher slipher force-pushed the dummygame branch 2 times, most recently from 6bbc93f to 31aa440 Compare November 18, 2024 16:33
A shared header defined snapshot_t which was used in both the client
and cgame, but with different definitions of the player state struct.
For the cgame definition of playerState_t it included the file
shared/bg_public.h from the gamelogic.
Instead of this define an ipcSnapshot_t type which has a consistent
definition and is used for IPC messages. Now snapshot_t will be defined
and used only in the cgame.
This is a cgame module that simply loads and displays a map, with no
entities. It can be useful to quickly test how a map renders or to
make sure a simple gamelogic builds correctly in the CI.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants