Eurekav2 - Page 2

Eurekav2

All map release threads should be posted here

Moderator: Moderators

User avatar
Cheesecan
Posts: 1571
Joined: 07 Feb 2005, 21:30

Re: Eurekav2

Post by Cheesecan »

smoth wrote:Or the *a mods could write an efing widget so the mappers don't have to deal with this crap
Ooh good idea!
No really, it is. Makes mapping a lot easier too. If it's not already been done by somebody else, I'll add it on my todo list.

I haven't done any ogl drawing calls in lua before but it looked to me to be very similar to c ogl so it shouldn't take me long to figure out how to load images and draw some metal spot based on the metal map.

Do you know if it is possible to include some type of boolean field in the smf or map archive which a widget could read to check if it should draw metal spots on that map? That is the easiest way I could think of to maintain compatibility with old maps.

Let me know if you have any particular preferences for your own mods so I can take that into consideration when writing the widget.
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Re: Eurekav2

Post by smoth »

you can read the mex spots outright, s44 does it for it's flag system.
User avatar
SanadaUjiosan
Conflict Terra Developer
Posts: 907
Joined: 21 Jan 2010, 06:21

Re: Eurekav2

Post by SanadaUjiosan »

And then you spawn rocks and our problems are over.
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Re: Eurekav2

Post by smoth »

You can run into issues with all metal maps but I can help with that
User avatar
Cheesecan
Posts: 1571
Joined: 07 Feb 2005, 21:30

Re: Eurekav2

Post by Cheesecan »

I need some way to tell if a map already has metal spots textured on it. It could be done intrusively, meaning file(s) inside the map archive, or non-intrusively, by trying to guess the metal spots by looking at the texture map's properties. So the alternatives I can think of are:

1) The map.sd7 contains a metal.conf file that contains a line
METAL_SPOT_TYPE = [DESERT/GRASS/MARS]
to indicate that this map should use lua metal spots, and that a particular set of textures should be used. The textures would be found in say /luaui/widgets/metalspots directory and be prefixed with their terrain type e.g. desert_large.jpg. This way players could even customize it themselves.

2) The map archive contains under map.sd7/textures/ a set of metal textures named metal_small.jpg, metal_medium.jpg, metal_big.jpg which the widget will find and use for that particular map.

3) The widget tries to guess if the map already has metal spots textured on, and what type of terrain it has by looking at the texture map. Slowest and unreliable but also the only option that doesn't require any modifications or extra work from mappers.

Maybe also rotations for each metal spot to make them look less similar.
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Re: Eurekav2

Post by smoth »

Cheesecan wrote: 1) The map.sd7 contains a metal.conf file that contains a line
METAL_SPOT_TYPE = [DESERT/GRASS/MARS]
to indicate that this map should use lua metal spots, and that a particular set of textures should be used. The textures would be found in say /luaui/widgets/metalspots directory and be prefixed with their terrain type e.g. desert_large.jpg. This way players could even customize it themselves.
do able see feature placer.
Cheesecan wrote:2) The map archive contains under map.sd7/textures/ a set of metal textures named metal_small.jpg, metal_medium.jpg, metal_big.jpg which the widget will find and use for that particular map.
doable.
Cheesecan wrote:3) The widget tries to guess if the map already has metal spots textured on, and what type of terrain it has by looking at the texture map. Slowest and unreliable but also the only option that doesn't require any modifications or extra work from mappers.
Probably not doable.
Cheesecan wrote:Maybe also rotations for each metal spot to make them look less similar.
easily doable.
User avatar
Cheesecan
Posts: 1571
Joined: 07 Feb 2005, 21:30

Re: Eurekav2

Post by Cheesecan »

#1 and #2 are what I am adding right now. Let me know if you want any other features. Lua metal spots could allow for lots of new things. Maybe someone wants 3d metal spots for their mod :?:
User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14673
Joined: 17 Nov 2005, 02:43

Re: Eurekav2

Post by Forboding Angel »

Pxtl wrote:
smoth wrote:Or the *a mods could write an efing widget so the mappers don't have to deal with this crap
That would break backwards compatibility with all the existing maps that already drop metal patches into the texture. It would be hideous to have those metal patches doubly highlighted.

The alternate approach would be some HUD-ish glowy thing instead of baking the metal into the texture. Like drawing a circle around each metal patch... which, to be honest, would be nice since some maps with visible metal aren't really that easy to see on.

