Making a Dreamcast Game: Devlog 1
Hello!
Today's first order of business: making a dreamcast build!
Installing KallistiOS and raylib4dreamcast was pretty easy. I made a simple sh script to build and run my game, currently dubbed "survival":
#!/bin/bash
# or whatever shell you use
# setup kos environment variables n stuff
# makes survival.elf, modified from the examples repo
# packs the survival.elf and resources directory into a .cdi to run on the emulator
}
# runs the game .cdi in redream
It gave me this error: Assertion "0" failed at thread.c:598 in 'thd_schedule_inner': Thread stack underrun. I had no idea what that means, so I asked in the Simulant discord (KallistiOS and Dreamcast dev stuff). The problem was my main thread size being too small. I removed all but a few trees and removed most leaves and it worked:
(IMAGE HERE)
I decided to recompile KallistiOS with a larger thread size, running make CFLAGS="-DTHD_KERNEL_STACK_SIZE=131072". That gave me an error that I also didn't understand:
make[3]: Entering directory '/opt/toolchains/dc/kos/utils/makeip/src'
gcc -DTHD_KERNEL_STACK_SIZE=131072 -c -o utils.o utils.c
gcc -DTHD_KERNEL_STACK_SIZE=131072 -c -o vector.o vector.c
gcc -DTHD_KERNEL_STACK_SIZE=131072 -c -o crc.o crc.c
gcc -DTHD_KERNEL_STACK_SIZE=131072 -c -o mr.o mr.c
gcc -DTHD_KERNEL_STACK_SIZE=131072 -c -o field.o field.c
gcc -DTHD_KERNEL_STACK_SIZE=131072 -c -o ip.o ip.c
gcc -DTHD_KERNEL_STACK_SIZE=131072 -c -o main.o main.c
main.c: In function ‘usage’:
main.c:117:41: error: ‘MAKEIP_VERSION’ undeclared (first use in this function)
117 | printf("IP creator (makeip) v%s\n\n", MAKEIP_VERSION);
| ^~~~~~~~~~~~~~
KOS developer Falco Girgis recommended I run the command from the /opt/toolchains/dc/kos/kernel$ directory, and that worked without error. I then ran make in the utils and addons directories on their own. Here it is (with a few more trees):
(DREAMCAST EMULATOR SCREENSHOT HERE)
Okay, so 3D performance on raylib4dreamcast using gldc is terrible. I added some decimate modifiers on my models which helped some.
Until next time,
goldfish