[phpBB Debug] PHP Warning: in file [ROOT]/phpbb/session.php on line 583: sizeof(): Parameter must be an array or an object that implements Countable
[phpBB Debug] PHP Warning: in file [ROOT]/phpbb/session.php on line 639: sizeof(): Parameter must be an array or an object that implements Countable
ArcanumAlive Forums • MatchMaker2 - New version released and Lua bound! (v0.4f)
Page 1 of 5

MatchMaker2 - New version released and Lua bound! (v0.4f)

Posted: Mon Jul 16, 2012 10:06 pm
by Crypton
Hello everyone,

I'm here to announce a new version of MatchMaker2 and MatchMaster, which will be released soon, probably within a few days.
(For those who don't know what are these apps, here is original topic for the previous version: http://arcanum.game-alive.com/forums/vi ... p?f=5&t=20)

I've been working on it for a 3 days 2 weeks* and I've made a lot of progress.

Here is a list of new features (Version 0.3c):
-MatchMaker is now (partially) bound to Lua, so the behaviour of the MatchMaker can be heavily modified.
-Lua script will be automatically reloaded when you change the file. No need to restart server.
-Introduced server commands. Players can now send textual queries to the server by simply typing a commands while playing.
-Handling some global/server events, such as player movement, join/quit events, chat messages and so on.
-Fixed several bugs in multiplayer. Most serious bug with blocking sockets was fixed as well, performance of the server should increase. Second most serious bug was when player suddenly disconnected because of game crash or task kill, the server sometimes didn't handled this and it would loop trying to send packets to that player until some new player connects to the server to that player slot.

-Overriding AutoEquip.mes (for now only changing amount of gold is possible).
-Automatic version check. It will popup fancy message box when it detects that the new version is available. It will always check that you have the most recent version of MatchMaker.
-News and Community buttons are now working (it will open your web browser with this website in it).
-Message Of The Day (MOTD). It will later contains news related to Arcanum and MatchMaker.

-It can now be used with both Arcanum and OpenArcanum.
-MatchMaster is now standalone app, and it's easy to integrate to any website through iframes or images.
-Much more statistics. Now you will also know: How many players are online, including their names, locations and total gameplay time; which map/module is current, version and language of the game, etc.
-Optimized, almost completely rewritten code. Safer and much cleaner as well.
-Profanity word filter for server names. (I had to implement this because someone were using vulgar and racist names for their servers. :roll:)

New features for Version 0.3d:
-You can now speak after you die. No need to send private messages to players near you that you need help from.
-Public/private server detection. It will now tell you if other player will be able to connect to your game or not. If you have firewall enabled or you don't have a public IP address and MatchMaster couldn't reach your game, it will announce to you that your game is Private.
-Object spawning. You can now summon weapons, ammo, armors, NPCs and other objects using a single command!
-Object generators. Similar to object spawning command, but it's also possible to set spawn interval, radius, etc. Useful for filling areas with enemies, such as monsters, critters and other npcs.
-Reading Message (.mes) files. Now you can easily get lines from .mes files using Lua. Useful for retrieving description of prototypes.
-Packet compression. Uses zlib/FastLZ to compress all packets. Saves a lot of bandwidth as Arcanum uses large packets (e.g. >1KB for single dialog line!).
-You can also display some stats about the server, for now total recv/send bandwidth and total bandwidth saved by packet compression.

Planned features:

-More advanced stats + Graphs. (Easy, even the old MatchMaker were collecting enough stats to make fancy graphs.)
-Separate stat images/iframes for given server. (Should be easy.)
-Player registration and login. (Easy, currently MatchMaker is skipping the login dialog.)
-Teleportation using a WorldMap.
-Bind spell, skill and other stuff related functions to Lua.


Code: Select all

Version 0.4f:
-Game now uses high-resolution counters instead of timeGetTime function. Animations and scrolling should be a bit smoother. (It is, IMHO)
-Increased size of sector cache from 16 to 128 sectors. This dramatically increases loading speed and transition between game levels and maps, and when moving though vast areas. You'll notice it, believe me.
-Players are now properly disconnected when they forcefully leave the game (i.e. because ALT + F4, task kill via manager, game crash, etc.)
-It's now possible to save and load the game (with a few gotchas).
-Also you can move with the camera from Lua. Should be useful.
-It's now possible to change global vars and flags and story state from Lua.
-It's possible to scale any objects. Works both on client and server side synchronously.
-New commands: gload, gsave, gget, gset
-Added a *few* new functions:
	mmGetObjectName, mmGetObjectScaling, mmSetObjectScaling, mmCritterSetStatValue, mmCritterGetSkillValue, mmCritterSetSkillValue, mmCritterGetSkillTraining, mmCritterSetSkillTraining,  mmCritterCalculateSkillChance,
	mmCritterLookForObject, mmCritterRest, mmCritterDamageFatigue, mmCritterIsConcealed, mmCritterSetConceal, mmGetCritterMaxFatigue, mmSetCritterFatigue, mmSetCritterHealth, mmCritterBuySpell, mmCritterAddTechDiscipline, mmCritterAdjustReaction,
	mmCritterWalkToLocation, mmCritterRunToLocation, mmNPCProcessAI, mmMoveObject, mmGetGlobal, mmSetGlobal, mmSaveGame, mmLoadGame, mmGetMouseLocation. mmGetCameraLocation, mmSetCameraLocation, mmMoveCamera,
	mmCalculateDirection, mmCalculateDistance, mmObjectCalculateDirection, mmObjectCalculateDistance
	Misc: mmFindFiles, mmCopyFile, mmCreateDir.
Version 0.4g:
-Few bugfixes
-Automatic player resurrection now works
-New functions: mmIsCritterDead, mmResurrectCritter

Simply extract the downloaded .zip archive to the game directory and confirm to replace existing files.

Sending commands:
To send a command to the server, simply press the Enter key and first type a "." (i.e. dot/stop) and then name of the command and after it the parameters.

List of commands:

Code: Select all

.         - Single dot. Prints result of previous command. Useful if you are a slow reader.
..        - Two dots. Repeats previous command. Really useful.
.mmver    - Prints the version of MatchMaker that the server is running one
.mynick   - Prints your nickname. This is shorter version of your player's name
.myid     - Prints your ID. This is actually GUID and is (or should be) unique to every player
.mypos    - Prints your location/position in the map
.myip     - Prints your IP address
.mystats  - Not working
.sstart   - Prints starting location, where every player shows up when they connect to the server
.sname    - Prints server/game name
.smod     - Prints name of current module
.sstats   - Prints some stats about the server, such as total bandwidth
.admin    - Prints name of the admin
.summon   - Spawns a specified or random mobile object at given location (See the Lua script for all options)
.ammo     - Spawns specified amount of specified ammo type near your location
.gold     - Same as .ammo, but with gold
.generator- Adds a object generator to current location. Similar to .summon command, but you can also set respawn time, radius and other variables. Useful for spawning enemies.
.set .get - Sets and gets player-specific variables (NOT WORKING)
.shout    - Sends a message to the player. This message will appear above the player's head. It's also possible to set text color and duration.
.quest    - Gives you a random quest (NOT FULLY WORKING)
.joke     - Tells you a short joke
.motd     - Prints Message Of The Day
.ginfo    - Prints some information about the game (Friendly fire, auto join, etc.)
.register - Registers the player (NOT WORKING)
.login    - (NOT WORKING)
.help     - (NOT WORKING)
.lua      - Executes player's own script (NOT WORKING)
List of required parameters for those commands can be found in the lua script. (I will add it here later)

That's it. Here is a preview of new MatchMaker:

And MatchMaster:

You can see a live preview at our main webpage: http://arcanum.game-alive.com/

Here are those images with current stats:


You can put them in your signature at any forums (e.g. ArcanumClub or Terra-Arcanum) or you can simply put them on your website.
Any suggestions and ideas would be greatly appreciated.

2012/07/25 - Updated.

Re: MatchMaker2 v0.2 - Release planned

Posted: Thu Jul 19, 2012 1:52 am
by Crypton
*Most of that time was spent on researching the engine and attempts to increase server capacity. I've already patched about ~180 offsets and also had to allocate new memory and re-route all functions to work with this memory instead of buildin memory in Arcanum, because it doesn't allocate the memory for player data dynamically, but it's a static fixed sized array.

The capacity patch isn't finished yet, so it's disabled in MatchMaker. Later, it will be possible to increase the server's player capacity from 8 to 64 players and this limit is caused by size of winsock's fd_set, so it's possible to fix this as well (I've already found the offsets).

