maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Brainstorm (https://talk.maemo.org/forumdisplay.php?f=47)
-   -   Run a minecraft server on 'the beast' (https://talk.maemo.org/showthread.php?t=80153)

Bartcore3 2011-11-20 09:06

Run a minecraft server on 'the beast'
 
i was kinda wondering.. could i set up a minecraft server in maemo.. not client. Just x-terminal..



To try it yourself:
  • install icedtea6
  • "It's dangerous to go alone. Download this.
  • extraxt all the files from mineserver.zip
  • make a new folder /home/user/minecraft
  • move the jar-file and the entire world-folder to the folder you just made
  • move mineserver.sh to /home/user

I added a world because it can take quite a while te render a new one.. Sometimes it even takes a couple of times before it finishes.

To run it:
i don't know if this helps a lot but turn of bluetooth and your network connection (not WLAN)
  • open xterminal
  • type "
    Code:

    ifconfig
    ". Look for your ip adress where it says
    Code:

    inet adress 192.168.1.xx
  • type
    Code:

    sudo gainroot
  • type
    Code:

    sh mineserver.sh

Minecraft should begin to load.

open a minecraft client and add the IP you looked for earlier.

If you can't connect to the server because you didn't bought minecraft:
  • stop the server by typing
    Code:

    stop
  • open server.proporties with leafpad or any other text editor.
  • change online-mode=true to false
    (i suggest disabling other options like allow-nether, spawn-monsters and spaawn-animals)
  • start the server again by runnin the script


i think i said everything there is to say..
Ask questions if you have any, i'll be glad to answer them.

please realise that this is a WIP.
And if you tried it, tell me what you experienced, good or bad.
Feedback is important!

Wreck 2011-11-20 19:37

Re: Run a minecraft server on 'the beast'
 
If you install IcedTea on the N900 you can already run the official minecraft server software.
But you really need a way better phone to run a proper server. I doubt the n900 could even render the map fully. (Even with a modified server)


Edit: Opencraft is a worldeditor?

Bartcore3 2011-11-20 23:07

Re: Run a minecraft server on 'the beast'
 
where can i find hat icedtea?
i'dd like to test it :)

and i don't really know what opencraft is.. they're not very clear with their explenations and i don't get it to run so..
i think it is a server and/or mapeditor

Bartcore3 2011-11-21 18:52

Re: Run a minecraft server on 'the beast'
 
Well i have some good and some bad news.

Like Wreck sugested, i installed icedtea.

the good news:
I was able to get the jar running.
It was generating a random world :D

But here is where the bad news comes in.
It didn't completely finish. :(
It stopped at about 8%. I think because we got to little RAM (damn you nokia!)

But i was so exited i directly ran craftbukkit.
I'm now looking for a lightweight server.

I'll report back soon! :cool:

ps: someone interessted in the error logfiles?

Mentalist Traceur 2011-11-21 19:03

Re: Run a minecraft server on 'the beast'
 
My Windows Vista machine with 3GB RAM lags and regularly crashes Minecraft if I play it with maximum rendering distance in the video settings.

N900 might be insanely powerful for a phone, but I highly doubt it'll be able to store all the data needed to run a Minecraft server for even one player, let alone multiple.

Bartcore3 2011-11-21 19:10

Re: Run a minecraft server on 'the beast'
 
Quote:

Originally Posted by Mentalist Traceur (Post 1126990)
My Windows Vista machine with 3GB RAM lags and regularly crashes Minecraft if I play it with maximum rendering distance in the video settings.

N900 might be insanely powerful for a phone, but I highly doubt it'll be able to store all the data needed to run a Minecraft server for even one player, let alone multiple.

i got a server running on ubuntu with only 1GB RAM.
It's still smooth with 6 players! I think it could have been even more but i got the worst network card ever.

so i think it's worth the try.. :)

Bartcore3 2011-11-21 19:44

Re: Run a minecraft server on 'the beast'
 
Crashed after 65%.. just a little more :p

Bartcore3 2011-11-21 20:07

Re: Run a minecraft server on 'the beast'
 
81%... so...close...must...reach...

Bartcore3 2011-11-21 21:15

Re: Run a minecraft server on 'the beast'
 
IT WORKS!

Playing minecraft on my portable N900 server :p so now i need to work a little on the speed and performance and stuff..

http://i28.lulzimg.com/78be9a77f1.png

zdanee 2011-11-21 23:01

Re: Run a minecraft server on 'the beast'
 
IMHO Minecraft as a game should be playable on an i486, it is just horribly unoptimized. An average Minecraft map is 128x128x128 that is 2MB uncompressed, I think Duke Nukem had bigger map sizes.

Dotblank 2011-11-22 00:58

Re: Run a minecraft server on 'the beast'
 
Its is very possible to run a minecraft server on the phone, I would not recommend using the official client.

I would instead port craftd or use a third party server

Mentalist Traceur 2011-11-22 02:28

Re: Run a minecraft server on 'the beast'
 
Quote:

Originally Posted by zdanee (Post 1127075)
IMHO Minecraft as a game should be playable on an i486, it is just horribly unoptimized. An average Minecraft map is 128x128x128 that is 2MB uncompressed, I think Duke Nukem had bigger map sizes.

An average minecraft map is what? How far have you traveled, or when was the last time you played? Actually, what version of Minecraft are we discussing here? The free original version, or the current purchasable one?

In the current Minecraft, maps 'infinitely' generate (at one cube = one meter, you can travel more than the equivalent of the surface of the earth by several orders of magnitude before the game engine will start having issues.

An average minecraft 'chunk' is, if I recall correctly. 64x64x128, so 4 of those fit within what you called a map. A server will generate new terrain dynamically (derived from the seed you give the map) as you explore outside of the terrain generated so far. And then keep in RAM terrain within 10 'chunks' of the player (I don't know if that's circular, rectangular, or whatever).

Now, that's the default server and I suspect that stuff is configurable, of course, in most servers.

Of course, if you're talking about the classic Minecraft that's currently free-to-play, I have no clue what map size that thing has, though I do know the 'infinite' maps feature was added after classic Minecraft was detached from the current Minecraft.

- Edit -

Oh, right, OP: Awesome that you got it working. By "work on performance and stuff" how exactly is it performing now? Playable, or just completely lagfest-like?

Bartcore3 2011-11-22 07:57

Re: Run a minecraft server on 'the beast'
 
Quote:

Originally Posted by zdanee (Post 1127075)
IMHO Minecraft as a game should be playable on an i486, it is just horribly unoptimized. An average Minecraft map is 128x128x128 that is 2MB uncompressed, I think Duke Nukem had bigger map sizes.

The minecraft world map is almost 2 MB when it's generated. But as soon as you start exploring and building it can quickly reach 6 or even 13MB.

But the size of the savefile has no importance.
The total size of minecraft (client) is just under 6MB but it uses almost 1GB of RAM.
It uses alot more recources tan Duke Nukem.



Quote:

Originally Posted by Mentalist Traceur (Post 1127132)
And then keep in RAM terrain within 10 'chunks' of the player (I don't know if that's circular, rectangular, or whatever)

Its rectangular. Sometime if you wander around you suddenly see a big rectangular hole in the ground (should be fixed in the current versions) That was a chunk that feiled to load.

Quote:

Originally Posted by Mentalist Traceur (Post 1127132)
By "work on performance and stuff" how exactly is it performing now? Playable, or just completely lagfest-like?

I can run around :D
bluiding is no problem either. Though if i set a block, after approx 20 sec it dissapears but reapears a fraction of a second later.

Haven't been able to destroy a block yet. I guess it's because of the lag.
This is the only problem i got (so far)

could i run this better if i installed the power user kernel?

(stupid question.. let me rephrase)
Should i install the power user kernel to overclock this son of a b****?
or maybe someone with the powerkernel to test it?

And before i forget, i'm running the default server( 1.0.0 - it's finally out of beta)

Estel 2011-11-22 08:44

Re: Run a minecraft server on 'the beast'
 
While Mentalist got point here, I also can't disagree, that minecraft is horribly unoptimized. Of course, comparing it to Duke Nuken is far too stretched, but - putting random numbers of course - I think that resource usage should be 3-4 times lower than current one.

I must admit - I'm not Minecraft player/fan, but I was interested in the project as curiosity (mainly, infinite world generator). For using on N900, i also strongly recommend trying (Open Source!) unofficial servers. Most of the time, what Minecraft offer officially, is worst version possible, compared to modified/rewritten ones. Basically, Minecraft created got "fame" of being hard-head one, not very cooperative on including ideas/optimizations/fixes by other people (thus, so many forks/rewrites).

I got strange feeling, that - using alternate servers - it's possible to host quite effective server on N900 ;) Still, it's rather a curiosity. It's pity, that OpenGLES port isn't possible (for now).

/Estel

Soulaxe 2011-11-23 03:12

Re: Run a minecraft server on 'the beast'
 
Bump, check my posts it might help

Mentalist Traceur 2011-11-23 06:41

Re: Run a minecraft server on 'the beast'
 
Yeah, I have never used Java on the N900 but I have IcedTea installed on both of mine (at least one for sure, if not on the other one than I need to fix that).

Both run powerkernel and the non-phone one is overclocked, so I COULD test for you. Honestly though, I'm pretty confident CPU speed isn't the bottleneck - the RAM probably is. But I'm willing to experiment. I'd need instructions though, as I'm much too lazy and time pressed to do the actual thinking involved. :P

Oh, and I by no means wished to disagree with the idea that Minecraft is unoptimized - just being Java seems to me to be inherently inefficient. But I'm sure there's serious memory flaws here or there.

Either way, definitely better to install a lighter server. If you can't break blocks you'd probably die horribly in multiplayer survival mode, since even on an otherwise almost completely lagless server, I find killing creepers in melee combat is impossible without them blowing up in your face - where-as it's extremely easy in singleplayer survival.

Soulaxe 2011-11-23 08:12

Re: Run a minecraft server on 'the beast'
 
Why not just give Minetest a try? On a 5yr old laptop it outpreforms minecraft by twice the speed. It plays like Minecraft's creative mode and has a multiplayer mode also. So instead of porting the heavyweight Minecraft, have a go a porting Minetest-c55, though irrlicht(?) 1.7 is required to be ported.

Bartcore3 2011-11-23 09:02

Re: Run a minecraft server on 'the beast'
 
Quote:

Originally Posted by Mentalist Traceur (Post 1127686)
If you can't break blocks you'd probably die horribly in multiplayer survival mode, since even on an otherwise almost completely lagless server, I find killing creepers in melee combat is impossible without them blowing up in your face - where-as it's extremely easy in singleplayer survival.

Well i have to tell you, i didn't even dare to turm on the mobs yet :D
i turned of all mobs because they use memory to..

I'm in class for the moment and i'm pretty loaded with lots of homework so i won't be able to work on it every day, but my next "objective" is to find a lightweight server to run on the N900..

i'll try to describe how i did it later today so others can test it.

Oh and there is one more thing i'dd like to tell you guys.
i'm not a developper or crazy man. I'm just a guy with basic linux, windows knowledge so don't expect miracles from my side :D

zdanee 2011-11-23 10:37

Re: Run a minecraft server on 'the beast'
 
Quote:

Originally Posted by Bartcore3 (Post 1127183)
The minecraft world map is almost 2 MB when it's generated. But as soon as you start exploring and building it can quickly reach 6 or even 13MB.

But the size of the savefile has no importance.
The total size of minecraft (client) is just under 6MB but it uses almost 1GB of RAM.
It uses alot more recources tan Duke Nukem.

Calculated the 128^3 size from the 2MB map size. I myself rarely play minecraft (because it is highly addictive and I have a life to live :) ), so yes, I was talking about something I don't know about. I know however, that in 1996 the TES: Daggerfall was a full 3D game with an explorable area greater than the UK, running on an Pentium with barely 40MB of RAM, so IMHO Minecraft with its graphics so close to the '90s games should be able to pull the same trick.
I think the main problem with Minecraft is the fact that it is written in JAVA. I imagine (again I don't know for sure) that each block is an object w private data of its position, orientation, texture, whatever, so it is waaay more than 1byte / block, hence the big memory consumption. Also, easy to write the code, but horrible to render the graphics. Last time I checked JAVA was awful with memory handling. I also guess that there is no 3D-acceleration in the game. Fact is that my Core i5 machine while does not lag, uses 100% CPU while running the free beta, that should never happen with a game. A C++ rewrite and the use of 3D accelerators should make this game run smooth on any machine.
So again, I admit I'm not the hardcore Minecraft fan, but given what I see this is the problem with the game and is why I said it should run on an i486. :cool:

Bartcore3 2011-11-23 10:43

Re: Run a minecraft server on 'the beast'
 
in addition to what you said:
Daggerfall had a premade map where-as minecraft renders random maps itself.. But once they'r created it should use less RAM, i agree on that.

Bartcore3 2011-11-23 10:55

Re: Run a minecraft server on 'the beast'
 
by the way, does anyone know where i can find a good thread about scripting on maemo?
I only get permission denied and i can't seem te find a good thread on TMO..

don_falcone 2011-11-23 11:51

Re: Run a minecraft server on 'the beast'
 
Loading random generated low-poly dungeons etc. in an engine which was optimized for the machines of those days vs. Minecraft's still inefficient voxel chunk loading... Sure, "they" included some better ways to do things (like the map save format which came from the community, the OpenGL culling etc.) during the last year or so but Java as well as "voxels" playing the main resource hogs here. Ok, not voxels in the true sense, but no polygons either.

Or why do you think that the height limit of Minecraft maps is still 128 blocks? A greater limit is not introduced from the fact that world updates would then be a**-slow in the current implementation / engine.

zdanee 2011-11-23 12:05

Re: Run a minecraft server on 'the beast'
 
My point exactly. Minecraft is written so it is easy on the coder, but performs awfully. It should be optimized, so it is easy on the machine even if it means more work to the coder. A good idea alone is not enough, you cannot say, that todays raw processing power in enough to run a badly written game so why optimize? Just think about how much energy this game wastes if 1 million people plays it on a 500W desktop with 100% CPU (yes, that think green crap).
As for Daggerfall it was extremely well written considering the age it came out, and the resources it had to work with (yes I know it had some annoying bugs), even if it had to generate most of the places, Minecraft just does the same, no excuses here.

Bartcore3 2011-11-23 12:37

Re: Run a minecraft server on 'the beast'
 
Quote:

Originally Posted by zdanee (Post 1127804)
(yes, that think green crap)

http://s3.amazonaws.com/ragefaces/b6...fe98a42823.png

zdanee 2011-11-23 13:13

Re: Run a minecraft server on 'the beast'
 
http://img15.imageshack.us/img15/7125/minecraftf.jpg

Mentalist Traceur 2011-11-23 17:01

Re: Run a minecraft server on 'the beast'
 
Quote:

Originally Posted by zdanee (Post 1127766)
Calculated the 128^3 size from the 2MB map size. I myself rarely play minecraft (because it is highly addictive and I have a life to live :) )

A wonderful choice. The main reason I'm barely on this forum as of late? Minecraft. F'ing game just demands to be played.

Quote:

Originally Posted by zdanee (Post 1127766)
I think the main problem with Minecraft is the fact that it is written in JAVA. I imagine (again I don't know for sure) that each block is an object w private data of its position, orientation, texture, whatever, so it is waaay more than 1byte / block, hence the big memory consumption. Also, easy to write the code, but horrible to render the graphics. Last time I checked JAVA was awful with memory handling. I also guess that there is no 3D-acceleration in the game. Fact is that my Core i5 machine while does not lag, uses 100% CPU while running the free beta, that should never happen with a game. A C++ rewrite and the use of 3D accelerators should make this game run smooth on any machine.
So again, I admit I'm not the hardcore Minecraft fan, but given what I see this is the problem with the game and is why I said it should run on an i486. :cool:

Yeah, I'm with you on the Java thing. Honestly, if you ask me everything should be coded in C (though not C++ or other derivative Cs - I mean hardcore C where you don't get to have a string variable because char arrays are sufficient and have to consciously pay attention to where every single byte of memory you're using goes, and OOP doesn't happen).

Anyway, yes, Java's probably to blame largely.

On the other hand, given the way the game works, I think it has to keep track of the position of every single block. And I believe you guessed right - every block has position data, at least some (I suspect all) have facing data, and a block-ID (and then that's how they determine textures and other block properties. So at least that's not stored for every single block individually).

Bartcore3 2011-11-23 20:53

Re: Run a minecraft server on 'the beast'
 
Look at the 1 post.
;)

