Spider_hip's Recent Forum Activity

  • My bad about movement. Thank you. I added inverted up-down arrows to solve that, and works like a charm now.

    Well actually I wanted to ask to set value to points, like "set value at" (arrays)

    Beceause I made something like this with arrays.

    dl.dropbox.com/u/56268958/neigbor-algorithm.capx

    And I pretty liked the result.

    First I randomly set values to all array points. Then for each xy, I look for neighbor values. %50 chanse to convert current point to neighbors sum.

    <img src="https://dl.dropbox.com/u/56268958/randomkomsu.jpg" border="0" />

    There are 4 green, 2 blue and 2 red neighbors. So mid square has a %50 chanse to convert to green. So it becomes like , continents at the end(with a 2-3 repeats).

    It's like this logic

    emanueleferonato.com/2011/05/13/flash-procedural-map-generation-example-land-and-water

    It divides squares. And gives chanse for child squares to look like mother square. But mine looks for neighbors. And looks like to them.

    I wanted to do smth like this with your beatiful board plugin.

    Sorry for my bad english.

  • Is there anyway to set a value at points (0,0) like at arrays. I tried it with board instance or with hex tx instance.

    For x 0 to 9

    y 0 to 9

    add 1 to value

    then on button click It gives only sum (100)

    ------------------------------------

    With hex tx, I created a chess object. Then I tried to move it with grid move(hexagon) Up arrow is down, right arrow pressed It moves two squares right one square up, if two squares are available.

    dl.dropbox.com/u/56268958/hextx-test.capx

    It would be really great if somene could share hex tx example.

    Thank you

  • vee41

    thank you very much. I'll try that too.

    Or just use the max function.

    largestValue = Max(apple, pear, banana, watermelon)

    Wow I didn't know this either.

    Well what if there are 2 variables which have same max values then what will be the result ?

    Thank you

  • Hi all.

    Let's say we have apple, pear, banana, watermelon variables. And they have random values.

    How can I get which one has the biggest value ? And If there are 2 or 3 varibles which have same biggest values, then learn that ?

    This is a very long way if there are more than 4 varibles;

    if apple > pear and apple > banana and apple > watermelon

    if pear > apple etc ect.

    Also if there are 2 variables which have same biggest values if condition goes bigger :(

    Is there any easier way ? Thank you very much.

  • egos

    Can you please share other ways to make revenue. This is important for developers.

    I think 2000 plays = 4 dollars not so bad at all. If you can make an addictive game such as penguin learn to fly game. It has been 1,5 years and It has played 17,000,000 times. Which makes 36.000 dollars in a 1,5 year. And This is just a one way to make revenue. Omg, I bet they made close revenue with other 3-4 sites at least. Which makes around 130K dollars I guess. Not bad at all for a one game. :)

  • I'm sorry about first .capx I get it it was a bit silly.

    I just realized that array.front doesn't mean current(X)+1. It means first x point.

    So I changed my related code part with, Array.At(Array.CurX+1,Array.CurY)

    Now the problem is just above that part. It's,

    if currentX+1 's value is 0 or 1 or 2 ( I wrote this beceause if it's last column there won't be a (x+1,y)point. So there won't be a value. So I wanted to leave last column as it is.) But It doesn't do anything.

    The funny and weird part is that code was

    if currentX+1'value => than 0 and

    if currentX+1'value =< than 2 then do smth.

    When do code was like it was doing smth(not as I expected)

    Lol I'm confused that both codes should be same right ?

    Here is my latest capx file. Thank you for any help.

    dl.dropbox.com/u/56268958/test-procedural2.capx

  • Wow thank you for your great explanations.

    Now I get it.

    Finally I just want to ask one more thing. Already everything wrotes at comments at this example.

    dl.dropbox.com/u/56268958/test-procedural2.capx

    Thank you very much.

  • Thank you for your quick reply.

    So actually at first, latest column(11th) and latest row(11th) didn't get any values beceause there is not 11th elements at array.

    So if I do like as you said, width-1 or if I start for from 1 to array.width does the same job right ?

  • Hi all.

    array.width = 10

    array.height = 10

    I created an array with

    -for x from 0 to array width

    --for y from 0 to array height

    *create object sprite at(loopIndex("x")*17,loopIndex("y")*17)

    *array.set value at(loopIndex("x"),loopIndex("y")) to random(3)

    *sprite.set animation frame to array.value

    <img src="https://www.dropbox.com/s/mqlv5zmtzcub2wm/first.jpg" border="0" />

    so far so good It creates randomly framed 11 to 11 sprites.

    weirdness starts from now on

    -button on click

    --for each sprite

    *delete.sprite

    --array. for each xy element

    *create object sprite at((TwoDimensionalArray.CurX)*17,(TwoDimensionalArray.CurY)*17)

    <img src="https://www.dropbox.com/s/o81ezt8qq4bsx37/duo.jpg" border="0" />

    It creates 10 to 10 sprites ?!?

    Why not 11 ?

  • Hi, I'm confused about creating a simple but procedural 2d map.

    First of all I think I should use neighbor technique such as;

    if (0,0) = 1 then (1,0) is more likely equals to 1

    or maybe more advanced but I don't know if it's efficent we can use;

    Array Map:

    2 3 1

    1 X 3

    1 2 1

    Sum = sum of neighbor tiles values. In this example its 1(there are four pieces 1, two pieces 2 and two pieces 3)

    X value is more likely to neighbor sum value.

    To understand basics. First I randomly created an 2d array with random(3) to their values.

    Then with a button click, I wanted to activate my procedur but it works differently. I looked

    for each xy element,

    if current array's value is different with array.front value then

    randomize50(2)

    if randomize50 = 1 then set current value as array.fronts value

    if randomize50 = 0 then it's still at same value.

    But it seems it chooses a value, and equals all arrays to that value as I click to button.

    -------------------------------

    I don't know how can I reach to all neighbors ? Maybe with array.at(cur.x-1,cury) and so on.

    Maybe you already recognised, when I click to button, it doesn't create tiles at final x and y lines. How Can I prevent it to count if there is no array (-1,0) or (0,-1) or (array.width+1) I think reason of that problem is about that.

    -------------------------------

    Finally if I can resolve these problems, I may probably solve this but anyway I want to ask, how can I prevent array to create same value in range of X. For example if there is value 3 at (5,5) then if there are more value 3 at range of 2 (6,6)(7,7)(6,7)(7,6) and so on, then randomize that array till there aren't any 2 value at range.

    Here is my cap file.

    dl.dropbox.com/u/56268958/test-procedural.capx

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I'm completely confused.

    I just tried to make my Procedural tile map generation. there is a tile object with 3 frames.

    for x from 0 to 10

    for y from 0 to 10

    create tile to loopindex(x), loopindex(y)

    stop animation

    tile.frame = random(3)

    set animation frame to tile.frame

    It creates random framed map.

    Now I want to make

    (Neither I can't get chess.chess.UID's sub properties nor loopindex(x)-1. sub properties)

    compare loopindex(x)-1.tile.frame not equal loopindex(x).tile frame then

    global.randomize50 = random(1)

    if global.randomize50 = 1 then

    loopindex(x).set animation frame = loopindex(x)-1.tile.frame

    Which I try to do is if a tile is frame 1 then %50 chanse for tile which is on right is also frame 1.

    Maybe I don't have enough english to explain my self. Sorry about that.

    I just tried to make smth like perlin. Like stones pile up somewhere, irons pile up somewhere else (with high probability)

    ----------------------------------

    I know I really have to learn math. I unfortunately suck at math.

    my second problem is, Is there anyway to do smth like

    if there is tile.frame = 2 then

    for 5 squares range there is not another tile.frame = 2

    maybe this is not the place to ask these questions. I wish if there was a way to get object's property's with for example

    Chess.Chess.DIR2UID(2,0).private variable

    But I can't access to exact tiles while on for condition.

    Sorry to disturb.

    Thanks for any advice

  • Hi rexrainbow.

    Is there a way to implement something like perlin noise with your plugin to generate a random but good looking logical maps ?

    Thank you

Spider_hip's avatar

Spider_hip

Member since 15 May, 2011

None one is following Spider_hip yet!

Trophy Case

  • 13-Year Club
  • Email Verified

Progress

14/44
How to earn trophies