You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

30 lines
1.7 KiB

1 year ago
  1. you can compile this (windows only, debug version, assuming you have cl.exe available) using:
  2. cl.exe glad.c main.cpp /nologo /W3 /MTd /Od /Zi /RTC1 /fsanitize=address /link /out:game.exe /incremental:no glfw3.lib
  3. the .exe will be around 1.5mb in this case.
  4. or, in release version with a smaller .exe size and better perf (181kb with clang-cl, dang just barely missed 128kb total size!), no debugging symbols etc.
  5. clang-cl.exe glad.c main.cpp /nologo /W3 /O2 /GS /clang:-fno-asynchronous-unwind-tables /link /out:game.exe /fixed /incremental:no /opt:icf /opt:ref libvcruntime.lib glfw3.lib
  6. OR
  7. cl.exe glad.c main.cpp /nologo /W3 /O2 /GS /link /out:game.exe /fixed /incremental:no /opt:icf /opt:ref libvcruntime.lib glfw3.lib
  8. the first 10-20 frames in debug mode are prone to run below 60fps on my machine, which I unfortunately wasn't able to fix in 16 hours - my computer is fairly weak though, it's about 10 years old and has no external GPU. You may fare better :). Subsequent frames perfome many times better.
  9. - [Y] - snake-like 0 player game
  10. - [Y] - need to support on the order of 8k+ snakes concurrently (we're going to choose a max of 8192)
  11. - [Y] - if the head of a snake touches the tail of another, the snake who's head touched the tail will merge up with the 'eaten' snake.
  12. - [Y] - all snakes start with one segment
  13. - [Y] - when there is only one snake left, the game must restart
  14. - [Y?] - game data under 128kb - achieved if this means game state, not quite if it means .exe size (we're about ~1mb .exe size after trying to minimize size)
  15. - [Y] - 60fps minimum, or locked
  16. - [Y] - static memory allocation, avoid heap
  17. - [Y] - minimal or zero usage of libraries (except glfw and opengl)