I put a script in it as well.
It will free up some memory before starting the server.

(to know how much free memory you have type this in xterminal
Code:

free
The last number under free is the important one :)

well, it's been an exhausting day for me so i'll jump right into my bed and fall asleep until forever...
Goodnight ;)

Soulaxe 2011-11-23 21:57

Re: Run a minecraft server on 'the beast'
 
http://memegenerator.net/cache/insta...5/11618167.jpg

But seriously: Minetest-c55 a opensource equivalent to Minecraft in programmed using C++ and irrlicht

Bartcore3 2011-11-23 22:29

Re: Run a minecraft server on 'the beast'
 
i'm so sorry soulaxe! i'm not ignoring you.
Been so busy i forgot to answer you..

i did take a look at minetest-c55. Even downloaded and played for a minute.. is it compatible with mojangs minecraft? Because i think they're 2 completely different games though they look the same.

What i planned to make was a server to play minecraft on, because lots of people play that game. And i'm not quite sure many others know minetest...

i hope you get what i'm trying to tell.. My english is good but not great :p

Bartcore3 2011-11-25 09:56

Re: Run a minecraft server on 'the beast'
 
seems like nobodys interested :p

zdanee 2011-11-25 10:02

Re: Run a minecraft server on 'the beast'
 
Quote:

