Commit Graph

51 Commits

Author SHA1 Message Date
f39f279132 Add AI script code to provide a cleaner API around the engine interface.
Handle AIProxy entirely through scripts.
Support structured clones of script values.
Improve performance.
Support multiple script contexts sharing a runtime.
Use a separate context per AI player.

This was SVN commit r8866.
2011-01-15 23:35:20 +00:00
dd501b2a5a # Add initial basic player AI framework.
Support direct access to serializer streams, so serializers can be
nested.
Make component script "this.template" read-only.
Stop globally-subscribed component scripts receiving messages posted to
local components, to reduce out-of-sync risks.
Move pathfinder data out of entity template directory.
Fix GuiInterface deserialization.

This was SVN commit r8865.
2011-01-12 12:29:00 +00:00
f0476b61fb Fix #476 (Use JS_New for ScriptInterface::CallConstructor)
This was SVN commit r8638.
2010-11-17 16:56:11 +00:00
404456ee8e Fix int8_t redefinition errors in VC2010
This was SVN commit r8635.
2010-11-17 03:02:04 +00:00
bd3bd084c0 Support new SpiderMonkey API.
wposix: Define int8_t compatibly with SpiderMonkey.
Remove unused camera, lightenv JS interfaces.
Remove most of vector JS interface.
Remove some of the redundant JS string conversion functions.
Remove unneeded vmem, _lodBias functions.
Clean up some formatting.

This was SVN commit r8629.
2010-11-16 23:00:52 +00:00
13d2e44ff5 Run GC frequently in the simulation script context, to keep memory usage down
This was SVN commit r8622.
2010-11-15 15:03:40 +00:00
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
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
db047e5bee Cache message JS conversions, to make broadcasts faster
This was SVN commit r8120.
2010-09-17 17:49:39 +00:00
624e8490a2 Increase script memory limit more
This was SVN commit r8117.
2010-09-17 17:40:44 +00:00
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
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
2b57f4f998 # Initial support for formation movement.
Support asynchronous path queries.
Allow escaping when stuck in impassable terrain tiles.
Split Update message in multiple phases, to cope with ordering
requirements.
Support automatic walk/run animation switching.

This was SVN commit r8058.
2010-09-03 09:55:14 +00:00
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
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
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
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
0cd0a1f584 # Add auto-attacking of nearby enemies.
Add general range-detection code.
Avoid unnecessarily computing 3D entity positions.

This was SVN commit r7817.
2010-07-29 20:39:23 +00:00
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
5d5cb02b21 Disable visible logging of network messages
This was SVN commit r7708.
2010-07-06 20:31:05 +00:00
586ba51e4a Fix lossy fixed<->jsval conversion.
(Hopefully this will really fix the OOS errors.)

This was SVN commit r7692.
2010-07-04 19:47:31 +00:00
1c0536bf08 # Refactored the networking code, and redesigned the game setup screen.
Major updates to most network classes.
Simplify CNetServer so it doesn't duplicate any client behaviour; all
players now run CNetClient.
Remove most player/slot management from networking code.
Wait for all players to finish loading before starting the simulation.
Remove CGameAttributes; attributes are now just a JS object.
Remove CPlayer; they are now just simulation entities.
Handle player colours via simulation system.
Add a default map for Atlas, so it always has something to load.
Move network documentation to Doxygen.
Remove lots of now-unused code.

This was SVN commit r7653.
2010-06-30 21:41:04 +00:00
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
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
5ce9acc263 MSVC warning fixes
This was SVN commit r7580.
2010-05-25 18:44:33 +00:00
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
f902803af2 Windows build fixes
This was SVN commit r7566.
2010-05-22 14:27:53 +00:00
386f322b1c Make Math.random() more deterministic
This was SVN commit r7563.
2010-05-22 00:38:33 +00:00
c684c211a2 # Basic experimental multiplayer integration with new simulation system.
Add new turn manager that should be more correct and potentially more
efficient.
Remove evil CNetServer/CNetClient multiple inheritance of CTurnManager.
Add multiplayer autostart.
Various minor cleanups.

This was SVN commit r7551.
2010-05-20 00:59:01 +00:00
f95eb6ca85 Fix accidental include
This was SVN commit r7540.
2010-05-12 13:09:11 +00:00
434248167b Fix warnings in tests
This was SVN commit r7535.
2010-05-10 09:52:35 +00:00
037770a2a3 Fix use of 'undefined' sound group on death.
Warn about implicit script/native type conversions.

This was SVN commit r7527.
2010-05-09 13:56:06 +00:00
e144ef03a2 Windows build warning fix
This was SVN commit r7510.
2010-05-07 19:33:14 +00:00
d0599f4c7a Share component template scripts to save some memory.
This was SVN commit r7504.
2010-05-07 00:24:22 +00:00
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
f33706bf8b Switch everything to 15.16-bit precision fixeds, to allow more accurate unit vectors and angles.
This was SVN commit r7497.
2010-05-02 20:32:37 +00:00
4fe991074f Expose Footprint::GetShape and TemplateManager::FindAllTemplates to scripts.
Make CSimContext accessible to all component code, so they don't all
have to save their own copies of it.

This was SVN commit r7490.
2010-05-01 09:48:39 +00:00
3a1abb5d8f # Compile gameplay scripts in strict mode.
Fixes #487.

This was SVN commit r7456.
2010-04-14 18:57:50 +00:00
cf48ff0588 Expose JS_HasProperty
This was SVN commit r7449.
2010-04-09 18:45:28 +00:00
45fa351feb Revert unnecessary bcb462ad87
This was SVN commit r7422.
2010-04-01 08:18:16 +00:00
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
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
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
7a870170c9 SpiderMonkey version check
This was SVN commit r7372.
2010-03-20 17:00:21 +00:00
ed69187450 Build with spidermonkey-tip by default. Remove codepaths for old SpiderMonkey.
This was SVN commit r7366.
2010-03-19 20:54:44 +00:00
31febafb05 Compatibility with non-threadsafe SpiderMonkey
This was SVN commit r7364.
2010-03-19 19:54:00 +00:00
06928f7694 # Basic bandbox selection of units in new simulation system
This was SVN commit r7349.
2010-03-11 20:01:16 +00:00
b25076ed4d Min/max range support in pathfinder
This was SVN commit r7311.
2010-02-06 20:58:48 +00:00
3f1dfce41b Simplify GUI/simulation interface
This was SVN commit r7286.
2010-01-25 22:31:43 +00:00
953fb41c82 # Basic in-game building placement with new simulation system
This was SVN commit r7285.
2010-01-24 17:24:35 +00:00