R0J0hound's Forum Posts

  • It was intentional to have all the instances share the same image. So say you have 100 instances then they would all share the same image. The issue of having a different image per image for tilesets is the image would be duplicated needlessly and consume memory.

    A better solution would be to have multiple textures in the type (like animations) so you could just specify which spritesheet per instance. That way the texture wouldn't be duplicated needlessly.

    No ETA on making such a change though.

  • Well to check if a certain tile at say x,y has air above it you can do this:

    Array at (x,y-1) = 0

    So to do it for everything do this:

    Array: for each xy

    Array current value >0

    --- create tile

    ------- Array at curx,cury-1 = 0

    ------------ make tile grass covered

  • You can do that with an equation

    Every tick

    ---sprite: set scale to lerp(0.2, 1, sprite.y/480)

    That will set the scale to 0.2 if y is 0 and set the scale to 1 if y is 480. All other y positions will set the scale smoothly from the y position. You can play with the numbers until you get the look you want.

  • Re-work your events like this to pick all the top blocks with health 0.

  • What shape is the environment?

    If it's just square you could do this:

    Could you make the player's collision poly round and bounce the balls off the player? The bounce off object action may work well enough for that to get the ball out of the horizontal path.

  • You possibly can get better results by doing something like this if you only have vertical and horizontal walls:

    Corners are a bit odd with the ball, but square against square should work well.

  • Since you're using a while loop I'd guess you have an infinite loop somehow.

    One thing I notice is if 9 is ever needed it won't work since

    floor(random(1,9)) will only give values from 1 to 8

    Why?

    random(n) will only give values from 0 up to but not including n.

    Instead you should do floor(random(1,10)) if you want 9 included.

  • [quote:2tts55ja]How can i limit rotation of a curve path?

    I do not understand this question.

    If you want it to turn to the direction to move before moving then you'll have to do it manually with events.

    Maybe something like

    every tick

    --- sprite: rotate 100*dt degrees to target_angle

    Sprite: angle is within 0.5 degrees of target_angle

    --- sprite: move forward

  • Jermfire

    It could be the browser you use doesn't support webgl

    look here:

    http://get.webgl.org/

    For me on Firefox 30 I see:

    [quote:1lyb82wu]Your browser supports WebGL

    And the fluid example works.

    But on internet explorer 11 I see.

    [quote:1lyb82wu]Your browser supports WebGL

    However, it indicates that support is experimental; Not all WebGL functionality may be supported, and content may not run as expected.

    And the fluid example doesn't work.

  • capx files can be extracted with an unzip program to get at all the files inside. Sounds like something has been corrupted with it if it says a file is missing. Do you have any backups?

    What I'd try is extracting the capx to a folder, look in the "layouts" folder and see if there are any other xml files there. If there are you could try to copy one and rename it to Menu.xml. What that would do is copy a layout that is still there so you can at least open the project. Then go to the parent directory and open the .caproj file and see what happens.

    Best case you'd have a recent backup. Next best case would be the above steps would work and you'd only have to remake your menu layout.

  • By material I mean rock/dirt/air/etc... In the array it would be just an integer like 0 for air, 1 for dirt, 2 for rock...

    But to be simple you can do 0-air and 1-dirt.

    The attached capx has almost every kind of terrain generation I could think of. At the very least it gives something to play with. Basically any sort of generation will be an equation and you then fiddle with the numbers to get different effects.

    Most of it isn't very complicated, not even the equations, although they can look busy. I'll break down one of them, the "dual sine":

    (2+rnd1)*sin((2.1+rnd2)*360*Array.CurX/40+33*rnd3)+(3+rnd4)*sin((1.5+rnd5)*360*Array.CurX/40)+15[/code:1bq00sn3]
    Basically this is two sine waves added together. The general form of a sine equation is:
    y = amplitude * sin(frequency * x + offset)
    When two or more sine equations (with different amplitude, frequency and/or offset ) are added together you get an interesting smooth curve.  All the numbers are pretty much arbitrary except for 15 which is centering it vertically in the array.  The only other values that are somewhat important are the ones that define the amplitude such as (2+rnd1) or (3+rnd4), which I picked to make sure the hills don't get too high or low.  As it is it has a vertical range of 14.
  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Slider -> set CSS style "transform" to "rotate(90deg)"

  • The tilemap has no angle so the most you can do is rotate the angle of the layer the tilemap is on.

  • Doing it with an array is just as easy. The only difference really is you're setting a value to the array instead of creating the object right away. You could do it in two passes but really it's basically the same as above.

    array for each xy

    --- array set at (array.curX, array.curY) to noisejs.perlin2(this.curx/this.width*noise_scaling, this.cury/this.height*noise_scaling) + lerp(-1, 1, this.cury/this.height)

    array for each xy

    --- array set at (array.curX, array.curY) to this.curValue>0

    With that it's just one material. For two you could do

    array for each xy

    --- array set at (array.curX, array.curY) to round(max(this.curValue*2))

  • Use your own hosting like Dropbox or something instead of the arcade.