Mirage Source
http://web.miragesource.net/forums/

New Type of Map System...
http://web.miragesource.net/forums/viewtopic.php?f=201&t=1120
Page 1 of 37

Author:  Obsidian [ Wed Jan 10, 2007 5:47 am ]
Post subject:  New Type of Map System...

Okay i just recently (in the last 4 hours or so), started working on a new type of map system. There is 1 horrendously large map, and tiles are loaded/destroyed as you move, so the entire game is just 1 map. I was going through it, and i got a lot of really good ideas on how to handle the different things things that are usually managed on a map-by-map basis (e.g., NPCs), my problem now though... is what do to do about "playerdata". Should i send it to everyone when they join the game? Should i not send it until they are only "x" amount of tiles away from someone else?

I've just been kinda stumped thinking up a logical, and processor/memory friendly way of making it all work. Any ideas from you guys would be great though :)

Author:  lucidar [ Wed Jan 10, 2007 8:18 am ]
Post subject: 

playerdata... well im not sure what it consists of entirly. but i ill assume it's all the player's data.

I would send anythign that could be shown/used by/to the player asap. Such as playername/level/guild/etc. (Whispers, WhosOnlineList, etc) other than that, wait until x amount of tiles away.
Probably 1.2-1.5times your viewable area size, unless it's huge, to prevent people from just 'jumping' onto the screen.

Many games have done simular things to what you want to achieve. Especially 3D ones- Loading as you near the object.

Author:  Obsidian [ Wed Jan 10, 2007 5:58 pm ]
Post subject: 

(good assumption! it sends their sprite, if you have paperdoll it sends what they're wearing, and a few other things)

Thanks for the reply as well... i assumed i'd have to do something like that, i just wanted to make sure it was one of the best ways of doing it. Thanks for the confirmation! :)

Author:  TheRealDamien [ Wed Jan 10, 2007 8:13 pm ]
Post subject: 

Unless your going for a deloria type of thing and having constnat loads every so often I would recommend keeping this "one big map" client side or on an FTP with a high speed connection.

I would also recommend using only as many layers as you need. This creates large amounts of CPU and RAM useage.

Side tip: The reason in some MS games the CPU launches to a very high statis is because of everything on the map such as NPCs and others. I would try and reduce the file sizes and create a better packet system.

Author:  Obsidian [ Wed Jan 10, 2007 8:31 pm ]
Post subject: 

Erm.... Deloria's system is nothing like mine... several hundreds or thousands of maps... which move/load seemlessly. The reason that CPU usage is high on games is because everything is constantly redrawn. My drawing routines as well as my map system are a LOT different than 95% of mirage-based sources. I'm also not keeping "one big map client side", the map isn't saved like it is on traditional Games, i was thinking of saving pieces, but i really don't want to add a long variable to each tile for the sake of revision. Also, NEVER EVER recommend FTP for anything. FTP sends passwords in PLAIN TEXT... meaning if you sent info to a client via an FTP site that wasn't general access... yeah they get to see both the username and password. And i also don't see how an FTP connection could in any way help, you'd still have to have a connection that was always open, using a lot of bandwidth.

I don't mean to be rude, but it doesn't exactly sound like you understand what i'm talking about... and it really doesn't sound like you understand what YOU'RE talking about...

Author:  Rian [ Wed Jan 10, 2007 8:47 pm ]
Post subject: 

TheRealDamien wrote:
Side tip: The reason in some MS games the CPU launches to a very high statis is because of everything on the map such as NPCs and others. I would try and reduce the file sizes and create a better packet system.


Actually, the maps are only about half a megabyte, and the things on the maps are usually only bytes (in the double digits for me).

I'm pretty sure the reason that some MS games use so mush CPU power is because of all the huge bitmaps being loaded into memory, and in most cases, being loaded multiple times because of the way the standard editors work.


As for Obsidian, I agree with Lucidar. I think it'd be best to load things around 1.5 times your viewable area size.

Author:  Robin [ Wed Jan 10, 2007 8:50 pm ]
Post subject: 

Actually, only your viewable area + 2 tiles are needed

Author:  Rian [ Wed Jan 10, 2007 9:04 pm ]
Post subject: 

Kite wrote:
Actually, only your viewable area + 2 tiles are needed


Less is more :P

Author:  Obsidian [ Wed Jan 10, 2007 9:12 pm ]
Post subject: 

isn't it actually you're viewable area + 4? One for each direction?

Author:  Rian [ Wed Jan 10, 2007 9:14 pm ]
Post subject: 

I took it as + 2 for each direction (total of 8 )

Author:  Obsidian [ Wed Jan 10, 2007 9:22 pm ]
Post subject: 

oh okay. i was just going to do 1 in each direction... that way as you walked, the information would already be there... and you wouldn't have to worry about a "delay" from moving, because you'd already have that tile's info and it could be immediately bltted to the map.

Author:  Shannara [ Wed Jan 10, 2007 11:18 pm ]
Post subject: 

The amount of graphics in RAM does not effect CPU usage :) They are two separate things.

