github fluffos/fluffos fluffos-3.0-alpha8.0

latest releases: v20230904-3279863, v20230823-c878494e, v20230821-7dfd009d...
pre-release9 years ago

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:

  1. 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!!!

  1. 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.

  2. 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.

  1. 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).

  2. 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.

  1. Continuing rewriting manually managed array to STL containers , reducing memory fragmentation.

Cheers.

Don't miss a new fluffos release

NewReleases is sending notifications on new releases.