Be notified of new releases
Create your free GitHub account today to subscribe to this repository for new releases and build software alongside 28 million developers.Sign up
It's been a while! Way too many commits has been cumulating and the release was delayed by a big code base reorganization.
Here are a few highlights:
- Huge code base reorganization. Driver code are now organized into 3 groups: base (include shared utils), VM (include LPC VM & compilers) , Packages. There are some driver centric (like networking code) left in the root tree. The VM part is also a bit of a mess, but future effort will continue to refactor them.
There has been a huge amount of header inclusion cleanups, view src/base/README and src/vm/README for details.
BUILD process is also improved, representing a much cleaner build executing structure. EDITSOURCE is gone!!!
Driver now implements a "gametick msec" config option, which defaults to 100ms, HEARTBEAT_INTERVAL compile options is removed, and a new runtime option "heartbeat interval msec" is added.
Driver now implements a concept of game-tick, On every game-tick, driver starts a new scheduling round, that includes executing pending call_out, heartbeat and various game related routines. At the end of this round, driver sleeps for "one gametick". Gametick is guaranteed not overlap. (also know as fixed interval scheduling, not fixed rate scheduling) .
With this concept, everything except of networking event in the driver is now executed wrt gametick time, call_out now schedules callback in game time, heartbeat now executes on the boundary of gametick time.
In older FluffOS, the driver would periodically attempt to "catch up" with realworld time by executing multiple round of callout/heartbeats in a for loop. This has been removed. call_out_walltime() has been added so LPC can still schedule a event occurring at realworld time. ( A typical usage of this is that you want a call executing every 3600 second in real world time, not the game time).
Both call_out and call_out_walltime now accept LPC_FLOAT instead of LPC_INT. the unit is still second, call_out's execution will be rounded to multiply of "gametick msec" , while call_out_walltime can schedule on msec resolution.
For example, if gametick msec is 100ms, callout(..., 0.5) means it will execute callback 5 gameticks later.
- Continuing rewriting manually managed array to STL containers , reducing memory fragmentation.