Random Spawn Direction (position would be cool too...)

What do you want to see in Armagetron soon? Any new feature ideas? Let's ponder these ground breaking ideas...
Post Reply
User avatar
sinewav
Graphic Artist
Posts: 6505
Joined: Wed Jan 23, 2008 3:37 am
Contact:

Random Spawn Direction (position would be cool too...)

Post by sinewav »

Ever notice how playing in a server with just 2-4 people the grid starts to look a little redundant as players tend to follow the same starting patterns? I think changing the starting direction would help add some much needed variance.

One thing Armagetron is missing when compared to its peers is spawn point variation. Game Grid Champions has two modes, Lightcycles 3D has three modes. FLTron's don't change direction, but they slide position inward and outward (randomly I think, I never asked to find out). But what I'm thinking is the kind that glTron has where you don't know if you'll start out facing the middle, rear, or side of the grid.

At first I thought about a map generator script, but then I was like, "naw, there's got to be a better way than making dozens of maps..." Or, maybe not?

Of course, the default map in Arma might not be the best map to use anyway since the spawn points are already pretty close to the rim; this doesn't mean it wouldn't completely rock on other maps.

Oh, and slight variation of the position would be awesome too.
User avatar
dukevin
Round Winner
Posts: 219
Joined: Mon Aug 30, 2010 8:25 am
Location: Southern California
Contact:

Re: Random Spawn Direction (position would be cool too...)

Post by dukevin »

I haven't actually tried this to confirm but it should be partially achievable in sty+ct, for starting points anyways.

Code: Select all

SPAWN_POINT_GROUP_SIZE

Code: Select all

SPAWN_ALTERNATE 1
In your map file, have multiple spawn points, say 20, then you can control how many people spawn at the same spot with spawn_point_group_size.

Then set spawn_alternate 1 for it to rotate spawn points (this is what is used in onslaught but onslaught only has 2 spawn points).



But I definitely agree with you in that more spawn point flexibility would be very nice, especially for on-the-fly respawning control.
Image
Word
Reverse Adjust Outside Corner Grinder
Posts: 4330
Joined: Wed Jan 07, 2009 6:13 pm

Re: Random Spawn Direction (position would be cool too...)

Post by Word »

yeah, some days ago I thought of something like this:

Image

(two hostages that have to stay in their zone, the other team has to free them by killing the two other players, then the zone disappears and they can try to kill the hostages. the team whose hostages die first loses. players can't enter the zone of the opposing team. the hostages die if they move out of the zone before the opposing team's free players are still alive.)
User avatar
sinewav
Graphic Artist
Posts: 6505
Joined: Wed Jan 23, 2008 3:37 am
Contact:

Re: Random Spawn Direction (position would be cool too...)

Post by sinewav »

Ok, let's not get excited with wacky game modes, but yeah - more variance. I really just want to know if this is something that can be written as a patch, and if so, how much can I pay someone to write it?
Attachments
gltron-spawnpoints.png
gltron-spawnpoints.png (1.15 KiB) Viewed 2264 times
User avatar
Z-Man
God & Project Admin
Posts: 11748
Joined: Sun Jan 23, 2005 6:01 pm
Location: Cologne
Contact:

Re: Random Spawn Direction (position would be cool too...)

Post by Z-Man »

Assigning the spawn points randomly to teams instead of sorted by score certainly isn't going to be a big patch. For flexibility, it should probably be developed as a map format feature, though, not a setting.
User avatar
kyle
Reverse Outside Corner Grinder
Posts: 1992
Joined: Thu Jun 08, 2006 3:33 pm
Location: Indiana, USA, Earth, Milky Way Galaxy, Universe, Multiverse
Contact:

Re: Random Spawn Direction (position would be cool too...)

Post by kyle »

as for the spawn point directions.

my little patch
set angle="RAND" in map

Code: Select all

=== modified file 'src/tron/gParser.cpp'
--- src/tron/gParser.cpp	2009-03-03 18:08:27 +0000
+++ src/tron/gParser.cpp	2011-04-18 21:43:52 +0000
@@ -362,10 +362,20 @@
 gParser::myxmlGetDirection(xmlNodePtr cur, float &x, float &y)
 {
     if (myxmlHasProp(cur, "angle")) {
-        float angle = myxmlGetPropFloat(cur, "angle") * M_PI / 180.0;
         float speed = myxmlGetPropFloat(cur, "length");
-        x = cosf(angle) * speed;
-        y = sinf(angle) * speed;
+        tString sangle;
+        tString sr;
+        sr = "RAND";
+        sangle = myxmlGetProp(cur, "angle");
+        if (sangle==sr){
+            float angle = ((float(rand()) / float(RAND_MAX)) * (2.0*M_PI));
+            x = cosf(angle) * speed;
+            y = sinf(angle) * speed;
+        }else{
+            float angle = myxmlGetPropFloat(cur, "angle") * M_PI / 180.0;
+            x = cosf(angle) * speed;
+            y = sinf(angle) * speed;
+        }
     } else {
         x = myxmlGetPropFloat(cur, "xdir");
         y = myxmlGetPropFloat(cur, "ydir");
Image
User avatar
Tank Program
Forum & Project Admin, PhD
Posts: 6714
Joined: Thu Dec 18, 2003 7:03 pm

Re: Random Spawn Direction (position would be cool too...)

Post by Tank Program »

Hrmm, not an XML expert, but I'm not quite sure if that's the right way to do it. Maybe a different tag like randomangle="yes"?
Image
User avatar
kyle
Reverse Outside Corner Grinder
Posts: 1992
Joined: Thu Jun 08, 2006 3:33 pm
Location: Indiana, USA, Earth, Milky Way Galaxy, Universe, Multiverse
Contact:

Re: Random Spawn Direction (position would be cool too...)

Post by kyle »

I was thinking of a way to do it without needing a new dtd, not sure if it is the best way, but it does work :)
Image
Post Reply