I'm sure this has been mentioned before but it would be nice if we could walk forever because the world is round... for like a war game. So people can do back attacks and such...
I know there's a way to do this but this would be a neat feature just to save time :)
ID:259523
Jun 12 2002, 5:52 am
|
|
In response to NeoHaxor
|
|
George is being chased through the forest by a group of men. He turns around to see if they are still there...but they are all gone. Relieved he takes a deep breath. ...suddenly, the enemy appears on top of him.
|
simple solution would be to have any mobs that try to move off the edge of the map reappear on the opposite side... and this post really ought to be in 'code problems' or 'design philosophy,' as this is something that is programmed in the world map, not the BYOND interpreter..
|
In response to digitalmouse
|
|
digitalmouse wrote:
this post really ought to be in 'code problems' or 'design philosophy,' as this is something that is programmed He is just following the age old tradition of requesting BYOND features for simple yet specific problems that may not strengthen the language, but definately cuts down on hours and hours of waiting for responses in Newbie central and Code Problems, then the grueling work of copying, pasting, trying to compile, copying the error messages, and pasting them back in the forum. General Forum was full of this sort feature request last summer. |
In response to Shadowdarke
|
|
And DBZers ;)
|
In response to Sariat
|
|
Sariat wrote:
And DBZers ;) Awhile ago, Tom made a post about people going off-topic, and saying things that will offend some people and starting flame wars, and you posted (i will try not to do it, and not say things i shouln't) Now, calling people (DBZers) as you like to call them is offending some people, so think before you speak, your always DBZer this and that, then i see you in DBEO inwhich is DBZ, so that makes you! a DBZer as well. Just grow up, when i get home ill post a link to your post, but i gtg for now. RaeKwon |
In response to RaeKwon
|
|
K, but just to let ya know, I only play DBEO becuase its the reason i came to BYOND... but I agree, I shouldnt have said that, so thanks for correcting me. I will stop doing that.
|
In response to Sariat
|
|
Sariat wrote:
K, but just to let ya know, I only play DBEO becuase its the reason i came to BYOND... but I agree, I shouldnt have said that, so thanks for correcting me. I will stop doing that. Thanks sariat. |
In response to RaeKwon
|
|
RaeKwon wrote:
Sariat wrote: I agree. It does not matter whom or what the insult is direted at. Please keep insults, personal or broad off these boards. Alathon\\ |
This isn't practical, because there is no standard way to represent a spherical map in a 2D tile based world. The simplest method is to wrap the edges as others in this thread have posted, but it's not mathmatically accurate.
Get a paper towel and spread it flat. This represents a flat 2D map. Now get a tennis ball or another ball of similar size. This represents the spherical world you want to portray. Now, wrap the paper towel around the ball. Ideally, you would want the paper towel to wrap completely around the ball without any gaps and without overlapping. That is why maps of the globe are either shaped strangely, or the scale changes with lattitude. Greenland looks larger than the continental US on a flat world map, when actually much much smaller. (I'll let you look up the details.) Also, if you bring all the corners of of your 2D map paper towel together for a not-quite-spherical-but-still-3D shape, you'll see that the sides do not meet each other. Each side only meets itself. If you wanted to simulate this in game, when you hit the edge of the map you would go back to the same edge of the map, on the opposite side of the equator facing the opposite direction. For example, you hit the edge of a 10x10 map at 2,10 going north, you'll show up at 8,10 facing south. |
In response to NeoHaxor
|
|
Or better yet:
mob/Move() Oh, much easier |
In response to Nadrew
|
|
Nadrew wrote:
Or better yet: > mob/Move() Oh, much easier mob/Move() if(src.x == world.maxx) src.x = 2 if(src.x == 1) src.x = world.maxx - 1 if(src.y == world.maxy) src.y = 2 if(src.y == 1) src.y = world.maxy - 1 .=..() forgot .=..() :P RaeKwon |
In response to RaeKwon
|
|
Actually all it would need to be is ..() (or return..()) and yes I forgot, I'll edit.
|
In response to Nadrew
|
|
Nadrew wrote:
Actually all it would need to be is ..() (or return..()) and yes I forgot, I'll edit. heh, don't know why but i prefer .=..() .=..() ..() RaeKwon |
In response to RaeKwon
|
|
RaeKwon wrote:
Nadrew wrote: .=..() .=..() ..() RaeKwon .=..() stores the return value of ..() in . Alathon\\ |
In response to Alathon
|
|
.=..() stores the return value of ..() in . I'll explain that in further detail: ..() creates a return value. When you run ..() like the following: ..() the return value is simply ignored, since nothing is using it. '.' is the return value of the current proc. If your proc returns without an explicit "return" command, it will return the value of the '.' variable. For example: mob/proc/return1() return 1 mob/personA/return1() ..() //no return statement, returning '.' //'.' hasn't been defined in this proc, so it defaults to zero. //returning 0 mob/personB/return1() . = ..() //no return statement, returning '.' //'.' has been set to the return value of mob/proc/return1(), which is 1 //returning 1 |
EX.
var
maxX = 200
maxY = 200
Now set those in their correct positions across each border and make ones for the other directions if necessary.
--Neo--