RafaelMatos's Recent Forum Activity

  • Hi, I'm working in a 2d platformer game that will combine some similar features from path of exile and risk of rain. It's just a brief demonstration. Some incomplete animations, enemy AI bugs and still lots of work ahead.

    Video:

  • I've no idea what I'm doing.

    Lol. Are you using that 3d plugin?

  • With family you can set a value to their family instance variable and then spawn only those Who have this value.

  • I'd like to know how could I apply probabilities in c2. For example, i have 20% of getting the value 1 Or 50% of getting another value and so on. The reason of this is that i need to create something random but in the same time control this randomness. Also Will be usefull when i add critical strike chance to the character.

    Thanks.

    Edit: I thought about using the random expression and use numbers from 0 to 100. Like if random(0,100) <= 20 then i have a chance of 20% of doing something. Is this expression reliable to do such thing?

  • Thats what i'm trying to do:

    I have X numbers of enemies. For each of them I have it's animation and Hitbox. So I separated like this:

    Family_Enemy_Obj: Enemy1_Obj, Enemy2_Obj, Enemy3_Obj.....

    Family_Enemy_Skin: Enemy1_Skin, Enemy2_Skin, Enemy3_Skin.....

    Family_Enemy_HitBox: Enemy1_HitBox, Enemy2_HitBox, Enemy3_HitBox.....

    As you can see I'm trying to use family so i don't need to create the same events over and over for each enemy, like their AI, simple movements, etc. Although, I can't do it right. Basically, all gets messy and wrong instances are picked and so on. So, it all comes to how am I going to pick the right instance between them? I've tried, at their creation, set their UID in their instance variables to link them so I'd know who is who and receive the right orders.

    Thanks!

    Edit: Forgot to mention that they are in containers(enemy_obj , skin and hitbox)

  • R0J0hound

    Awesome! Your example gave me some ideas on how to do other things as well. Thanks!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • R0J0hound

    Pretty nice, I'd never think this way. I was thinking about using just 4 tilemaps, 2 for the X and 2 for the Y.

    Here is the beginning. https://www.dropbox.com/s/z5upfgvu6euxc ... .capx?dl=0

    I still need to make the tilemaps arrangement for the Y axis, place underground materials, caves and the most difficult, generate enemies and the blocks that were broken and record both. But now I have a good starting point.

    You helped a lot, man. Thank you.

  • Using a tilemap for this could be tricky and may not give any gains since it looks like you'd have to update the whole tilemap every time you scroll. I'll have to think about it some more though.

    Scrolling in other directions will only take one event a piece, and will look much like the one to scroll right. I'm away from my PC atm.

    Only the randomize seed action sets the state. The perlin2 expression will always give the same value for an xy if the seed is the same.

    I see, so the result would be the same generation but "mirrored".

    I wanted to use tilemap because using several objects will harm a lot the game's performance and, for an 8x8 or16x16 tile, which is what i'm focusing, would be unplayable.

    I might think another alternative where I don't need to save an infinity world generation and all it's changes made by the player, since that's the whole point of using this plugin. Although wouldn't fit well in a game like Terraria that I'm trying to create.

  • Thanks for your time, R0J0hound

    I'm playing with the formula and I'll try to adapt your example using tilemap instead of objects, as scrolling both sides/top/down. Btw, your example is absurdly powerful already.

    One curiosity about this plugin: noisejs.perlin2 expression is setting the new state of the object by itself? Because it's just a compare value condition which doesn't pick any object and there are no other event updating block's Y.

  • R0J0hound

    Could you explain me this formula?

    if (3+rnd1*1)*sin((1.5+rnd2)*360*Array.CurX/40+rnd3*45)+15 < Array.CurY

    Are all the values arbitrary? Why greater than CurY? Also, I don't see you using Seed here. I'm struggling with this plugin and with all your formulas to make things work.

    I'm attempting to give up because my math skill isn't great.

    My idea for the game is to create a sandbox world. To do that in C2 I need to move everything, instead of moving the player right? So if the player "move" to the Right, the world have to move to the left, eventually the first column of the array will be deleted to give space to the last column on the right to update the map. The same if I'm going down. The perlin noise and all your examples allow me to do that, right? If so, could you explain me a bit about the formulas and what they represent? I'm really lost right now, specially with these arbitrary values.

    Edit: Also it seems that these formulas rely on the CurX and Y. In my limited understanding, it seems that it wont generate new terrain but repeating the same as the last pattern created in that same X and Y because all the values are the same in this case - rnd variables, the axis...

  • R0J0hound

    I'll try to learn from your example. Thanks

  • Hi PixelRebirth Sorry for asking this after so much time but, I've saw your example about how to use it in a platform game like terraria and I didn't understand (I'm new to this concept)

    noisejs.simplex2(loopindex("x"), loopindex("y")) < 0.25

    While 0.25? What does this expression means?That this noise value will take place in that specific x and y coordinates?

    while temp = -1?

    etc

    Basically i didn't understand any of the values you put, what impact it does at the map generation and the conditions to destroy the blocks.

    Thanks!

RafaelMatos's avatar

RafaelMatos

Member since 8 Mar, 2014

Twitter
RafaelMatos has 1 followers

Connect with RafaelMatos

Trophy Case

  • 10-Year Club
  • Entrepreneur Sold something in the asset store
  • Forum Contributor Made 100 posts in the forums
  • Forum Patron Made 500 posts in the forums
  • Regular Visitor Visited Construct.net 7 days in a row
  • Steady Visitor Visited Construct.net 30 days in a row
  • Enduring Visitor Visited Construct.net 90 days in a row
  • RTFM Read the fabulous manual
  • Email Verified

Progress

18/44
How to earn trophies