Java-Gaming.org    
Featured games (79)
games approved by the League of Dukes
Games in Showcase (477)
Games in Android Showcase (107)
games submitted by our members
Games in WIP (536)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  Online RPG sidescroller, requesting tips  (Read 2011 times)
0 Members and 1 Guest are viewing this topic.
Offline 8o8inSquares

Junior Newbie





« Posted 2013-11-01 11:25:35 »

Hello guys, I am decent java coder, and I probably can write anything. There is a game I've been working on for a year and managed to create own java game engine that currently contains advanced map editor. And the game it's self (client and the server) Right now people can join and see eachother and jump together and chat. Also server sends the stats of the player like level, health etc and applies it to the client. Everything works perfectly.
So, I am asking for some tips and techniques on making mob system, (I have the mob engine in the client, it has same physics as the character but with the different speed and it walks and jumps randomly and jumps if he sees that there is another platform next to it) so what should I do to make the mob online? Should I create another server specifically for mobs? Or should I add it to the main server? will it add unwanted lag? what should I do?

(this is how it looks like [made this video loong time ago])

<a href="http://www.youtube.com/v/C5aYXUnQ61U?version=3&amp;hl=en_US&amp;start=" target="_blank">http://www.youtube.com/v/C5aYXUnQ61U?version=3&amp;hl=en_US&amp;start=</a>
Offline Dxu1994
« Reply #1 - Posted 2013-11-01 11:40:39 »

Never let the client control any mobs. You're giving the client way too much control and just asking for hackers to vacuum hack the game.

Run all mob logic on server, clients should only be treated as dummies.

Online opiop65

JGO Kernel


Medals: 153
Projects: 7
Exp: 3 years


JumpButton Studios


« Reply #2 - Posted 2013-11-01 11:43:08 »

You know everything about programming huh? Cheesy Sorry, but that's very naive to say.

No, do not add them to another server. You do know what a server is right? A program that accepts information, processes it, and then sends it to all the clients or stores it in a database or whatever it needs to do. Why would you need to add them to another server? If you have lots of clients connecting together at one time, yes you will experience some lag depending on the server you are using. Mobs should not lag the server as they should be run by the server, not the clients.

Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline 8o8inSquares

Junior Newbie





« Reply #3 - Posted 2013-11-01 13:07:43 »

nono! I was saying that so that you could think of any way of making the mobs online. And I know what server is lol, I've wrote one. Currently it reads from the ini files and sends the info to the client saying what level is he and all the stats, except for the coordinates, client sends it's coordinates to the server and server sends those to all the players that are connected. Which is another hacking possibility that I am probably willing to fix by checking the last coordinates and the new once, and how different they are. But that will add some more delay to the server maybe... Same for the mobs, (yes I know that everything should be on the server side) if I will add mobs to the server, it will give more stuff to send to the client at the end it would be a whole book from each player to send lol, so I was thinking about creating ANOTHER server and host it on the different pc that will contain everything about the mobs, so basically client will connect to the Game Server and to the Mob server so that would be much less pressure for the server.
But I wonder if there is a different way to do it? Take a maplestory mmorpg for example, how does it work? I've seen some vacuum hackers which means that the mobs on this game are on the client and server only sends which way they should walk or something
What do you think?
Offline Troubleshoots

JGO Knight


Medals: 36
Exp: 7-9 months


Damn maths.


« Reply #4 - Posted 2013-11-01 13:35:02 »

Don't use two servers. If the server can't cope, get a better server.

Why are all OpenGL tutorials written in Brainf**k?
Offline 8o8inSquares

Junior Newbie





« Reply #5 - Posted 2013-11-01 13:44:33 »

You mean write a better server? Or buy a better host?
Offline Troubleshoots

JGO Knight


Medals: 36
Exp: 7-9 months


Damn maths.


« Reply #6 - Posted 2013-11-01 13:47:55 »

I meant get a better host. By yes, you could probably also improve your code, but there's limitations for the results that that could achieve.

Why are all OpenGL tutorials written in Brainf**k?
Offline Dxu1994
« Reply #7 - Posted 2013-11-01 15:19:33 »

Don't use two servers. If the server can't cope, get a better server.

Umm, sorry but pretty much every MMO out there runs on more than one server.

The trick is to program your server logic so it can be easily paralleled between nodes. Take a look at bigWorld for example, they can handle more than 100K concurrent users distributed over tons of server nodes.

From the start you should program your server so it can be easily expanded if need be. For example, in my MMO Renoria, the server works like this:

1. Central Server (Main command server, controls communication between all nodes and controls security and acts as a pipe between nodes)
2. Login Server (Authentication server, controls user login and transition into one of the game server nodes).
3. Game Server (Actual server where the game is played. Handles everything in game, from movement, to attacks, to trading, to banning etc)
4. Game Server Node (Node attached to the game server, to offload any potential work that may lag the game server itself. Any amount of these nodes can be started and stopped at any time without affecting the game itself. This is only to load balance the game server).
5. Database Server (This server controls all the database transactions, and I use a MySQL cluster in Renoria).
6. Admin server (Server controls connections to RMT (Management tool) and the iOS/Android app used as a remote control for the server. Will provide constant updates to server load, player capacity, etc).
7. Cheat/Security server (This server logs all the cheating entries and broadcasts warnings about possible cheaters to the game masters. Will send constant updates on cheating thresholds attached to players).

All these servers register with the central server and once registered through the central server they may communicate with any other node by sending a request to the central server.

Offline Troubleshoots

JGO Knight


Medals: 36
Exp: 7-9 months


Damn maths.


« Reply #8 - Posted 2013-11-01 15:37:57 »

Don't use two servers. If the server can't cope, get a better server.

Umm, sorry but pretty much every MMO out there runs on more than one server.

I was unclear. I meant not to use two servers for his current situation. The mobs should be handled on the same server as the players and items, etc. if they're going to interact.

Why are all OpenGL tutorials written in Brainf**k?
Offline Dxu1994
« Reply #9 - Posted 2013-11-01 16:02:36 »

Don't use two servers. If the server can't cope, get a better server.

Umm, sorry but pretty much every MMO out there runs on more than one server.

I was unclear. I meant not to use two servers for his current situation. The mobs should be handled on the same server as the players and items, etc. if they're going to interact.

Ahh okay. Yep you're right, all game logic should be handed within the same server, but if he wants to be serious about it he should create some dynamic GameServer nodes to offload work to when the need arises. Smiley

Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Online opiop65

JGO Kernel


Medals: 153
Projects: 7
Exp: 3 years


JumpButton Studios


« Reply #10 - Posted 2013-11-01 19:47:05 »

@Dxu1994 I understand that. Obviously an entire game doesn't run on one server, but OP I thought OP was asking if he should run mobs and the actual game on two different servers, which is not even a good idea. Players should have a client which connects to a game server which processes input and other game stuff. Clients should send player positions, item info etc... I thought OP was asking if mobs should run on a separate server than the main game server.

And I agree, offloading work to a separate server is a good idea, just make sure you have a good high speed connection between the two or the clients will notice higher jittery movement in the mobs. But honestly, if you're paying for a server, which is a good bit of money per month, you should have a good enough server to host a few players and a decent amount of mobs. Think about Minecraft and how people host their own servers. I personally only ever hosted around 10 people at a time, and I have a decent computer (8gb DDR3, pretty good download and upload times, fx4100 which is ok), and I could play at the same time and no one on my server experienced major lag at all. Now consider Minecraft has to check lots of mobs and player positions etc... Every few frames, and it runs fine still. So unless you're trying to run almost a hundred clients at once, you should be fine with checking for illegal movement, mob positions, world updates etc...

Offline 8o8inSquares

Junior Newbie





« Reply #11 - Posted 2013-11-01 21:32:22 »

Dxu1994, thanks, that's what I wanted to hear, I just wasn't sure about the logic of multiple servers because that's my first online game I am working on, and I am serious about that, been working on it for a year and not willing to quit. But for now I am aiming this game for 50 people, it's not gonna be MMO right away. It will depend on the interest of the players and the cash that it will bring to get serious hosting gear.

I guess I am gonna start working on the mob server so in the future I wont have to do it.
Pages: [1]
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

Riven (20 views)
2014-07-29 18:09:19

Riven (13 views)
2014-07-29 18:08:52

Dwinin (12 views)
2014-07-29 10:59:34

E.R. Fleming (31 views)
2014-07-29 03:07:13

E.R. Fleming (12 views)
2014-07-29 03:06:25

pw (42 views)
2014-07-24 01:59:36

Riven (42 views)
2014-07-23 21:16:32

Riven (28 views)
2014-07-23 21:07:15

Riven (29 views)
2014-07-23 20:56:16

ctomni231 (60 views)
2014-07-18 06:55:21
HotSpot Options
by dleskov
2014-07-08 03:59:08

Java and Game Development Tutorials
by SwordsMiner
2014-06-14 00:58:24

Java and Game Development Tutorials
by SwordsMiner
2014-06-14 00:47:22

How do I start Java Game Development?
by ra4king
2014-05-17 11:13:37

HotSpot Options
by Roquen
2014-05-15 09:59:54

HotSpot Options
by Roquen
2014-05-06 15:03:10

Escape Analysis
by Roquen
2014-04-29 22:16:43

Experimental Toys
by Roquen
2014-04-28 13:24:22
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!