It's also possible to disable the server/first player. I've been experimenting with this for a while, and I've already managed to disconnect the server player and connect to that player slot using a different PC.

Any help with researching the engine? :D

Edit: Some new screenshots:




Re: MatchMaker2 v0.2 - Release planned

Posted: Thu Jul 19, 2012 2:03 pm
by Shadaoe
That's a great news !
I'm looking forward to playing this ! The server state save feature will be most welcome, thank you for this ! :)

Re: MatchMaker2 v0.3c - Released and Lua bound!

Posted: Wed Jul 25, 2012 1:04 am
by Xayvong
Very nice, I can't wait to test this out!

Re: MatchMaker2 v0.3c - Released and Lua bound!

Posted: Thu Jul 26, 2012 4:49 pm
by Crypton
Thank you for the support! Btw, is anyone interested in the research? I might be able to release some documentation about the multiplayer protocol and the structures it uses, if anyone wishes. You can make your own hacks and mods using it.


Re: MatchMaker2 v0.3c - Released and Lua bound!

Posted: Fri Jul 27, 2012 3:02 am
by Crypton
Btw, there is a one known bug:
-Some of the commands won't work for Server player (i.e. the one who starts the game).

So if you really want to try those new features, you better start a game on one computer and join to the game with the second computer, if you have one. I'll start dedicated server for testing purposes later, so you can also wait.

