CT maps & where the rocks come from

CT maps & where the rocks come from

A fresh perspective on battle for control of Earth, brought to you by Sanada and Snoop.

Moderators: Moderators, Content Developer

Post Reply
User avatar
knorke
Posts: 7971
Joined: 22 Feb 2006, 01:02

CT maps & where the rocks come from

Post by knorke »

Last edited by knorke on 12 Nov 2010, 16:38, edited 1 time in total.
User avatar
knorke
Posts: 7971
Joined: 22 Feb 2006, 01:02

Re: CT maps & where the rocks come from

Post by knorke »

stuff will probally be changed a bit and use config files in the map that will be included by the mod using VFS. Also will allow to have config files in the game for maps that do not have their own config file. These default config files will be the same name as the map + some prefix maybe, ie "rocklayout_DeltaSiegeDry.lua" and hooray CT on DSD isnt that fucking great.
User avatar
KaiserJ
Community Representative
Posts: 3113
Joined: 08 Sep 2008, 22:59

Re: CT maps & where the rocks come from

Post by KaiserJ »

quick question; how about spawning rocks on top of metal spots? that way you don't need to pre-define any "rock spawns" via lua
User avatar
oksnoop2
Posts: 1207
Joined: 29 Aug 2009, 20:12

Re: CT maps & where the rocks come from

Post by oksnoop2 »

I would much rather do it that way kaiserj.
User avatar
knorke
Posts: 7971
Joined: 22 Feb 2006, 01:02

Re: CT maps & where the rocks come from

Post by knorke »

Metalmap can be a fallback but i doubt it will allow for as much options or work as good as defined spawns.
For most maps it would suck gameplay wise because metalspots are usually spread evenly all over the map whereas you want the rocks to be together in some sort of clusters. Maps could also define what areas they want meteors to drop and where not. I would rather like to see a small number of maps that were made with the rocks concept and CT in mind instead of some halfassed system based something that was made with TA eco and gameplay in mind.
User avatar
KaiserJ
Community Representative
Posts: 3113
Joined: 08 Sep 2008, 22:59

Re: CT maps & where the rocks come from

Post by KaiserJ »

certainly can't disagree with any of your reasoning;

my only point would be that if you did the metal spot thing, then you could use existing tutorials and engine based stuff instead of your own (if i wanted to make a CT map, i could define my rock zones using springmapedit) wheras this coordinates method would require a bit of a tinker methinks, although i guess it would be nice in the respect of being able to change the locations of the rock zones without recompiling the map (right?)

what you're doing is interesting stuff and of course i'd trust your judgement over mine ^^
User avatar
knorke
Posts: 7971
Joined: 22 Feb 2006, 01:02

Re: CT maps & where the rocks come from

Post by knorke »

yes i see your point but using the metalmap would require tinkering as well, like how dense/big must a spot be, how many rocks should spawn on it etc: S44 can just put a flag on every spot but for CT you would want several rocks per spot etc.
although i guess it would be nice in the respect of being able to change the locations of the rock zones without recompiling the map (right?)
you would have to repack the map, but compiling would not be nessecary yes. Also you can have different layouts, adjust rock numbers based on players blabla. More interessting things, less more-of-the-same.

Thinking of it, I would like to use metalmap for density of meteors dropping. The greener = the more likely meteors fall here.
Ie have a map divided in a crater desert and a jungle and meteors only drop in the desert part. Of course that would make these maps unplayble for any game except CT which would be oh-so-terrible :roll:
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Re: CT maps & where the rocks come from

Post by AF »

You could use grouping and group spots together based on proximity, then take the average position of each group. This way you'd get far fewer groupings of rocks, but theyd tend to be in strategic positions as metal spots in clusters usually are.
User avatar
knorke
Posts: 7971
Joined: 22 Feb 2006, 01:02

Re: CT maps & where the rocks come from

Post by knorke »

Or you could just make a good resource placement for your map :)
Instead of relaying of some script to do it for you.

Maps no longer need to do Unit.Create themself as that obviously can cause problems.
Instead maps now return a table of rock positions.
A gadget then reads them and places rocks there.

Mappers can either fight with { {}{}7, ( [1] to return a proper Lua table or include a "helper function" in your Lua like

Code: Select all

local function SpawnResource  (x,y)
	newrock = {}
	newrock.x = x
	newrock.y = y
	table.insert (res, newrock)
end
http://code.google.com/p/conflictterra/ ... psAndRocks
Its all on wiki.
User avatar
knorke
Posts: 7971
Joined: 22 Feb 2006, 01:02

Re: CT maps & where the rocks come from

Post by knorke »

added some quick thing to place resources on metal.
Image
areyouhappynow
currently disabled because it fills some maps (speedmetal, metalheck) completly with rocks and i dont feel like spending more time on that anyway.
If somebody wants to make a better resources-on-metal thing, feel free to do so. S44 flag placement is probally a good starting point.
(but lets please talk in lobby before you commit changes to any file with tp_ prefix so we can coordinate)

I'll instead concentrate on the config file based system as I believe it gives mappers more controll and what not.
Image
For example a mapmaker of a originally non-CT map can just make a config file for his map instead of having a script randomly spawn stuff on it.
User avatar
oksnoop2
Posts: 1207
Joined: 29 Aug 2009, 20:12

Re: CT maps & where the rocks come from

Post by oksnoop2 »

Thanks knorke, this worked well in the hand full of non metal maps i tested this on.

And oddly enough it did not spawn rocks all over the one metal map i tested on. It looks like it spawned just a block of them on the left. Rock Unit cap? or something. I don't know, and I don't really care. I'm alright with not fully supporting every single spring map known to man.

I will wait till i catch you online before it get's enabled. But it worked fantastically otherwise. So thanks a lot.
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Re: CT maps & where the rocks come from

Post by AF »

Thats a bug with the extraction spot finder algorithm on some metalmaps.

Just do two things. Add a minimum distance between positions s it doesnt carpet an area, and test if there are more than a certain number of spots found, then assume its a metal map and randomly place
User avatar
CarRepairer
Cursed Zero-K Developer
Posts: 3359
Joined: 07 Nov 2007, 21:48

Re: CT maps & where the rocks come from

Post by CarRepairer »

You can use the code I already made. It's called easymetal and you can find the latest version in Evo RTS. Works for any map with large or small metal spots.
User avatar
knorke
Posts: 7971
Joined: 22 Feb 2006, 01:02

Re: CT maps & where the rocks come from

Post by knorke »

thanks :) but I am quite happy with the results of my quite simple solution. It might not be perfect but imo is "good enough" for a fallback system.
User avatar
knorke
Posts: 7971
Joined: 22 Feb 2006, 01:02

Re: CT maps & where the rocks come from

Post by knorke »

Now with pictures thanks to giant .jpg of doom:
http://code.google.com/p/conflictterra/ ... h_Pictures

Make a CT rock layout for your favorite spring map today!
User avatar
oksnoop2
Posts: 1207
Joined: 29 Aug 2009, 20:12

Re: CT maps & where the rocks come from

Post by oksnoop2 »

Gross, giant jpeg
User avatar
MidKnight
Posts: 2652
Joined: 10 Sep 2008, 03:11

Re: CT maps & where the rocks come from

Post by MidKnight »

sweet tutorial!
Post Reply

Return to “Conflict Terra”