Thread: Roomless world
View Single Post
Old 08-14-2014, 04:51 PM   #1
koteko
New Member
 
Join Date: Mar 2012
Posts: 20
koteko is on a distinguished road
Roomless world

And here, poor fool, I stand once more - no wiser than I was before. Or maybe a bit more?

So, after two years I'm still developing my MUD in the very limited free time I got (was nice being a university student..), for fun and learning mostly

Now I have a nice, spatially consistent set of worlds (four coordinates, essentially). Doors and walls can be added by players, and they disappear as "objects" and essentially become flags into the Room structure.

The more I think about it, though, the more I want to experiment with a roomless world - especially after re-reading KaVir replies to my previous posts. My usual problem is that I get stuck in abstract design and elucubrations - so I thought I stop by again and see what you people think about it, as last time it was very productive for me.

Anyway, let's go on with the rambling. Excluding for now thoughts about terrains, if the world is a grid of 2D-points my first problem is defining a unit and relative sizes.

Suppose a player occupy a single point of the grid, but that's not totally exclusive to him.

We are technically creating a very small kind of Room, say 1 squared meter, that is still somewhat a link with the old system. The difference would be that the "say" command, for example, act on surrounding "rooms" too (about 5 squared meters around the player, maybe?). I could define a limit of a couple of players in the same "PointRoom" and quite a few objects, and modify the "look" command to list objects and players/mobs from surrounding rooms too. The farther the "point", the lesser the details (for example, at 4 or 5 points of distance I'd only see players and mobs, not objects on the ground.

This is one way I can think about this, and sounds decent to me. Wouldn't be too difficult a modification, would make communication much better than normal Rooms (players could use whispers to be heard on the same PointRoom, "low voice" to be heard on the surrounding 8 PointRooms too, and so on. No more huge scrolling when 6 or 7 players play together at a feast).

It would mean iterating over quite a few "rooms" though every time somebody does a "look" or a "say". And most importantly, what about bigger creatures? I'd need to make them fit alone in the PointRoom at most, but a dragon should technically occupy a much bigger area. To have a dragon occupy 5x5 PointRooms would make group combats very cool in my opinion (warriors could go all around, two in each adiacent PointRoom, and blocking him from escaping until he frees a direction).

However, how to do that? Either I use an abstraction, a SquaredRoom class say, that represents a square of PointRooms (maybe it just contains them in an array, so that objects don't have to be moved around too much when the dragon moves, but simply the PointRooms are "released" from the SquaredRoom).
Or, I could put the same "Dragon" object in all 25 PointRooms it occupies, filling their space so that no players can enter them apart that at the "borders". Than I'd have to do more calculations only for the dragon itself if he's a player (every time he does a "look", he sees all objects of all 25 PointRooms he's onto, plus the surrounding ones. Also, when he moves in a direction I have to move it as a "block").

This seems doable to me, but I'm not totally happy about it. Another option would be to go the "3D way". Storing objects and living beings in a real grid, with their (simplified) shape, say rectangular or squared. Keeping it simple, I could define a "base bounding box" for each Entity that determines how much space it occupies on the grid.

Here the "Point" would be small, say 1 millimeter of accuracy. Different objects would occupy different areas, could be put one over the other etc. To do this, I'd essentially need a GIS, ie R-Tree enabled database to do range queries on the grid world and placed entities, so as to quickly find when a player hits a wall and cannot move in a direction for example, or even just all the surrounding Entities of of a player when he does "look".

This second way seems to me more "brave" but dangerously close to a 3D engine - that makes me guess if at that point I wouldn't be better off start tinkering with a MMO and be done with it. Ah, if only I had the money to pay a couple of Artists..

Apart from jokes, any thoughts?
koteko is offline   Reply With Quote