This same gameplay exists in CA, Evo, and every other major mod except yours and KP (edit: my bad, I forgot 1944). All the maps they use show the metal on the texture, so they all can take it for granted that they always will.
This is not true. Evo doesn't even use metal extractors (ill leave it to you to figure out how its done). Evo uses easymetal which highlights detected resource locations and restricts building of extractors to those locations. No future Evo maps will have visible resource locations.
User avatar
FLOZi
MC: Legacy & Spring 1944 Developer
Posts: 6242
Joined: 29 Apr 2005, 01:14

Re: Eurekav2

Post by FLOZi »

S44 is fine without or with it doesn't really make a great deal of difference to us.
User avatar
SanadaUjiosan
Conflict Terra Developer
Posts: 907
Joined: 21 Jan 2010, 06:21

Re: Eurekav2

Post by SanadaUjiosan »

smoth wrote:You can run into issues with all metal maps but I can help with that
Our goal isn't playability on all maps, just most maps/most normal maps.

That being said, if it's doable that's cool.
User avatar
oksnoop2
Posts: 1207
Joined: 29 Aug 2009, 20:12

Re: Eurekav2

Post by oksnoop2 »

Yeah if someone could help us out with that. Well that would just be great.
User avatar
Cheesecan
Posts: 1571
Joined: 07 Feb 2005, 21:30

Re: Eurekav2

Post by Cheesecan »

It could also place features such as say oil wells or mines. If you like I could add an option for that.

Here's a shot of the current progress(Step #1 is finished now):
http://i53.tinypic.com/103ivyg.jpg

I could use some better looking metal textures for sure.
User avatar
FLOZi
MC: Legacy & Spring 1944 Developer
Posts: 6242
Joined: 29 Apr 2005, 01:14

Re: Eurekav2

Post by FLOZi »

oksnoop2 wrote:Yeah if someone could help us out with that. Well that would just be great.
Just use easymetal, I recently stripped out my old metal spot finder and replaced it with easymetal. Infact you should be able to adapt the S44 gadget to your needs quite easily, just replace the bit that spawns a flag with knorke's code to spawn mineral fields, and rip out lines 236 to 321.

http://spring1944.svn.sourceforge.net/v ... threv=3208
User avatar
Cheesecan
Posts: 1571
Joined: 07 Feb 2005, 21:30

Re: Eurekav2

Post by Cheesecan »

So you also used analyzeMetalMap() from areaMex widget. :P

edit: here ya go:
http://springrts.com/phpbb/viewtopic.php?f=23&t=24526
User avatar
FLOZi
MC: Legacy & Spring 1944 Developer
Posts: 6242
Joined: 29 Apr 2005, 01:14

Re: Eurekav2

Post by FLOZi »

Cheesecan wrote:So you also used analyzeMetalMap() from areaMex widget. :P
Just use easymetal, I recently stripped out my old metal spot finder and replaced it with easymetal.
author = "FLOZi, AnalyseMetalMap algorithm from easymetal.lua by CarRepairer",
User avatar
Cheesecan
Posts: 1571
Joined: 07 Feb 2005, 21:30

Re: Eurekav2

Post by Cheesecan »

:D code re-use is everywhere zomg.
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Re: Eurekav2

Post by smoth »

Cheesecan wrote::D code re-use is everywhere zomg.
that is the POINT of open source. Why reinvent the wheel over and over and over.
User avatar
MidKnight
Posts: 2652
Joined: 10 Sep 2008, 03:11

Re: Eurekav2

Post by MidKnight »

smoth wrote:
Cheesecan wrote::D code re-use is everywhere zomg.
that is the POINT of open source. Why reinvent the wheel over and over and over.
Smoth's right.
User avatar
Neddie
Community Lead
Posts: 9406
Joined: 10 Apr 2006, 05:05

Re: Eurekav2

Post by Neddie »

Though it is the basis of coding as a practice in general.
User avatar
knorke
Posts: 7971
Joined: 22 Feb 2006, 01:02

Re: Eurekav2

Post by knorke »

epic thread derail, its basically the same as
http://springrts.com/phpbb/viewtopic.ph ... 19#p457219
Though it is the basis of coding as a practice in general.
in spring modding the basis is "copy over stuff until it works, wonder when it suddendly breaks"
Post Reply

Return to “Map Releases”