You must be logged in to post messages.
Please login or register

Scenario Design and Discussion
Moderated by Sebastien, Mr Wednesday

Hop to:    
loginhomeregisterhelprules
Bottom
Topic Subject: Convert images as terrain for scenarios (by specifying pixel-color => terrain-id)
« Previous Page  1 2 3  Next Page »
posted 10-12-13 00:44 AM CT (US)   
PHP Genied will be able to do this...

Basically specify wich color as terrain. This is only the start!!!






[This message has been edited by AOHH (edited 10-12-2013 @ 01:16 AM).]

Replies:
posted 10-12-13 05:01 AM CT (US)     1 / 74  
That is Awesome!!!

D E V A S T A T O R
Paradise Lost ~ Scored 1st in the ACSC12! ~ Voted Best Cinematic Scenario of 2013 ~ Official Rating: 4.7
Demon Town ~ Scored 1st in the HHC11! ~ "...as unique as an AoK scenario can get." - Panel ~ Official Rating: 4.2

Proud Member of BlackForestStudios
My AoE2 Youtube Channel
posted 10-12-13 05:17 AM CT (US)     2 / 74  
i could go in photoshop and simply drw with colour over a google earth screenshot so i would get the real topography, thank you very much AOHH
posted 10-12-13 05:33 AM CT (US)     3 / 74  
Very cool!

  _ » Downloads_. . . .________             
                   _ » The Continuous Screenshot Competition_. . . .________         
posted 10-12-13 06:01 AM CT (US)     4 / 74  
lols awesome dude
posted 10-12-13 06:18 AM CT (US)     5 / 74  
Ooh, isn't that pretty?
posted 10-12-13 06:47 AM CT (US)     6 / 74  
Great idea, indeed! It will give scenario designers even more ways to create cool maps.

UPatch HD - the unofficial (HD) patch for Age of Empires: The Rise of Rome - HD resolution, HD quality interface graphics, hundreds of bug fixes, new gameplay options and many other enhancements.
--- Download here (version 1.1 Release 3).
--- For more information visit the site.
posted 10-12-13 06:53 AM CT (US)     7 / 74  
Great find!

Would you mind if I remove the majority of the exclamation marks at the title? It makes for painful reading.
posted 10-12-13 07:19 AM CT (US)     8 / 74  
Would you mind if I remove the majority of the exclamation marks at the title? It makes for painful reading.
Go ahead... actually, could you please rename the topic:

Convert images as terrain for scenarios (by specifying pixel-color => terrain-id)

[This message has been edited by AOHH (edited 10-12-2013 @ 07:21 AM).]

posted 10-12-13 09:13 AM CT (US)     9 / 74  
Let's try the forests:

[This message has been edited by AOHH (edited 10-12-2013 @ 09:13 AM).]

posted 10-12-13 09:58 AM CT (US)     10 / 74  
I remember Cossacks allowed maps to be created in this way, how does one go about doing this AOHH, please advise us Also was wondering about your modding of the knights thread. Any progress my friend? Anticipating excitedly that mod.

Domus Dulcis Domus --- Home Sweet Home...ZzZzZzZzZ
posted 10-12-13 12:30 PM CT (US)     11 / 74  
This is what I had in mind a while back. Nice job AOHH. It will make scenario making a lot faster.

Btw is it open source?

[This message has been edited by Jan dc (edited 10-12-2013 @ 12:37 PM).]

posted 10-12-13 03:51 PM CT (US)     12 / 74  
Looking at the maps with shoreless water, I might caution you of one thing: Docks cannot be built on shoreless water- they need a beach and shallow water or shallows.

Otherwise, this looks excellent! I am beyond impressed

~ Forgotten Empires ~

Storm on the Steppe | Galderton Hill RP | Proud member of Stormwind Studios

"Deyr fé, deyja frændr, deyr sjálfr it sama; ek veit einn at aldri deyr, dómr um dauðan hvern." - Hávamál 77.

[This message has been edited by HockeySam18 (edited 10-12-2013 @ 03:52 PM).]

