Commit graph

79 commits

Author SHA1 Message Date
Ykkrosh
5d764f1435 Run network server in a separate thread, to minimise latency.
Make some parts of logger and console thread-safe.
Simplify console: remove special commands; remove prefix for script
commands.
Remove LOG_ONCE, to simplify logger.
Change some code to use the new logger interface.
Fix OOS when revealing map.
Clean up some formatting.

This was SVN commit r8511.
2010-10-31 22:00:28 +00:00
Ykkrosh
c0a7a36f7a Use JSFastNative API in more places, for improved compatibility with future SpiderMonkey versions.
Remove some unnecessary script-exposed functions, and move some more
into the Engine namespace.

This was SVN commit r8428.
2010-10-21 19:54:59 +00:00
Ykkrosh
624e8490a2 Increase script memory limit more
This was SVN commit r8117.
2010-09-17 17:40:44 +00:00
janwas
2e7436434d warning fixes: mostly size_t vs. specialized API type and other type conversion.
added player_id_t typedef and INVALID_PLAYER, use that instead of -1.
also added sanity checks to cpu.cpp to ensure ARCH_* is correct (see
http://www.wildfiregames.com/forum/index.php?showtopic=13327&hl=)
and further predefined macros to arch.h just to be sure.

This was SVN commit r8079.
2010-09-05 09:38:30 +00:00
Ykkrosh
5e15a0279e Print JS stack trace when reporting exceptions.
Increase maximum logger message size.
Fix GC bug.

This was SVN commit r8063.
2010-09-03 20:06:17 +00:00
Ykkrosh
5fbbc27dfd Fix crash when calling JSFastNatives with too few arguments (they don't guarantee to give the number requested in the definition)
This was SVN commit r8028.
2010-08-23 14:30:13 +00:00
Ykkrosh
91cd032827 Add basic replay recorder/player to help debugging and performance testing.
This was SVN commit r7863.
2010-08-06 22:16:05 +00:00
Ykkrosh
65bcedb9fc Load map descriptions from their XML file.
Add basic hold-fire stance, and use it for some test maps.
Add JSON data container to map XML files, to simplify the interaction
between scripts and maps.
Fix fixed-point printing so it roundtrips safely through map files.
Fix camera startup positions in old-format maps.

This was SVN commit r7844.
2010-08-04 21:15:41 +00:00
Ykkrosh
b292a32505 Add JS memory usage to profiler.
Add dumpHeaps() console function for debugging JS memory usage.
Increase default JS heap size.
Make call-time profile table appear first when toggling.
Remove some unused script functions.

This was SVN commit r7842.
2010-08-02 19:23:58 +00:00
Ykkrosh
c4350d86de Avoid unnecessary dynamic allocation when calling script functions.
Use tracer instead of rooting in ValueCloner, to avoid memory
allocations.

This was SVN commit r7770.
2010-07-19 23:03:33 +00:00
Ykkrosh
5d5cb02b21 Disable visible logging of network messages
This was SVN commit r7708.
2010-07-06 20:31:05 +00:00
Ykkrosh
c5d204c7ff Enable latest JS language features.
Load GUI scripts as UTF-8.

This was SVN commit r7650.
2010-06-30 21:23:41 +00:00
Ykkrosh
65cf204423 Display warnings and errors on screen for a short time (fixes #119).
Add warn(), error() functions for simulation scripts.

This was SVN commit r7600.
2010-05-31 22:44:59 +00:00
Ykkrosh
47a03c3397 Replace JS_Enumerate with manual enumeration, to avoid its memory allocations.
Use LookupProperty to avoid having to check for getters.
Add a quicker method of rooting many script values.

This was SVN commit r7579.
2010-05-25 18:24:12 +00:00
Ykkrosh
f902803af2 Windows build fixes
This was SVN commit r7566.
2010-05-22 14:27:53 +00:00
Ykkrosh
386f322b1c Make Math.random() more deterministic
This was SVN commit r7563.
2010-05-22 00:38:33 +00:00
Ykkrosh
f95eb6ca85 Fix accidental include
This was SVN commit r7540.
2010-05-12 13:09:11 +00:00
Ykkrosh
e144ef03a2 Windows build warning fix
This was SVN commit r7510.
2010-05-07 19:33:14 +00:00
Ykkrosh
d0599f4c7a Share component template scripts to save some memory.
This was SVN commit r7504.
2010-05-07 00:24:22 +00:00
Ykkrosh
fe53bce3b1 Rewrite the clone-object-between-JS-contexts code (for GUI<->simulation interface) to be more efficient.
Delete unnecessary unused incomplete profiler scripting support.
Clean up some JSAPI code to use newer features.
Display simulation script functions in the profiler.

This was SVN commit r7503.
2010-05-05 22:36:35 +00:00
Ykkrosh
3a1abb5d8f # Compile gameplay scripts in strict mode.
Fixes #487.

This was SVN commit r7456.
2010-04-14 18:57:50 +00:00
Ykkrosh
cf48ff0588 Expose JS_HasProperty
This was SVN commit r7449.
2010-04-09 18:45:28 +00:00
Ykkrosh
45fa351feb Revert unnecessary bcb462ad87
This was SVN commit r7422.
2010-04-01 08:18:16 +00:00
janwas
bcb462ad87 windows build fix
(should HAVE_VALGRIND go into e.g. lib/config2.h?)

This was SVN commit r7420.
2010-03-31 22:24:16 +00:00
Ykkrosh
9b6326f124 Always build with Valgrind support. Always use the bundled Valgrind header.
This was SVN commit r7397.
2010-03-26 10:31:47 +00:00
Ykkrosh
00e18e4ea8 Report S3TC non-support with an in-game GUI message box.
Fixes #313.

This was SVN commit r7390.
2010-03-23 22:45:07 +00:00
Ykkrosh
31febafb05 Compatibility with non-threadsafe SpiderMonkey
This was SVN commit r7364.
2010-03-19 19:54:00 +00:00
Ykkrosh
953fb41c82 # Basic in-game building placement with new simulation system
This was SVN commit r7285.
2010-01-24 17:24:35 +00:00
Ykkrosh
7c2e9027c2 # Rewrite of the game's simulation system
Giant merge from
http://svn.wildfiregames.com/hg-source/file/5fb522019d5e
Infrastructure is largely complete, gameplay is largely missing
Disabled by default; use command-line flag "-sim2"
(Second attempt at commit...)

This was SVN commit r7259.
2010-01-09 19:20:14 +00:00