-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdev_log
22 lines (18 loc) · 1.7 KB
/
dev_log
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
2022-08-13
- With just `start` and `update` stub functions cart is 709 bytes
- Adding WASM-4 interface (note linking with `strip-all`) and drawing "hello world" makes it 775 bytes
- Global variables inflate the cart size, we can avoid that by explicitly laying out the memory, and creating raw pointers
- Doing math on an array (normally does SIMD, but that's not supported in WASM) seems to fallback to an unroll for loop (which uses a lot of cart space), we can write the loop ourselves to save space
- I reduced the stack from 14752 to 12800, hopefully this wont cause issues, if I need more space the stack will start running into the bottom ofthe frame buffer and corruption can be seen at the bottom of the screen
2022-08-14
- Basic 3d drawing functions bump the cart to 5837 bytes, we had to implment our own trig. functions because of an Odin/LLVM and WASM issue.
2022-08-15
- Improved rendering a bit, added player ship and basic flying, cart is now 33330 bytes (I'm not sure why it is 6 times bigger, I will have to figure that out tomorrow)!
2022-08-16
- I didn't get to optimizing the cart size... the game is now 41935 bytes, but it has some gameplay. You can fly around and multiple people can join with netplay. There are 500 asteroids (the actual game will probably have less) filling the looping 200x200x200 unit world, asteroids and player ships can be seen through the loop. ^_^
- Cart size optimazation notes:
- avoid array math (it is MUCH larger)
- convert the constant parts of an expression to a constant declaration
- declare a zero initiallized struct (uninitiallized is larger), then set the values (do not assign a literal)
2022-08-17
- Optimized cart to 39390 bytes (from 41527)