Java-Gaming.org    
Featured games (79)
games approved by the League of Dukes
Games in Showcase (477)
Games in Android Showcase (106)
games submitted by our members
Games in WIP (533)
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  
  Multiple Entity Interaction in a MMORPG  (Read 2349 times)
0 Members and 1 Guest are viewing this topic.
Offline deltahat

Senior Newbie




Current project - Venture Capital


« Posted 2003-09-02 03:53:16 »

Hello all,
I need some help. I am working on creating a tile based, sprite based MMORPG engine. Think MMO Zelda. My system is three teared, with a client, a transaction server, and a database for persistence. I have come to the part where I need to handle player movement. Whenever a player moves, other players in the same zone need to be notified so they can draw the changes properly. Now, I was thinking, if every time an entity moved (player or NPC) all players were notified, the bandwidth would quickly add up, so I came up with the following idea:

A data structure will be maintained for each zone that stores the position of each active entity (player and NPC). Each active will have a list of other actives within its "square of influence" (a few grid squares past the edge of the screen). Whenever an active moves, it will first drop any references that have left the square of influence, then acquire any new references that have entered the square on influence, and finally notify all references within the square that the move has been made so they can update their respective client displays. This system works based on the assumption that active A can "see" active B if and only if B can "see" A. This data structure could also be extended to allow the passing of communication messages to everyone on the screen.

Does this all make sense? Am I on the right track? Thanks,
Delta.
Offline sugarshark

Junior Member




Sugar to the sharks.


« Reply #1 - Posted 2003-09-02 09:03:27 »

This is actually quite a common method to do it.
Google for 'aura nimbus sphere'.

I used to think that the brain was the most wonderful organ in my body.  
Then I realized who was telling me this.
-- Emo Phillips
Offline blahblahblahh

JGO Coder


Medals: 1


http://t-machine.org


« Reply #2 - Posted 2003-09-02 09:05:18 »

Quote
Hello all,
Now, I was thinking, if every time an entity moved (player or NPC) all players were notified, the bandwidth would quickly add up, so I came up with the following idea:


This is a big problem that is the subject of a lot of active research. Like most of MMOG development, it's always a case of tradeoffs - PC's these days are still far too puny to handle MMOG's without a lot of compromises.

Quote

A data structure will be maintained for each zone that stores the position of each active entity (player and NPC). Each active will have a list of other actives within its "square of influence" (a few grid squares past the edge of the screen). Whenever an active moves, it will first drop any references that have left the square of influence, then acquire any new references that have entered the square on influence, and finally notify all references within the square that the move has been made so they can update their respective client displays.


This will certainly work. However, 99% of the approaches to MMOG development "work"; it's just they break whenever e.g. "more than X players in the game", either because the algorithm uses too much memory or too much CPU.

If you want advice on what algo to use for this task, you need to sit down and very carefully think about your requirements first. You haven't, for instance, told us the most important thing of all - which is the max number of players that any given player will ever be able to "see". Equally, we'd need to know what limit you're going to place on the number of players in your game.

The algo itself is perfectly good...indeed it sounds just like one that I think Ensemble Studios (Age of Empires people) proposed - although they suggested a more generic system that enabled an RTS to constantly update info in multiple different dimensions (e.g. "Line of Sight + FoW", "Pathfinding", "desirable locations", etc). The aim was to provide a system that had a high cost per unit-movement, but a very very low cost per query - so that units could calculate e.g. whether they could see another unit almost instantly. Works particularly well when you have many more units "looking" at the map/data than are moving.

Quote

This system works based on the assumption that active A can "see" active B if and only if B can "see" A. This data structure could also be extended to allow the passing of communication messages to everyone on the screen.


Actually, it makes a lot more assumptions than that, mainly to do with performance, relative numbers of moving objects, etc etc. Hopefully what I've mentioned above gives you a small taste of this?

