Cuberite Forum
MCServer Development Discussion - Printable Version

+- Cuberite Forum (https://forum.cuberite.org)
+-- Forum: Cuberite (https://forum.cuberite.org/forum-4.html)
+--- Forum: Development (https://forum.cuberite.org/forum-13.html)
+--- Thread: MCServer Development Discussion (/thread-186.html)

Pages: 1 2 3 4 5 6 7 8 9


RE: MCServer is open source! - rs2k - 10-23-2011

(10-22-2011, 10:20 AM)FakeTruth Wrote: I don't know, I haven't heard AJIeKCaHDp about that, and it seems to work fine in cygwin

I'm interested in putting some effort into this, but I'm not sure what to do at the moment.

I've just been playing around with the code. I've successfully added some mobs and items, but I'm working with two sources at the moment. I'm using FakeTruth's source for windows testing and vcnnews's modified source for linux.

I'll keep playing around with it and add the rest of the items and mobs into both sources until I can get one that works for both. lol.

I'd like to add all the protocols to get creative mode working as well. I've been able to tell the client that the server is creative to enable flying, but the client crashes when I try to pull something from the inventory. I'm pretty sure that's because protocol 0x6B is missing from mc-server.


I like minecraft, but working with the vanilla and bukkit servers really makes me want to rage and cry. They are horrible resource hogs and run slow as molasses. I REALLY dislike slow and inefficient software. I learned PHP because I was annoyed at how slow OSCommerce ran. I ended up creating a lightning fast PHP, MySQL and javascript based shopping cart that could easily support millions of products from scratch using OSCommerce as a rough guide.

Things I want to accomplish with MC-server:
Get redstone and pistons working
Enable multiple worlds
Convert minecraft worlds to MC-server worlds and vice-versa.
Finish adding mobs and improve their AI.



Hmm, I think a development thread would be a good idea. Big Grin


RE: MCServer is open source! - FakeTruth - 10-23-2011

It's really difficult to find out what's causing the client to bitch about certain things (sudden disconnects or crashes, the client is incredibly unstable).
Whenever this happens I put breakpoints in the code after certain packets have been sent, like the login procedure, or wherever you suspect something is going wrong. You can also just disconnect the client after sending a certain packet to find out which packet exactly is screwing things up. Once you find the packet, you investigate if the packet is up to date and sending the correct data. If it's out of date, you update the packet according to this page http://mc.kev009.com/Protocol If it's up to date, you log all the data you're sending out and check if it is what you expect it to be, if not, find out wtf is going onTongue


RE: MCServer is open source! - rs2k - 10-23-2011

(10-23-2011, 05:09 AM)FakeTruth Wrote: It's really difficult to find out what's causing the client to bitch about certain things (sudden disconnects or crashes, the client is incredibly unstable).
Whenever this happens I put breakpoints in the code after certain packets have been sent, like the login procedure, or wherever you suspect something is going wrong. You can also just disconnect the client after sending a certain packet to find out which packet exactly is screwing things up. Once you find the packet, you investigate if the packet is up to date and sending the correct data. If it's out of date, you update the packet according to this page http://mc.kev009.com/Protocol If it's up to date, you log all the data you're sending out and check if it is what you expect it to be, if not, find out wtf is going onTongue

haha, I've been back and forth over http://mc.kev009.com/Protocol. I'm using that as a reference to try and add some protocols. I want to be able to get creative mode working like it should and go from there.

I've got a test server up at 199.167.133.105:11111

It's a 64 bit Ubuntu 10.04 server with 16 GB RAM and a Xeon Sandy Core E3-X1230 processor. MC-server is only using around 30 - 100 MBs though. Bukkit on the other hand is using about 3GB, but is holding onto 12GB.


RE: MCServer is open source! - necavi - 10-23-2011

Excellent! I'm glad to see that opensourcing has been good for mcserverBig Grin I'll be working on some little things myself, probably, although I am on a bit of a downswing in regards to minecraft interest. I would definitely like to see a subforum specifically for development of Mc-server specifically, to run in tandem with the one regarding plugin development, just a place that people can request help regarding the code, or publish their own roadmaps and such.

Addendum: Don't forget to use the wiki! Whenever faketruth fixes and stops all of those errorsTongue


RE: MCServer is open source! - rs2k - 10-24-2011

I just download R8 on my windows box and linux box. Both compiled and are running just fine. I now have one source to work with. Big Grin


Now, how do I go about adding changes like the mobs and item's I've added? I'm also new to code sharing. All my coding has been for my own websites. lol


I'll finish adding all the mobs for now. I haven't tried Endermen yet.


RE: MCServer is open source! - FakeTruth - 10-24-2011

That's great news Smile

Also, when I get home I'm gonna try to move terrain generation to the GPU (shaders) just because I (probably) can and it's awesome xD


RE: MCServer is open source! - rs2k - 10-24-2011

(10-24-2011, 03:59 AM)FakeTruth Wrote: That's great news Smile

Also, when I get home I'm gonna try to move terrain generation to the GPU (shaders) just because I (probably) can and it's awesome xD


Sounds interesting, how would that work on a computer with no GPU?

Mobs I added:
They all spawn on land the same way spiders and chickens do right now
Cow:
(spawns during day, passive, runs when attacked, drops feathers and egg right now)
Squid:
(spawns during day, passive, runs when attacked, drops feathers and egg right now)
Pig:
(spawns during day, passive, runs when attacked, drops feathers and egg right now)
Sheep:
(spawns during day, passive, runs when attacked, drops feathers and egg right now)
Wolf:
(spawns during day, passiveaggressive, attacks back when attacked (eyes don't turn red), drops feathers and egg right now)


Slime:
(spawns during night, aggressive, attacks on sight, drops feathers and egg right now)
Creeper:
(spawns during night, aggressive, attacks on sight, drops feathers and egg right now)
Ghast:
(spawns during night, aggressive, attacks on sight, drops feathers and egg right now)
Silverfish:
(spawns during night, aggressive, attacks on sight, drops feathers and egg right now)
Skeleton:
(spawns during night, aggressive, attacks on sight, burns and dies during daylight, drops feathers and egg right now)
Zombie:
(spawns during night, aggressive, attacks on sight, burns and dies during daylight, drops feathers and egg right now)
Enderman:
(spawns during night, passiveaggressive, attacks back when attacked, burns and dies during daylight, drops feathers and egg right now)
Zombiepigman:
(spawns during night, passiveaggressive, attacks back when attacked, drops feathers and egg right now)
Cavespider:
(spawns during night, passiveaggressive, attacks back when attacked during day (only for a short time) and attacks on sight at night, drops feathers and egg right now)


To do list:
Need to limit mob spawning. Right now sitting in one spot for several minutes puts you in a very odd and ever increasing zoo of death.
Where the mobs spawn needs to change.
The squid only need to spawn in water.
The nether mobs should only spawn in nether (when added).
The mobs should also be able to spawn underground during the day.
The time based random spawn needs to change to a location aware and light level aware spawn function.

Make fire visible. Right now the mobs catch on fire during the day and burn to death, but the flames are invisible.
Projectiles also need to be added so skeletons can shoot and ghasts can fire fireballs.
The squid also need to be able to swim underwater.
The ghasts need to learn how to fly.
AI in general needs to be changed for several mobs.
Creepers need to explode instead of attack.


RE: MCServer is open source! - FakeTruth - 10-24-2011

(10-24-2011, 05:04 AM)rs2k Wrote:
(10-24-2011, 03:59 AM)FakeTruth Wrote: That's great news Smile

Also, when I get home I'm gonna try to move terrain generation to the GPU (shaders) just because I (probably) can and it's awesome xD


Sounds interesting, how would that work on a computer with no GPU?
NotTongue
Also I decided not to do this, since I only have experience programming shaders in cg, and cg needs .dll's and stuff to work which might become a problem when trying to compile for linux.


Also something to note about mobs, is that when there are a lot, the server tries to push out more data than it can send, and people start disconnecting. This is a severe issue with MCServer and I'm not sure how to fix it.
Any multiplayer game should have this issue, and also some way to prevent it, but I don't know how (yet)



RE: MCServer is open source! - rs2k - 10-24-2011

(10-24-2011, 06:51 AM)FakeTruth Wrote:
(10-24-2011, 05:04 AM)rs2k Wrote:
(10-24-2011, 03:59 AM)FakeTruth Wrote: That's great news Smile

Also, when I get home I'm gonna try to move terrain generation to the GPU (shaders) just because I (probably) can and it's awesome xD


Sounds interesting, how would that work on a computer with no GPU?
NotTongue
Also I decided not to do this, since I only have experience programming shaders in cg, and cg needs .dll's and stuff to work which might become a problem when trying to compile for linux.


Also something to note about mobs, is that when there are a lot, the server tries to push out more data than it can send, and people start disconnecting. This is a severe issue with MCServer and I'm not sure how to fix it.
Any multiplayer game should have this issue, and also some way to prevent it, but I don't know how (yet)

Yeah, I noticed that.

It happens when there are a LOT of mobs. I can't get that many mobs on bukkit, and when I try it just crashes. I think the simple way to fix it for now is to have a global limit of mobs. when a mob spawns add to a number, when a mob is removed subtract from it. If the number is reached then don't spawn.

What happens when a mob goes off the loaded world? I believe it just disappears for now. What happens in bukkit?




I REALLY like the idea of having terrain generation on a separate thread. I don't think it's like that right now. Right now when the generation starts the server doesn't really do anything BUT generate terrain. It's very fast at it, noticeably faster than bukkit/vanilla, but it still is something that shouldn't affect game play, imo.


RE: MCServer is open source! - necavi - 10-24-2011

Well, at least previously there was a 200 mob limit in minecraft, I'm not sure if it was a vanilla limit (I believe it was) but having it be that low created problems on larger servers, especially if Mob Towers were allowed, no one else would get a single mob! My question would be whether this limit is entirely based on the server itself, or the hardware running it, I would think that there would be some variance in the amount of mobs it could support with higher/lower end hardware.