R0J0's experiments

1 favourites
  • alextro

    Haha, thanks for pointing that out. I typed that too fast and spellcheck let me down.

  • I thought it has something related to genetic algorithm and the forming islands show that

  • Very impressive examples. I watched the ski terrain demo long enough several times that it eventually got to the point where the terrain pretty much goes vertical. I was wondering if you knew what causes that.

  • MathNook

    That's all the terrain that was generated, and after that it goes to 0. Changing the size of the array will change how much is generated.

  • Ah okay that makes sense. Now I'll see if I can figure out how to make it go on indefinitely. Thanks.

  • MathNook

    The simplest way would be to use perlin noise instead of an array of random values. There's a noise plugin that can help with that. Not sure if the example can be tweaked that way.

    Another idea is to loop the array. Basically you have a front index and a back index. You start with the array filled and back as 0. Front is the current position. Once it's a certain distance from back, the value at back is set to a new random value and one is added to back. Or something like that. I'd probably start from scratch since the idea is different enough.

  • R0J0hound

    Regarding the the terrain generator, how much more complicated would be to get something like mine blocks (minecraft 2d) done?

  • jogosgratispro

    Not very I'd imagine. This terrain is based on an idea that mudmask linked to. It just randomizes the array then smooths it for a island like look. Side view stuff is probably better done with perlin noise I'd imagine.

  • R0J0hound

    Great. Thanks for the suggestions.

  • Just want to preface this post by saying that I'm a complete construct noob.

    Now that that's out of the way, this ski terrain is really neat and I was wondering how I would go about making the terrain change every so often to be flatter/horizontal/steeper etc. and then resuming its wild and crazy hill-making shenanigans.

    Also, there's a way to add working touch controls, right? When trying to stumble my way through it, It seems that no matter how many times I tap the screen the player only jumps once (probably to spite how noob I am) as opposed to jumping each time the screen is tapped.

    Would love to get the hang of how all of this sorta works. Hopefully this isn't a tall order to fill.

    Any and all help is appreciated

    Side note: sorry for casting Thread Necromancy

  • Hello,

    Event number 8 defines the shape of the slope: random(480)+steepness*loopindex

    Making steepness and 480 lower would make the terrain flatter.

    I guess you could make a sub-event like the following to have the steepness change every five steps.

    system: compare loopindex%5=0

    --- set steepness to random(10,100)

    At least that's the idea.

    Controls at all don't make sense in this capx because it's non-interactive. I guess you'd put you control events above event 10 and in them change either ax,ay (acceleration) or vx,vy (velocity) instance variables of the skier.

  • R0J0hound,

    I've been a fan for years, but haven't seen this thread until now. This, and pretty much every other insightful comment you make, should be stickied for posterity.

    Thank you, thank you, for this wonderful treasure trove!

  • R0J0hound

    Thanks a ton for the reply. That definitely helps with grasping some things.

    Not sure if I'm doing something wrong, but for some reason when I add a sub-event to event #8, it only allows me to set the value of dot. Also I'm having trouble with adding a control event above event 10; I keep getting a pop-up message about the amount of triggers per event branch.

  • Try Construct 3

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

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

    Thanks, I'm glad you enjoy it.

    Pwnetheus

    I don't know the cause for the first bit. For the second it sounds like you're adding another condition instead of another event. You may want to run through a few tutorials and maybe read the events section of the manual. I'm not that great at explaining that stuff.

  • R0J0hound

    Thanks for the help.

    I realized I had to change Steepness to a non-constant variable and that allowed me to tinker with things. I also moved touch controls way up (rather than directly above event 10 like I was previously doing for some reason) and construct doesn't give me any errors or issues. So it seems I'm making some sort of progress.

    A neat thing I noticed is that adding platform behavior allowed the player to stay grounded on beziers (apart from control input) but it negated the effects of setting/changing ax/ay/vx/vy (making changes only granted a temporary burst of speed) and also only allowed 1 jump when simulating jump controls. Does this mean I'll be unable to have consistent jump control over the player so long as I've added the platform behavior?

    I also noticed some odd behavior with the player lagging behind the middle sprite instance, but setting x to sprite.x seems to have solved that issue.

    What I'm trying to figure out now is if there's a way to specifically set the player's fall speed without messing with everything else. Is that doable?

    Lastly, I was wondering, in addition to modifying the Steepness, is there any way to actually pause the formation of beziers altogether?

    Thanks again for taking the time to help and pointing me in the right direction

    =)

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)