• Announcements

    • khawk

      Download the Game Design and Indie Game Marketing Freebook   07/19/17

      GameDev.net and CRC Press have teamed up to bring a free ebook of content curated from top titles published by CRC Press. The freebook, Practices of Game Design & Indie Game Marketing, includes chapters from The Art of Game Design: A Book of Lenses, A Practical Guide to Indie Game Marketing, and An Architectural Approach to Level Design. The GameDev.net FreeBook is relevant to game designers, developers, and those interested in learning more about the challenges in game development. We know game development can be a tough discipline and business, so we picked several chapters from CRC Press titles that we thought would be of interest to you, the GameDev.net audience, in your journey to design, develop, and market your next game. The free ebook is available through CRC Press by clicking here. The Curated Books The Art of Game Design: A Book of Lenses, Second Edition, by Jesse Schell Presents 100+ sets of questions, or different lenses, for viewing a game’s design, encompassing diverse fields such as psychology, architecture, music, film, software engineering, theme park design, mathematics, anthropology, and more. Written by one of the world's top game designers, this book describes the deepest and most fundamental principles of game design, demonstrating how tactics used in board, card, and athletic games also work in video games. It provides practical instruction on creating world-class games that will be played again and again. View it here. A Practical Guide to Indie Game Marketing, by Joel Dreskin Marketing is an essential but too frequently overlooked or minimized component of the release plan for indie games. A Practical Guide to Indie Game Marketing provides you with the tools needed to build visibility and sell your indie games. With special focus on those developers with small budgets and limited staff and resources, this book is packed with tangible recommendations and techniques that you can put to use immediately. As a seasoned professional of the indie game arena, author Joel Dreskin gives you insight into practical, real-world experiences of marketing numerous successful games and also provides stories of the failures. View it here. An Architectural Approach to Level Design This is one of the first books to integrate architectural and spatial design theory with the field of level design. The book presents architectural techniques and theories for level designers to use in their own work. It connects architecture and level design in different ways that address the practical elements of how designers construct space and the experiential elements of how and why humans interact with this space. Throughout the text, readers learn skills for spatial layout, evoking emotion through gamespaces, and creating better levels through architectural theory. View it here. Learn more and download the ebook by clicking here. Did you know? GameDev.net and CRC Press also recently teamed up to bring GDNet+ Members up to a 20% discount on all CRC Press books. Learn more about this and other benefits here.
Sign in to follow this  
Followers 0
Artur Litau

How do MMORPG Developers create the monster system?

7 posts in this topic

Currently Im working on the monster system (hide/unhide/spawn/respawn) etc and I would like to know how the pro do this?

 

Currently I have so much code that I dont even know what I did nor do I have an overview anymore. And of course it is not working correctly.

 

Now I was wondering how the pro do this?

 

A game with 5000+ monsters per map.. A player log in but of course he should only load the monsters which are in a certain radius.

While running the server will check if near the characters are monsters -> true = unhide and false = do nothing.

And a second check for if monsters are too far -> true = unhide and false = do nothing.

 

Of course there is 1 big list with all the monster data and 1 list per player which contain the data which monsters are shown and which not.

 

But now what about the monsters which are dead? A third timer for them ? If the death time from a monster finished then he will respawn and everyone in the monster radius will get an input into his list that the monster is there?

 

 

If anyone could tell me "step-by-step" how the monster system should work? Like

- Player log in and only unhide the monster in his area.

-Timer to check players current position and unhide monsters if there are some in his area..

 

 

The more I work on this the more my brain starts to think different and I make everything more complex than it actually is...

0

Share this post


Link to post
Share on other sites

Actually I already have client-side everything ready and I got the source from the client. Currently Im just building the server-side for this. I got all packets and everything I need. 

I only need to write the functions like spawn monsters/items/damage etc

0

Share this post


Link to post
Share on other sites

In Java I create a 2D arraylist as the map, and than only render what is around the player

 I do not know how complex your game is, but here is some code that shows how I did the rendering offsets.

The rendering is done else were in another class - this method just builds what will be later rendered.

( Warning: Not The Best Written Code In The World )