Originally Posted by Bartcore3 (Post 1128793)
seems like nobodys interested :p

I would be in minetest. C++ sounds better suited for N900 than Java. Icedtea works it is almost as fast as my C=64 was :)

don_falcone 2011-11-25 10:43

Re: Run a minecraft server on 'the beast'
 
Quote:

Originally Posted by Mentalist Traceur (Post 1127942)
A wonderful choice. The main reason I'm barely on this forum as of late? Minecraft. F'ing game just demands to be played.


Yeah, I'm with you on the Java thing. Honestly, if you ask me everything should be coded in C (though not C++ or other derivative Cs - I mean hardcore C where you don't get to have a string variable because char arrays are sufficient and have to consciously pay attention to where every single byte of memory you're using goes, and OOP doesn't happen).

Anyway, yes, Java's probably to blame largely.

On the other hand, given the way the game works, I think it has to keep track of the position of every single block. And I believe you guessed right - every block has position data, at least some (I suspect all) have facing data, and a block-ID (and then that's how they determine textures and other block properties. So at least that's not stored for every single block individually).

http://notch.tumblr.com/post/7799649...eresting-email
http://notch.tumblr.com/post/3746989...eration-part-1
http://clockworkcodex.blogspot.com/2...-strategy.html
http://www.minecraftforum.net/topic/...ring-tutorial/
http://www.minecraftwiki.net/wiki/Far_Lands
http://www.minecraftwiki.net/wiki/Data_values

