Maps [for the lack of a better word]

For developmental things relating to the graphics of the game.
User avatar
klax
Project Developer
Posts: 481
Joined: Tue Jun 08, 2004 3:51 pm
Location: Barcelona, Spain
Contact:

Post by klax »

Good work!

These days I've been busy trying to update the gauges when someone is dead with the new watched player (uff, a lot of structures!). But at last I think I've succeded (needs more testing ;P) and then I could work in another thing. If you need help you could post your changes I would try to help you ;)

I also thought about the bots going crazy with different shaped arenas ;), but when done this we could also change the bot code to conform with shaped arenas (I've been taking a look at this and I suppose it will be easy to change the bot code).
User avatar
Tank Program
Forum & Project Admin, PhD
Posts: 6712
Joined: Thu Dec 18, 2003 7:03 pm

Post by Tank Program »

Well done. You guys are really an asset... Everyone's starting to do more work than me :o... I better come up with some more real improvements...
Image
User avatar
philippeqc
Long Poster - Project Developer - Sage
Posts: 1526
Joined: Mon Jul 12, 2004 8:55 am
Location: Stockholm
Contact:

Post by philippeqc »

klax wrote:Good work!
Thanks. I feel it will be long before I'm able to give any real contribution. But I feel like I'm learning a lot from the inner working of armagetron.
klax wrote: These days I've been busy trying to update the gauges when someone is dead with the new watched player (uff, a lot of structures!). But at last I think I've succeded (needs more testing ;P) and then I could work in another thing.
You mean to update the hud with the data of the player followed when your dead? Neat!
klax wrote: If you need help you could post your changes I would try to help you ;)
Humm, I dont have any real change to post. I'm just fooling around with the code. What I've been doing is trying to understand the eFace and eHalfEdge objects to know how arenas gets built (not that obvious, but I think I'm on it). At the moment I'm taking a detour to check what kills the bikes instantly at game start. It is a bit hard to find something where you could help me at the moment as I'm still reading code.
klax wrote: I also thought about the bots going crazy with different shaped arenas ;), but when done this we could also change the bot code to conform with shaped arenas (I've been taking a look at this and I suppose it will be easy to change the bot code).
Yes yes. Bot code is really not something I'm planning to touch anytime soon. And many assumtion are made in them (and the autodrive when chatting), such as probing in front and at 30 degree angle on both side.
Canis meus id comedit.
User avatar
klax
Project Developer
Posts: 481
Joined: Tue Jun 08, 2004 3:51 pm
Location: Barcelona, Spain
Contact:

Post by klax »

philippeqc: We all know how messy is the code and how difficult is to try to understand the structures! It takes time but when you succeed you'll have learned a lot!!

And about the hud: yes! I've been testing it and now it's updated with the data of the player followed when your dead ;)

Happy coding ;)
User avatar
klax
Project Developer
Posts: 481
Joined: Tue Jun 08, 2004 3:51 pm
Location: Barcelona, Spain
Contact:

Post by klax »

Hehe, I think doing shaped arenas will be easier to do than I thought :twisted:

The arena is done in gArena.cpp:107. There you must define the points of the shape:

Code: Select all

  ePoint *R=ggrid->Insert(eCoord(0,0));
  R=ggrid->DrawLine(R, eCoord(500,0)  * sizeMultiplier,  tNEW(gWallRim) (ggrid),0);
  R=ggrid->DrawLine(R, eCoord(500,500) * sizeMultiplier,tNEW(gWallRim) (ggrid),0);
  R=ggrid->DrawLine(R, eCoord(0,500)   * sizeMultiplier,  tNEW(gWallRim) (ggrid),0);
  R=ggrid->DrawLine(R, eCoord(0,0)     * sizeMultiplier,    tNEW(gWallRim) (ggrid),0);
It's like programming in LOGO with the turtle :lol:

philippeqc: I've been testing and I think your problem is this: the bikes are killed at the start because the spawnpoints are outside the arena ;). The spawnpoints are defined in gArena.cpp:42

----

EDIT: Some thoughts about a real implementation:

We could set one variable in the server named ARENA_SHAPE being an integer (could we set a variable being a string?).

We could create predefined arenas in texts files in the same sort of /arenas/basic.aar (hehe zmos predefined a rectangular arena here!) naming them rectangular.aar, triangle.aar, alien.aar, ... LOL
If we could set a string variable this way, if not we set an integer and rename them 01.aar,02.aar....

And we could write a parser in gArena.cpp that reads that file and loads the arena and the spawnpoints predefined by the server. What do you think?

-----