The main thing that effect CPU usage are loops, and npc processing. Thus, graphic loops on client side, and npc, item, movement loops on server side are the main culprits.

Author:  Obsidian [ Thu Jan 11, 2007 1:57 am ]
Post subject: 

Alright in ALL honesty i thought about writing a map system like this a while back... before i was capable of doing it. After i talked to Dragoons Master a few days ago though, and he told me he'd gotten this system totally working in his game, i decided to attempt it myself. He's got his totally working, and it has been for some time... I just wanted to point out, he was first long before me... i just remembered and decided to try again for myself.

Author:  lordgivemick [ Sat Jan 13, 2007 10:02 pm ]
Post subject: 

well i will have to agree with both matter that it will take up ram and cpu but the important fact is to find a way to make it into bigger maps . instead of using the whoel thing or the little maps for each screen that is alreay in use i suggest using a variuos size since it wound increase it to much or decrease it. In this i prospect making it so you can use the whoel map ideal but makign a map editor that allows you to edit the whole thing with the capibility of spliting it up in maps so this way a map that woud normaly use 45000 would use about 10 or 20 maps the maps then only load the one your standing on which makes it faster than loading the whole thing. and to have such a big map it would slow it down having the small maps liek now would slow it down becuase your constanly loading maps when you walk on them. doing this you only have to reload the map if your near animation or if you step on the next map then the old one dissapears and has to have it load agian when you step back upon the map. But thats just my logical thery which someone coudl prove me roung.

Author:  William [ Sat Jan 13, 2007 11:37 pm ]
Post subject: 

lordgivemick wrote:
well i will have to agree with both matter that it will take up ram and cpu but the important fact is to find a way to make it into bigger maps . instead of using the whoel thing or the little maps for each screen that is alreay in use i suggest using a variuos size since it wound increase it to much or decrease it. In this i prospect making it so you can use the whoel map ideal but makign a map editor that allows you to edit the whole thing with the capibility of spliting it up in maps so this way a map that woud normaly use 45000 would use about 10 or 20 maps the maps then only load the one your standing on which makes it faster than loading the whole thing. and to have such a big map it would slow it down having the small maps liek now would slow it down becuase your constanly loading maps when you walk on them. doing this you only have to reload the map if your near animation or if you step on the next map then the old one dissapears and has to have it load agian when you step back upon the map. But thats just my logical thery which someone coudl prove me roung.

It doesn't need to take up cpu, it depends how you make it. You can use the current system, but just blit the surrouding maps. And still use the sendmap packet. That way it wont use much more ram.

Author:  Obsidian [ Sun Jan 14, 2007 12:11 am ]
Post subject: 

after much deliberation and talking to dragoon's master more about his system... i'm doing it a lot different than he decided to do his, but it's unfortunately going to require a lot more code. It should though.... in the end, save me a lot of data transfer between the client and server though.

Author:  Coke [ Thu Mar 08, 2007 7:25 am ]
Post subject: 

Tibia always takes 90 something percent CPU usage even on really fast pc's - it is just one big map, but tibia is really badly programmed and laggy alot of the time ~.~

One big map is a fantastic idea however, and i envy the one who gets it working :D. What i want to know is where you all learn about directx surfaces, clipping them and all that jazz...

Author:  wanai [ Wed Dec 01, 2021 1:09 pm ]
Post subject:  Re: New Type of Map System...

инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинйоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоsemiasphalticflux.ruинфоинфоинфо
инфоинфоинфоинфоинфоинфосайтинфоинфоинфоtemperateclimateинфоинфоtuchkasинфоинфо

Author:  wanai [ Sun Jan 30, 2022 6:40 am ]
Post subject:  Re: New Type of Map System...

Herb

Author:  wanai [ Sun Jan 30, 2022 6:41 am ]
Post subject:  Re: New Type of Map System...

198.6

Author:  wanai [ Sun Jan 30, 2022 6:42 am ]
Post subject:  Re: New Type of Map System...

PERF

Author:  wanai [ Sun Jan 30, 2022 6:43 am ]
Post subject:  Re: New Type of Map System...

PERF

Author:  wanai [ Sun Jan 30, 2022 6:44 am ]
Post subject:  Re: New Type of Map System...

Arth

Author:  wanai [ Sun Jan 30, 2022 6:45 am ]
Post subject:  Re: New Type of Map System...

Kyli

Author:  wanai [ Sun Jan 30, 2022 6:47 am ]
Post subject:  Re: New Type of Map System...

Orig

Page 1 of 37 All times are UTC
Powered by phpBB® Forum Software © phpBB Group
https://www.phpbb.com/