Mentalist Traceur 2011-11-25 18:33

Re: Run a minecraft server on 'the beast'
 
Ummm... I'm not sure what the point is? And why that's stated as a response to my post?

I got the chunks wrong, I thought they were bigger than 16x16x128.

From your second link:
"If you go outside that range (about 25% of the distance from where you are now to the sun), loading and saving chunks will start overwriting old chunks. At a 16/th of that distance, things that use integers for block positions, such as using items and pathfinding, will start overflowing and acting weird."

That's basically what I said - you could go several orders of magnitude farther than the surface of the earth, before the game engine will start having problems. Now, I'm not sure what [distance-between-earth-and-sun]/64 is, but I am pretty sure it fits my approximation of "several orders of magnitude more than the surface of the earth".

If you're just illustrating that on top of Java being a bad influence on the optimization, there's also lack of proper optimization work done by Minecraft devs, I never denied that either.

"Far Lands" got fixed a while ago btw.

I appreciate some of those links because they're informative, but I just don't get what you're getting at?

don_falcone 2011-11-26 12:27

Re: Run a minecraft server on 'the beast'
 
How the blocks are organized and the rendering is done? --- "i think it has to keep track of every single block's position"

Bartcore3 2011-11-27 21:40

Re: Run a minecraft server on 'the beast'
 
