Re: Coordinate systems. >:|

From: Anthony Goins (scapegoat@messiah.ath.cx)
Date: 04/19/03


On Wed, 9 Apr 2003, Adam Scriven wrote:
> I know nothing about programming coordinate based systems in C, but I'm curious as to
> what you're planning.  Are you going to ditch the "room" format, and do a totally
> coordinate-based system?  I'm very interested in something like that, especially if it
> could somehow be adapted to 3d coordinates (z axis).

Well, right now I have three structures in place.  They are map, rooms and
exits.  I am using 3d coordinates for everything and using floats(not
sure if I am actually going to need floats or not) for the coordinates.

I am first programming the system on SocketMUD because it would be a lot
easier since I wouldn't have to change or rewrite code, just get straight
to implementing it.  After it is completed I am installing it on my
friends CircleMUD.  Removing the entire world format coming with
CircleMUD.

Below is a post I made to a BB for a MUD I code for talking about
how I am going to implement this.

[---Start Snip---]
Now I have that already done with some code I am playing with and what I
am going to do with rooms is have a function called SetupMap that gets
called when an area loads that will create a room for all the coordinates
of the map. If the room that is getting created doesn't already ahve
predefined values and such it gets assigned default ones because they
aren't really in use.

Why am I doing this? So I can allow people to knock down walls. What if
someone is out in the woods and they are blocked by bushes and stuff?
Would they just walk away because they can't knock the bushes out? I doubt
that. They can kill dragons I bet they could make a path. :p

Also what I'm doing with rooms is going to probably have it skip over the
room section when loading the maps and have a function for reading in
rooms and when a character needs to access a room load it and when they
leave save and unload the room(At least that is what I am doing right
now). I am going to have most things save inside of a room.
ummm.. Coordinates for the rooms is pretty much the size of the
room(x,y,z). Though thinking about it I am going to ahve to add another
set I think... I forgot.
[---End Snip---]

Anyways, that is as far as I have got.  I am teaching myself all of this
as I go because I have never messed with anything like this before.

I know so far there are probably design problems and such things with
this.  That is how I am doing it so far.

If you want to talk about it in a little more detail we can.

Also if anyone has any suggestions/comments or wants to look at
any of the code I have already written just give me a mail and I can post
it her or to your mailbox personally.  ;p

This is my first time messing with this stuff so any type of help is of
value.  Thanks folk's sorry for the long post.

Regards,
Anthony Goins

--
   +---------------------------------------------------------------+
   | FAQ: http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html |
   | Archives: http://post.queensu.ca/listserv/wwwarch/circle.html |
   | Newbie List:  http://groups.yahoo.com/group/circle-newbies/   |
   +---------------------------------------------------------------+



This archive was generated by hypermail 2b30 : 06/26/03 PDT