Dunkelseele's Forum Posts

  • Okay, so far a few new questions have arisen.

    What does the "For each element" condition do exactly? I guess it is a loop?

    As far as I understand: You are filling the array with random data (I didn't noticed at first) from the range between 1 and 2. What does the "+1" after the "Random(2)" do? Does "Random()" start indexing at 0? So you add 1 afterwards to prevent a 0 showing up in the array?

    What is "Array.CurrentX" exactly? I mean, it refers to the X-row of the two-dimensional array named "Array", I can see that. But what does it include, if it is a variable? As far as I understand it is a counter...?

    Another miracle: Where exactly do you say how big the array should be?

    So many questions. I hope some will be answered.

  • You sir, are being very helpful!

    Your example is perfectly what I wanted to do. I hope by studying your event structure I can learn a thing or two. Thanks alot!

    Next thing would be the random creation of the array data, or maybe a second pass of drawing to place buildings, landmarks, vegetation and so on. Im very excited!

    I'll keep you posted about my progress.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • While i can't really help you with the random generation, i can help with placing sprites according to values in an array.

    http://dl.dropbox.com/u/6660860/array.cap

    I didn't comment it, if you need any help met me know.

    EDIT: Just realized you seem to be doing this in python, my .cap is evented.

    Thanks for your example... that will certainly help me! And I'm not yet sure if I will do this in Python (as that would include learning it first ), but I thought my explanations would be much more readable if written in plain C, as that is something most people can read and understand.

    EDIT: I can't open it. It says it was created with a newer version. Check updates reports my version as the newest one. I'm confused. You using a Nightly or Beta-build?

    I'd suggest you take a look at the Perlin Noise plug.

    Thanks! I certainly will take a look ...

    Also, yeah isometric and the RTS behavior won't mix well at all i don't imagine, not to mention how hard isometric can be to work with.

    Well, most 2D RTS games use isometric perspectives, or am I horribly mistaken?

    Age of Empires I+II, Sudden Strike I+II, each and every clone of those... and was C&C not isometric too? Of course I neither can or want going anywhere even near the greatness of those games...

  • Thanks! I will ask him to have a look at this thread right now.

  • Hi!

    I am planning to do a little sandbox to play around with pattern creation, random landscape generation and so on, kind of an RTS-type sandbox-game (maybe it will evolve into a full game over time).

    For that reason I want to create a tiled landscape (isometric angle of view). Something that looks not exactly but alot like this in the end (I made it to visualize the style) :

    <img src="http://www.strongground.de/bunker/images/diorama.png">

    My idea is to use an array, where the data for the level is stored (and later randomly generated before being stored into the array). My first step would be the generation of a terrain with an array like this:

    int terrain[4][4]={{1, 2, 1, 1},
    	  		       {2, 2, 2, 1},
    			         {1, 2, 1, 1},
    			         {1, 1, 2, 1}};[/code:1z5h00kl]
    In this small example, it would be a tiny map with 4x4 tiles, of which tiles with identifier 1 are desert-tiles, and 2 are grass-tiles. Like these: <img src="http://www.strongground.de/bunker/images/tile_desert.png"><img src="http://www.strongground.de/bunker/images/tile_grass.png">
    Then, according to the array, different sprites would be placed, another problem because I don't exactly know how to dynamically place sprites yet. I managed to "create" an object instance at an exact location derivated from a sprite object when clicking on a button. Which is, in a way, pathetic. I would like to use a variable instead of fixed per-pixel locations, which then will be counted up after each tile-placement. That will do for a row. How to manage multiple rows this way, I'm not so sure. Another variable counting up after every x-dimension placements?
    
    [code:1z5h00kl]
    (Assuming the dimensions of the array are w=4 and h=4)
    int max_x = w
    int max_y = h
    int i1
    int i2
    
    for (i1 < max_y;) {
      for(i2 < max_x;) {
        // Here the tiles would be placed
      }
    }  
    [/code:1z5h00kl]
    
    Something along this lines... But how to do it in Construct?
    
    So much for my first few questions (although sometimes not directly asked). You think you can help me getting this to work? : )
    
    Best regards,
    No�l