Didn't have much time to play wit the minecraft.. i was playing with the transition.ini and eventually i resized my entire screen to 1 pixel xD

Soooo no it's flashed and i should try not to tweak to much.. for now

Back to minecraft!

Soulaxe 2011-11-27 22:18

Re: Run a minecraft server on 'the beast'
 
Quote:

Originally Posted by Bartcore3 (Post 1128144)
i'm so sorry soulaxe! i'm not ignoring you.
Been so busy i forgot to answer you..

i did take a look at minetest-c55. Even downloaded and played for a minute.. is it compatible with mojangs minecraft? Because i think they're 2 completely different games though they look the same.

What i planned to make was a server to play minecraft on, because lots of people play that game. And i'm not quite sure many others know minetest...

i hope you get what i'm trying to tell.. My english is good but not great :p

Don't worry, I understand what you're implying. I believe I may have heard an instance of someone using Minetest as a server for Minecraft, but it was for classic and not any alpha/beta revisions.

However, as nice as it would to have Minecraft running on the N900, the game would run too sluggish. Whilst going for a C++ or C equivalent language would prove better in choice of spending time to port. It's aleady on the Open Pandora i.e. its on hardware very similar to the N900's.


All times are GMT. The time now is 05:14.

vBulletin® Version 3.8.8