public void outputMap(Player p){ // Build 'player areaa' to be rendered elsewhere
		
		String [] temp = new String[2];
		output = "|";
		int poX1 = p.getPlayerX() - offsetX; // Define rendering area around player
		int poY1 = p.getPlayerY() - offsetY;
		int poX2 = p.getPlayerX() + offsetX;
		int poY2 = p.getPlayerY() + offsetY;
		objects = new ArrayList<String>(); // Create dumps
		xlist = new ArrayList<Integer>();
		ylist = new ArrayList<Integer>();
		clist = new ArrayList<Color>();
		if (poX1 < 0){poX1 = 0;} // If player is near an edge ... 
		if (poY1 < 0){poY1 = 0;}
		if (poX2 > mapX){poX2 = mapX;}
		if (poY2 > mapY){poY2 = mapY;}
		
		for (cordX = poX1 ; cordX < poX2; cordX ++){     // Build arraylist that will be rendered later
			for (cordY = poY1; cordY < poY2 ; cordY ++){
				if (p.getPlayerX() == cordX && p.getPlayerY() == cordY ){
					objects.add(p.getPlayerSprite() ) ;
					xlist.add( ((cordX - p.getPlayerX() ) + offsetX ) * tile_size  ); // Offsets
					ylist.add( ((cordY - p.getPlayerY() ) + offsetY ) * tile_size );
					clist.add(Color.BLACK );
					
				}
			
				else{
					if (iomap[cordX][cordY] != null){ //iomap is one of the main map files for objects
						temp = iomap[cordX][cordY].getStates(); // Find out all the states the item has
						objects.add(temp[iomap[cordX][cordY].getCurrentState()]) ; // Dump the map object states
						xlist.add( ((cordX - p.getPlayerX() ) + offsetX ) * tile_size  ); // Offsets
						ylist.add( ((cordY - p.getPlayerY() ) + offsetY ) * tile_size );
						clist.add(iomap[cordX][cordY].getColor() ); // Mic info add
						
					}
				}
			}
		}
		scr.run(); // Start 2D rendering process 
 }
Edited by Shippou
0

Share this post


Link to post
Share on other sites


Dead monsters don't exist. There's no reason to spend any time processing dead monsters, to keep them in lists, or otherwise do stuff with them. It's dead. Passed on. No more. Ceased to be. It is an ex-monster.

 

It could be semantics, but a dead monster should still be accounted for a certain time, to loot it's body, and to show it dead on the ground.  After a certain time, it will be removed, and it's death would have triggered another monster's spawn timer.

 

So, what you're calling an "ex-monster" could, in some frameworks, still be a monster, just in the dead state.  While I might make a new "deadmonster" entity, that might not be everyone's solution.

0

Share this post


Link to post
Share on other sites

Actually I already have client-side everything ready and I got the source from the client. Currently Im just building the server-side for this. I got all packets and everything I need. 

I only need to write the functions like spawn monsters/items/damage etc

 

That seems quite backwards to me.  For a multiplayer game, the server should be the core of the system.  It's the brains and heart.  It does all the heavy lifting.  The client really should be little more than a window into what's happening on the server.  So... how exactly do you install windows into a house that hasn't been built yet?

0

Share this post


Link to post
Share on other sites

 


Dead monsters don't exist. There's no reason to spend any time processing dead monsters, to keep them in lists, or otherwise do stuff with them. It's dead. Passed on. No more. Ceased to be. It is an ex-monster.

 

It could be semantics, but a dead monster should still be accounted for a certain time, to loot it's body, and to show it dead on the ground.  After a certain time, it will be removed, and it's death would have triggered another monster's spawn timer.

 

So, what you're calling an "ex-monster" could, in some frameworks, still be a monster, just in the dead state.  While I might make a new "deadmonster" entity, that might not be everyone's solution.

 

 

I would argue that this is non-ideal design. There's so many differences between a living monster and a monster corpse that they really should be separate objects. Especially in a component-based engine. There's data and run-time state a living monster needs that a dead one doesn't (like AI) and likewise state and data a corpse needs that a living module doesn't. The physics states are different, graphics may be different depending on the graphics style, and the events the object must listen to are different. Some designs call for extremely radically different setups, too, like per-player loot in some games.

 

Ultimately, while a single monster object with two states works, and I do recommend going for the simplest design that works, I've never found having one object with two radically different states to be all that simple.

1

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0