posted 10-12-13 09:32 PM CT (US)     13 / 74  
Btw is it open source?
Yes, it will be written in PHP; so it will be easily modified by anyone who is willing to contribute editorials.
...maps with shoreless water, I might caution you...
I can easily detect if surrounding points contains any water-terrain.
Example: Grass-2 at co-ord 10,65 will be transformed into Beach/Ice if any Water found from points 09,64 to 11,66.
posted 10-12-13 09:41 PM CT (US)     14 / 74  
Great!!! I always wanted something like that!!
Can't wait for it

Btw, sorry for the offtopic but could you tell me where you found this "Triggers_Unknown_2"? I want to try to include it in AoKTS for Userpatch...

[This message has been edited by danielpereira (edited 10-12-2013 @ 09:49 PM).]

posted 10-13-13 04:30 AM CT (US)     15 / 74  
This is amazing! Make sure to upload it to the blacksmith when it is done with a short tutorial or guide!
posted 10-13-13 01:11 PM CT (US)     16 / 74  
...Pretty.

"Seriously, if human stupidity could be used as a source of power wed already be a class-III civilization and our rockets wouldve reached Andromeda by now."
« Cliffs! (4.5) »

["The prequels were great. They had some unironic high moments, laughable low points, and a cornucopia of memes. The sequels are just porridge and white noise." -Some internet rando.]
posted 10-13-13 03:12 PM CT (US)     17 / 74  
Absolutely fantastic work AOHH!

Will the utility be bundled as an .exe?

I'm not a php developer and always thought it was a language more suited to server-side web development... but great to see you making these tools in any language at all!

Any chance we could also have a heightfield bitmap for elevation too?

I'm *nearly* at the stage of making some scenarios for my mod and this technique for terrain generation could really help speed up real-world map creation.

Finally, it'd be great if existing scenario maps could be read out as bitmaps with the same colouring scheme... that way I could generate random maps from the random map scripts I've written, extract the map as bitmap, modify it, and reimport it with the modifications.

If there's anything I can do to help let me know.
posted 10-13-13 04:52 PM CT (US)     18 / 74  
I wonder which other scenario information can be useful like this. Although I guess aok trigger studios already covers most of it.
Btw any chance the code is already online? I'm very interested to see how you make it work.

Terrain and elevation are stored in 2 separate arrays so editing the elevation should be fairly easy as well. It would just have to check that the slope around the hill aren't too steep and maybe to check the terrain on top of the hill (like water) to prevent crashes.

[This message has been edited by Jan dc (edited 10-13-2013 @ 04:53 PM).]

posted 10-13-13 09:40 PM CT (US)     19 / 74  
This could one day become a random map generator!!!
(Although it would not use RMS scripts of-course...)

Modify or detect elevations; very easy.
But not tested yet to check if surrounding hills will be blended.
The best way to keep the hills realistic is to have a bump-map (similar to 3D bump-textures) ranging from 0-8 grey gradients.
I believe 0-8 elev. is the range; however I did see a scenario that used elev. 16; although I recall it would crash.

Can also detect the terrain easily. Example: prevent units from being created on water.
However, I would still prefer to allow the designer some freedom.
I do not wish to create many rules; as I believe it is the designer's choice to ensure its scenario is valid.
The more rules; the less freedom to optimize, especially for experts.
There will be a few rules, but only simple and strict rules and functions.


