View topic - Anti-porc measures



All times are UTC + 1 hour


Post new topic Reply to topic  [ 29 posts ]  Go to page Previous  1, 2
Author Message
 Post subject: Re: Anti-porc measures
PostPosted: 12 Nov 2009, 07:00 
User avatar

Joined: 08 Sep 2004, 21:59
Location: Qc, Canada
Argh wrote:
I'd already asked to be able to use Lua to define custom TypeMaps, and alter the pixel values, several times. I sat that one out in disgust, frankly. Having the ability to use Lua to simply write "don't go here" or "use this path ONLY" for a given Unit class would be very, very useful.

The problem is pretty darn simple: that data is currently read from the SMF. After that, it's static. There's no reason at all that it couldn't be dynamic data that could be altered on the fly, but the devs have expressed little interest. I could care less about simply changing typemaps that are already painted onto a map- that won't allow for Lua to do dynamic stuff in terms of pathing, such as denying movement through zones, slowing Units down by changing the state, encouraging certain Units to only use a certain part of the map to move on, regardless of the heightmap, etc.


At some point, I want to write a pathfinder for Spring that takes into account how many units are moving as a group, and how wide are the available corridors. But that's still far away.

In the meanwhile, I'd like to try and tackle this dynamic typemap issue. Making the data dynamic shouldn't be a problem, providing an interface all the way to the lua layer might prove more difficult, since I know very little of Spring's code. And in my experience passing data types between different languages can be hell.
I could allow you to retrieve the names and properties of existing typemaps and let you paint/read those wherever you want; or I could also allow you to ask Spring to retreive the next unused red value to dynamically create your own terrain type, and again, paint it or read it from the typemap.
Would that be enough, and does the lua interface provide you with everything you need for the dynamic pathing you were talking about?

Before you get too exited, I probably won't be done until february 2010. You know, real life stuff. But this is a medium-size project that actually seems doable (unless there's something even weirder than I expected in the Spring engine), so it's motivating.

Oh and... just thinking aloud here... does Spring have lava (damaging water) yet, or any type of terrain that can damage units?


Last edited by Gabba on 12 Nov 2009, 07:35, edited 1 time in total.

Top
 Offline Profile  
 
 Post subject: Re: Anti-porc measures
PostPosted: 12 Nov 2009, 07:34 
P.U.R.E. Developer
User avatar

Joined: 21 Feb 2005, 03:38
Location: Herding cats uphill whilst wearing roller skates.
Quote:
At some point, I want to write a pathfinder for Spring that takes into account how many units are moving as a group, and how wide are the available corridors. But that's still far away.
To some extents, the heatmap does that for us.

Quote:
Oh and... just thinking aloud here... does Spring have lava (damaging water) yet, or any type of terrain that can damage units?
Yes and no. Water can be defined as damaging in the map's TDF / Lua. You can also do it directly with Lua pretty easily.


Top
 Offline Profile  
 
 Post subject: Re: Anti-porc measures
PostPosted: 12 Nov 2009, 07:36 
User avatar

Joined: 08 Sep 2004, 21:59
Location: Qc, Canada
Argh wrote:
Quote:
At some point, I want to write a pathfinder for Spring that takes into account how many units are moving as a group, and how wide are the available corridors. But that's still far away.
To some extents, the heatmap does that for us.


Err, heatmap? Some new development that went under my radar?
Edit: mmkay, I found this, sounds like a variation on flocking behavior. Not so great if modders need to add more custom parameters to get good behavior, though.

And how does it help with units not bunching up in a narrow passage?


Top
 Offline Profile  
 
 Post subject: Re: Anti-porc measures
PostPosted: 12 Nov 2009, 07:46 
P.U.R.E. Developer
User avatar

Joined: 21 Feb 2005, 03:38
Location: Herding cats uphill whilst wearing roller skates.
Quote:
how does it help with units not bunching up in a narrow passage?
The heatmap makes them not move into the area until the heat level falls enough. So, in wide areas they'll spread, and in narrow areas they tend to space better, when speeds are taken into account. It's not perfect, but it's better than it used to be.


Top
 Offline Profile  
 
 Post subject: Re: Anti-porc measures
PostPosted: 13 Nov 2009, 07:38 
Zero-K Developer

Joined: 28 Nov 2006, 13:22
I'd suggest you start a new topic about brainstorming and implementing typemap manipulation, over on the dev forum, or somewhere other than the CA forum. Theres been discussion on it so i am not sure if anyone was working on it already.

I know Google, Argh and i will all be cheering you on.


Top
 Offline Profile  
 
 Post subject: Re: Anti-porc measures
PostPosted: 13 Nov 2009, 21:01 
P.U.R.E. Developer
User avatar

Joined: 21 Feb 2005, 03:38
Location: Herding cats uphill whilst wearing roller skates.
Kloot wrote a patch. I wrote some Lua to use the patch, and test how it affected the pathfinder. It isn't working perfectly yet. That's where things are atm.


Top
 Offline Profile  
 
 Post subject: Re: Anti-porc measures
PostPosted: 16 Nov 2009, 03:17 
Content Developer
User avatar

Joined: 13 Jan 2005, 00:46
Location: ModalitÃ
smoth wrote:
WTF op: jumpjets

/thread


Top
 Offline Profile  
 
 Post subject: Re: Anti-porc measures
PostPosted: 16 Nov 2009, 03:24 
User avatar

Joined: 08 Sep 2004, 21:59
Location: Qc, Canada
smoth wrote:
WTF op: jumpjets

/thread


In plain english?


Top
 Offline Profile  
 
 Post subject: Re: Anti-porc measures
PostPosted: 16 Nov 2009, 15:58 
Moderator
User avatar

Joined: 22 Feb 2006, 01:02
Location: cheap kitchen
i think he wants players to use jumping units to jump over walls.
(but they sometimes do not quite make it and bounce back or land on topf of the wall where they are shot to pieces)


Top
 Offline Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 29 posts ]  Go to page Previous  1, 2

All times are UTC + 1 hour


Who is online

Users browsing this forum: Hoi and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group

Site layout created by Roflcopter et al.