To be honest, I hope you aren't really attempting an MMOG unless you've got a large team or financial backing or something Smiley. You'd be much better off doing a 16-player or 64-player or etc game. MMOG development is really really really hard, and although it's certainly within the reach of anyone, there's a lot of specialist stuff you have to learn in order to make your game work OK (in addition to getting all the standard things from game development right - graphics, sound, networking, collision detection, AI).

If you (or anyone else) really want to work on an MMOG, I'd suggest getting involved with WorldForge.org (Open Source MMOG development). They've been going for about 6-7 years, and have developed lots of technology for MMOG game development. The main benefit of getting involved is learning all about MMOG development from people who have been working through the issues for years. The main problem is that it's OpenSource, so people come and go, and there's a very large number of people with little or real understanding of MMOG technical problems at any one time. On the plus side, they have something like 50+ talented artists constantly churning out graphics for use in any WorldForge-based game (and it's OS, so you can go ahead and start a new game based on their tech).

malloc will be first against the wall when the revolution comes...
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline deltahat

Senior Newbie




Current project - Venture Capital


« Reply #3 - Posted 2003-09-02 20:14:18 »

Other ommited specifications:
Max number of people per zone: approx 500
Max number of people on screen at once: approx 75

I am writing this system singlehandedly for learning purposes. I have no illusions of creating the next SWG. Since I have started, I have learned a ton about threads and synchronization, the full screen graphics API, java sound, TCP/IP, protocal design, object serialization, JDBC, and SQL.
Offline endolf

JGO Coder


Medals: 7


Current project release date: sometime in 3003


« Reply #4 - Posted 2003-09-03 00:13:16 »

Ditto, I think alot of people are in your position, it's done as a learning experience, sometimes learning for the sake of it, there is no way we could compete, especially on the graphics front, they have teams for gl/dx guru's, and we are learning. But what a learning experience it is, and there is always something to play with when you get a bit done Smiley

Endolf

Offline blahblahblahh

JGO Coder


Medals: 1


http://t-machine.org


« Reply #5 - Posted 2003-09-03 00:33:59 »

Quote
Ditto, I think alot of people are in your position, it's done as a learning experience, sometimes learning for the sake of it, there is no way we could compete, especially on the graphics front, they have teams for gl/dx guru's, and we are learning. But what a learning experience it is, and there is always something to play with when you get a bit done Smiley


So try http://worldforge.org/ . It's a fine place to learn. OTOH, unless you've already done a game, there is the advice frequently repeated here: "Start with a simple game. Get it finished....".

malloc will be first against the wall when the revolution comes...
Offline deltahat

Senior Newbie




Current project - Venture Capital


« Reply #6 - Posted 2003-09-03 03:08:11 »

Quote


"Start with a simple game. Get it finished....".


Absolutly. Here are some of my prior works.
www.nukesoft.org
Offline endolf

JGO Coder


Medals: 7


Current project release date: sometime in 3003


« Reply #7 - Posted 2003-09-03 08:53:38 »

Hmm, you see normally I would agree with that comment, but having made the one above, I think i need to think of some justifications Smiley. If you are after learning lots of parts of the system, getting envolved with an existing project probably isn't the best way to go, I find the best way for me personally to learn, is to do it, make mistakes, learn from them, so unless they are going to let you rewrite everything, I wouldn't get the coverage I can by doing a smaller project myself. Starting small means that you get somethng done. This is very true, unless you are willing to plug at it for aaaaaaaages with little or no visible results, you will get disheartened quite quickly on a huge project like an MMOG, maybe start with a few less players in mind was the best advice, lets face it, if it ever becomes really popular, you will have the cash/team to be able to add the extra M to you MOG Smiley

Endolf

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.

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

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

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

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

ctomni231 (50 views)
2014-07-18 06:55:21

Zero Volt (45 views)
2014-07-17 23:47:54

danieldean (36 views)
2014-07-17 23:41:23

MustardPeter (39 views)
2014-07-16 23:30:00

Cero (54 views)
2014-07-16 00:42:17

Riven (54 views)
2014-07-14 18:02:53
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!