New build 20110430 posted… with a user database

This release is required to connect to the public server since there is now a more formalized account login. Don’t worry, accounts are still free. :slight_smile:



Get it in the usual place:

http://www.mythruna.com/mediawiki/index.php?title=Engine_Test_Build



Change log is here:

http://www.mythruna.com/mediawiki/index.php?title=20110430_Release_Notes



Highlights:

  • By far the most significant are the user accounts. Each Mythruna server now has an internal json-based database. Users can create and use accounts on a per-server basis and it will remember stuff about them. This is the prerequisite for lots of other stuff.


  • The background geometry builder thread system has been changed to use more than one thread for multi-CPU system. I currently have this clamped to a max of 2 pending testing. If you notice better performance, and/or noticeably new stutters as you walk around then let me know.


  • Shift key now runs… though technically the player was always jogging.


  • Chat text is now shadowed to improve readability over light backgrounds.


  • Chat text word wraps if it is longer than the screen and adheres to embedded line feeds if they exist in the text (though you can’t actually type text that way but other things can).


  • Improved the resolution of collision detection to hopefully eliminate dropping through the floor.


  • Added a /set command to the console that can be used to manually set options. Currently, the only significant one is opts.rotationSpeed… which controls mouse sensitivity.


  • A crash no longer leaves the game running in the background, hanging around.

what is json-based database?

JSON is a sort of web-friendly data format. http://json.org/



I use it as the basis for a database because it’s compact and really flexible. So each user has their own .json file that contains all of their stuff. It’s nice for this kind of embedded database because it’s human-readable also.



This is my “record”:



[java]

{

“id” : 0,

“createTime” : 1304157822953,

“characterInfo” : {

“name” : “Paul”,

“lastLocation” : {

“z” : 65.74123,

“y” : 918.1509,

“x” : 391.34537

}

},

“stats” : {

“lastLogin” : 1304159696171,

“lastAddress” : “/192.168.0.4:4941”,

“lastDisconnect” : 1304164024812,

“timesLoggedIn” : 2,

“blocksChanged” : 42

},

“userInfo” : {

“email” : “pspeed at guess where”,

“userId” : “pspeed”,

“password” : “940a61dcf02df53283e59d58e01864f3”

},

“dbVersion” : 1

}[/java]



And in code, I have an expression processor so I can just player.set( “userInfo.userId”, “foo” ) or player.increment( “stats.timesLoggedIn” ) and then just player.save().



Super convenient and the bulk of the functionality is from other open source projects.



It wouldn’t handle huge databases because the master player ID index would get too large, but for something like a mythruna server, it’s perfect.

Hi Paul. :slight_smile:

One question from my side, why don’t you use MySql or any other relational db for database?

Thanks! :slight_smile:

I guess because its easier not to have to run a db etc. in the background (especially on the user computer when he runs a server). Users don’t log in all the time so just using a file will probably perform as well as any database could.

^^^ Yeah, what he said.



A database requires a user to install something. It also means I have to have a schema, etc. and that if a server user needs to tweak something that they have to be aware of database tools and so on.



With the json database, maintenance is trivial and can be done with notepad. Also there is nothing to preinstall, you can download the mythruna distro and run your own server…just like that.



I think this DB will scale up to a few thousand user accounts without even blinking… which is probably enough for most peoples’ servers.

Sadly not working on my notebook, too.

I realy love that you have nothing to install to run the game, please leave it that way!

Are the miniblocks already back in the multiplayer?



I’ll try out your new version this evening, luckily I have 2 pcs :smiley:

caesar said:
Sadly not working on my notebook, too.


Yeah, I'm afraid I didn't get to rearranging the post-processing initialization. There's funky ju-ju going on there... and I just need to add the post-proc effects during app startup instead of later when my game state is initialized. JME just doesn't like it very much.

caesar said:
I realy love that you have nothing to install to run the game, please leave it that way!


:) Thanks... though it was really the server piece we were talking about. But yeah, running a server should be easy... and it really is, right now.

caesar said:
Are the miniblocks already back in the multiplayer?

I'll try out your new version this evening, luckily I have 2 pcs :D


Not yet. I had to get user accounts working and then got pulled away to my day job. Before I get full on into physics, I have to re-enable some things on the network side that the miniblock objects are the perfect test for... so they will probably be in the next version... assuming I don't just put out a bug fix release before then.

Hey there.

Where are my account informations stored at? Cause I was not able to type the @ of my email adress into the field when I created an account to join your server (have a german keyboard) I just typed in AT instead of @. So I think you have to replace that manually in the file on the server, if it is stored there.

hihi,



I tried the last versions and my performance is not so good … max 4 fps … this should not be normal right?

The system is a intel dual core 2.6 GHz with 2 GB ram.



regards

andreas

[http://www.ahoehma.de]

[http://code.google.com/p/bloxel/]

caesar said:
Hey there.
Where are my account informations stored at? Cause I was not able to type the @ of my email adress into the field when I created an account to join your server (have a german keyboard) I just typed in AT instead of @. So I think you have to replace that manually in the file on the server, if it is stored there.


Don't sweat it. There is nothing automatic done with the e-mail addresses right now but I needed a way to verify if someone really was who they said they were if they e-mailed me for a password reset.

Since I can read it, it's fine. :)
ahoehma said:
hihi,

I tried the last versions and my performance is not so good ... max 4 fps ... this should not be normal right?
The system is a intel dual core 2.6 GHz with 2 GB ram.

regards
andreas
[http://www.ahoehma.de]
[http://code.google.com/p/bloxel/]


That's not really normal. You can try reducing the clip to minimum by hitting F12 twice. It's possible that your system just can't keep up... Mythruna is pretty brutal with geometry and textures, apparently.

I run it on my intel dual core laptop and get around 60 FPS. So it may be down to graphics card and/or drivers, too. But shortening the clip may at least make it playable.

I can confirm that.

Win 7, some old dual core, nvidia 9600 Graphics card.

50-100 frames on 1080p fullscreen.

No differences to the last build.