Here are some teasers ;)
Attachments
Trapezoid shape
Trapezoid shape
Rectangular shape
Rectangular shape
User avatar
Tank Program
Forum & Project Admin, PhD
Posts: 6712
Joined: Thu Dec 18, 2003 7:03 pm

Post by Tank Program »

klax wrote:We could set one variable in the server named ARENA_SHAPE being an integer (could we set a variable being a string?).
Yes, it can be a string. I just don't know how to make the client load the same arena, or if it gets automatically transported across the network code somehow... I guess we'll just have to test it some more.

The teaesers look pretty cool.
Image
User avatar
klax
Project Developer
Posts: 481
Joined: Tue Jun 08, 2004 3:51 pm
Location: Barcelona, Spain
Contact:

Post by klax »

If it can be a string then I'm going to write a parser of aar files ;)
User avatar
Zapple
Shutout Match Winner
Posts: 876
Joined: Sun Mar 07, 2004 2:42 am
Location: Halo 2
Contact:

Post by Zapple »

Wow, those are really cool klax! You whouls make one of those into a server.
User avatar
Tank Program
Forum & Project Admin, PhD
Posts: 6712
Joined: Thu Dec 18, 2003 7:03 pm

Post by Tank Program »

klax wrote:If it can be a string then I'm going to write a parser of aar files ;)
Yeah, you just have to define it right.

edit: as for a server, i'll try that... i'm more or less dealing with network stuff...
Image
User avatar
klax
Project Developer
Posts: 481
Joined: Tue Jun 08, 2004 3:51 pm
Location: Barcelona, Spain
Contact:

Post by klax »

Zapple: this modification will require you to download a new client of armagetron advanced ;)

Basic parser of aar done for arena shapes!!! (pending parsing the spawnpoints). Now editing (changing/adding) the points of the shape of basic.aar in /arenas loads the arena automatically :twisted:

One question: the spawnpoints when playing online are done server side or client side?

Tank: do you know how to add a string variable ARENA_SHAPE in server side? And how can it be accesed then from client side?

wow, this is funny!!! And the bots run through all the arena but they get lost when seeing a triangle wall!! LOL.
And when rendering not perpendicular walls sometimes the textures are bad stretched mmm
Attachments
LOL.jpg
User avatar
Tank Program
Forum & Project Admin, PhD
Posts: 6712
Joined: Thu Dec 18, 2003 7:03 pm

Post by Tank Program »

I've been experimenting with this but I've noticed that it is not happy with the following conditions:

1) ePoint *R=grid->Insert(eCoord(0,0)); being not 0,0
2) there being negative points

Aside from that... Well... Yeah...

Code: Select all

tString sn_serverName    ="Unnamed Server";
static tConfItemLine sn_sn("SERVER_NAME", sn_serverName);
From nNetwork.cpp... That should work.
Image
User avatar
klax
Project Developer
Posts: 481
Joined: Tue Jun 08, 2004 3:51 pm
Location: Barcelona, Spain
Contact:

Post by klax »

Yep, I've also noticed those limitations, but...

(0,0) the first point and only positive points -> we can use rotated shapes with a point always located in (0,0) and all the points being positive.

Another one is that it not supports L, U, ... shaped arenas. The arenas supported are only polygonal or with points not inside the described area, but well, that leave us lots of possibilities ;)

Tank: thanks for the tip ;)
User avatar
Tank Program
Forum & Project Admin, PhD
Posts: 6712
Joined: Thu Dec 18, 2003 7:03 pm

Post by Tank Program »

Yeah, I tried doing a star shaped arena, and it was not pleased with that... So I moved onto an octagon where I noticed the aforementioned issues. I'm experimenting with walls inside the grid to create donut type things...
Image
User avatar
klax
Project Developer
Posts: 481
Joined: Tue Jun 08, 2004 3:51 pm
Location: Barcelona, Spain
Contact:

Post by klax »

Tank Program wrote:I'm experimenting with walls inside the awesome empowering grid to create donut type things...
LOL! You are evil!!!

Maybe you need to describe the outside and then start the inside again with another Insert(Coord) and continuing with DrawLines!

I'm trying with the server side ;). Playing online the arena limits are controlled in server side, and if someone wants to cheat and change the arena description client side it won't work (you'll only get bad renderer arena with bad walls) LOL.

That was my main preocupation ;)
User avatar
Tank Program
Forum & Project Admin, PhD
Posts: 6712
Joined: Thu Dec 18, 2003 7:03 pm

Post by Tank Program »

I haven't tried it yet, but I think it should work. Examine

Code: Select all

R=grid->DrawLine(R, eCoord(300,100)  * sizeMultiplier,  tNEW(gWallRim) (grid),0);
You should be able to replace R with another eCoord it will just have to be multiplied by the sizeMultiplier too is all.
Image
Post Reply