Most of the functions rely on a specified area:
  • If the map is 255x255, than its entire area is 0,0->255,255.
  • Area is filtered to ensure it is correct.
  • Specified area can also be inverted.


    Terrain functions that rely on bitmap:
  • Terrain/elevation is defined by specifying exact color. (Color is specified either by index or RGB).
    This is not specified within area because it is the bitmap that will dictate the terrain.
  • Bitmap size (width & height) must be identical to map size.
    I do not want to waste my time making functions or exceptions for such a simple rule.
  • Can also specify random mix of terrains according to pixel-color/index.


    Units also rely on bitmap:
  • Can specify unit to be created according to pixel-color or pixel-index.
  • Can specify array of units to be randomly created (useful good for forests).
  • Can specify frame and/or rotation of units either adjacent or random.
  • Can specify array of terrains/elevations for units to be avoided. Or opposite; encourage units to be created on specified terrain (and/or randomly).
  • Maybe, I might add an option to allow units to avoid other units; however, that means I have to specify the size of each building (lot of work).




    The following functions obviously do not require bitmap:
  • Can specify terrain/elevation to be converted as different terrain/elevation (within specified area). This is super simple.
  • Can convert all land-to-water as either beach or ice (within specified area).


    ... any more ideas for further functions?

    [This message has been edited by AOHH (edited 10-13-2013 @ 10:39 PM).]

  • posted 10-14-13 02:51 AM CT (US)     20 / 74  
    I do not wish to create many rules; as I believe it is the designer's choice to ensure its scenario is valid.
    The more rules; the less freedom to optimize, especially for experts.
    There will be a few rules, but only simple and strict rules and functions.
    Well this way newbies might encounter crashes and won't know what is causing it. What about a warning message if there's a possible risk?
    posted 10-14-13 04:01 AM CT (US)     21 / 74  
    Well this way newbies might encounter crashes and won't know what is causing it. What about a warning message if there's a possible risk?
    I have already made a function for PHP Genied that has a "report" rundown; detects anything that is unusual/false or could cause crashing.

    PHP Genied is capable of reading any version of scenarios including:
    - Pre-alpha scenarios ver. 1.06 to 1.11
    - AoK-beta scenarios ver. 1.12 to 1.17
    - AoK demo scenarios ver. 1.19 (the 2 trial scenarios)

    And PHP Genied is capable of switching versions or extracting terrains/units/ect from scenario to scenario.
    posted 10-14-13 07:59 AM CT (US)     22 / 74  
    Oh, your tool can open and convert beta scenarios??? It's GREAT!! :O Can't wait for it!
    posted 11-12-13 12:57 PM CT (US)     23 / 74  
    Hey AOHH, if if give you the image could you send me the scenario? Blue is land, you can put grass1, yellow is water, and the black lines put a dirt. Im planning on doing a europe risk, similar to warcraft3. Could you do that?



    http://nl.tinypic.com/r/260rga1/5
    posted 11-12-13 05:06 PM CT (US)     24 / 74  
    Been waiting years for someone to make one of these.

    Elevation can never be more than 1+/- from any adjacent square. Probably should be written in as a rule to avoid crashing scenarios. Preferably, elevation would work on greyscale, with 8-15 tones, depending how many of the hidden elevations you choose to support.

    Designers could then take any real world grayscale topography map, convert it to indexed color with the palette being your predetermined tones, and then use it to generate elevation in aok.

    "And Matt is a prolific lurker, watching over the forum from afar in silence, like Batman. He's the president TC needs, and possibly also the one it deserves." - trebuchet king
    posted 11-12-13 06:17 PM CT (US)     25 / 74  
    Hey AOHH, if if give you the image could you send me the scenario?
    Yes, sure. However, the image you provided me needs further attention.

    Firstly, it is best to tilt the image clock-wise at 45*; since all maps are diamond shaped.
    Notice how I rotated my original image so that it then appears diagonal once converted.
    If you do not rotate your map initially; it will look titled as a result.

    Secondly; I recommend you re-sizing the image to the size you wish (maximum of: 255 for AoK/AoC, and 480 for AoF HD).
    I assume you want a massive map (255x255 tiles); and if so, the image should be at least 255x255 pixels.
    I can re-size and rotate your image; however I'll let you do that since it is your map.

    Also; are you sure you want the borders of the countries? I have seen clean vector maps on Google image search by-the-way.
    Elevation can never be more than 1+/- from any adjacent square.
    Yes, I have already made a function to detect surrounding elevations.
    Once the designer imports his bump-map; my function checks to see if each tile has correct elevation according to its neighboring tiles.

    GENIE-STUDIO (manipulate Genie-Engine files with JSON)
    posted 11-13-13 02:16 AM CT (US)     26 / 74  
    Any plans of releasing this in the near future?
    I've got so many plans already
    posted 11-13-13 01:42 PM CT (US)     27 / 74  
    Hey AOHH, got the map i intend to have. I already turned 45 degrees. The second one is not rotated in case. I would need the first one so to have europe as is usually seen in the globe. Yes it is giant size. In case you use Voobly you can add me http://www.voobly.com/profile/view/123341621. Let me know. Regards


    This is 255x255

    http://i39.tinypic.com/301oi1h.png


    2nd

    http://i42.tinypic.com/iz9ic9.png

    [This message has been edited by Mulon (edited 11-13-2013 @ 01:53 PM).]

    posted 11-13-13 03:07 PM CT (US)     28 / 74  
    Can we all send you our maps and ask for scenarios in the place?
    posted 11-13-13 03:58 PM CT (US)     29 / 74  
    Hey Mulon,

    This is the best I can provide you:



    http://cybervibe.org/mulon_europe.scx
    Can we all send you our maps and ask for scenarios in the place?
    Hmm... Ok yes, but not too many, or it will take me too much time.

    GENIE-STUDIO (manipulate Genie-Engine files with JSON)

    [This message has been edited by AOHH (edited 11-13-2013 @ 04:02 PM).]

    posted 11-13-13 04:17 PM CT (US)     30 / 74  
    BTW: Check this dragon out; this is a good example of making use of the ocean/sea as eye-candy.
    That scenario is the Vinlandsaga campaign scenario from Ensemble Studio.


    GENIE-STUDIO (manipulate Genie-Engine files with JSON)

    [This message has been edited by AOHH (edited 11-13-2013 @ 04:17 PM).]

    posted 11-13-13 05:26 PM CT (US)     31 / 74  
    Thanks A Lot! Scenario works fine. I was expecting the problem that in-game preview made the map look as a prism stretched, so a bit distorted by this. Even tho im not sure if then the actual field is or not. So I suppose in order to have the correct aspect it should be given a stretched/distorted one that then will look properly while in game. Either cases, it works at my advantage as i have more space for each country.
    Big Thanks AOHH! keep on the good work! Gonna make a good Risk scenario.

    By they way, if this map i'm making goes public, would you like me to mention your credits? Aka this program, you, a link to this forum page or else? lemme know
    posted 11-13-13 05:38 PM CT (US)     32 / 74  
    Awesome map. Does your program also support ludikris sized aokHD maps?
    posted 11-13-13 05:53 PM CT (US)     33 / 74  
    I remember that dragon/serpent thing, cool as hell!
    posted 11-13-13 07:49 PM CT (US)     34 / 74  
    Awesome map. Does your program also support ludikris sized aokHD maps?
    Yes, my program supports any size, and any shape too.
    However, if the map is 1020x1020 (over 1,000,000 tiles), it tends to take an extra 10 seconds just to read the terrain data, and sometimes it becomes exhausted.

    According to a test I did the day after AoF HD was released, the game actually supports maps up to 1020 tiles; however, when the scenario is played it crashes if above 480.
    I was expecting the problem that in-game preview made the map look as a prism stretched.
    Yes, I have tested scenarios which are stretched so they may look normal in the mini-map.
    Example: notice how the dragon is actually stretched...


    Conclusion: if you want the mini-map to look un-stretched; you will need to stretch the image first.
    The vertical length of the mini-map is exactly half of the horizontal length.

    GENIE-STUDIO (manipulate Genie-Engine files with JSON)

    [This message has been edited by AOHH (edited 11-13-2013 @ 07:53 PM).]

    posted 11-13-13 11:20 PM CT (US)     35 / 74  
    I remember that dragon/serpent thing, cool as hell!
    Yeah best thing about that campaign.
    « Previous Page  1 2 3  Next Page »
    Age of Kings Heaven » Forums » Scenario Design and Discussion » Convert images as terrain for scenarios (by specifying pixel-color => terrain-id)
    Top
    You must be logged in to post messages.
    Please login or register
    Hop to:    
    Age of Kings Heaven | HeavenGames