Cheers. :violin:

Re: MatchMaker2 v0.3c - Released and Lua bound!

Posted: Fri Jul 27, 2012 4:39 am
by Xayvong
I'm interested in the research Krypton!

I'd like to see if I can fiddle around with it, maybe try out some cool things. :drool:

Re: MatchMaker2 v0.3c - Released and Lua bound!

Posted: Sat Jul 28, 2012 4:31 pm
by Shadaoe
Crypton wrote: -Server state save. (Hard. I'm working on it right now. It will be possible to save and restore the whole map, like in singleplayer.)
Was it impossible to do ? :(

Re: MatchMaker2 v0.3c - Released and Lua bound!

Posted: Sun Jul 29, 2012 1:56 am
by Crypton
Shadaoe wrote:
Crypton wrote: -Server state save. (Hard. I'm working on it right now. It will be possible to save and restore the whole map, like in singleplayer.)
Was it impossible to do ? :(

it's pretty hard, though it's already possible to spawn objects using MatchMaker so some objects can be respawned from Lua after server restarts, but not whole server state.

I've stopped working on it as Saruman from ArcanumClub is already working on tool that would save and restore the whole server state. You must run Arcanum in VirtualBox to use that tool, but I don't mind as it would save me a plenty of time (I've already wasted like three days working on capacity increase patch).

Here is link to the topic with his tool:

Cheers ;)

Re: MatchMaker2 v0.3c - Released and Lua bound!

Posted: Tue Jul 31, 2012 12:14 am
by Xayvong
For some reason I can't join any games. Me and my buddy tried to connect to each other, but we couldn't. :cry:

We can see each others games, but I have no idea what isn't working right. :x

Any ideas?