ref: 87952fb18827d804a53fe8c12562a0444e4f59dd
parent: 650a361f5a04e4fc39ade90459d280d227875cb1
author: rodri <rgl@antares-labs.eu>
date: Wed Oct 11 05:45:18 EDT 2023
got rid of yield(2) abuse.
--- a/musw.c
+++ b/musw.c
@@ -697,7 +697,7 @@
}
void
-threadshow(void *)
+runshow(void)
{
uvlong then, now, frametime, lastpktsent;
Vfx *vfx;
@@ -834,6 +834,5 @@
threadcreate(threadnetppu, nil, mainstacksize);
threadcreate(threadnetsend, &fd, mainstacksize);
threadcreate(threadresize, mc, mainstacksize);
- threadcreate(threadshow, nil, mainstacksize);
- yield();
+ runshow();
}
--- a/muswd.c
+++ b/muswd.c
@@ -330,7 +330,7 @@
}
void
-threadsim(void *)
+runsim(void)
{
int i;
ulong kdown;
@@ -536,6 +536,5 @@
threadcreate(threadnetrecv, &adfd, mainstacksize);
threadcreate(threadnetppu, nil, mainstacksize);
threadcreate(threadnetsend, &adfd, mainstacksize);
- threadcreate(threadsim, nil, mainstacksize);
- yield();
+ runsim();
}
--- a/todo
+++ b/todo
@@ -17,6 +17,7 @@
[✓] main game
[ ] keep a score
[ ] manage health
+ > related to hyperjump and the increasing likelihood of its destroying the ship.
[ ] reduce the amount of data sent on every NSsimstate packet
[✓] only send the fired bullets
[ ] bit packing