R0J0hound's Recent Forum Activity

  • Nothing obvious comes to mind. My testing when I made it was pretty limited, I never have used webview+ or canvas+.

    My guess is there's something with webgl or the canvas dom is a bit different between the two, or maybe the C2 runtime sets up the webgl state slightly different depending on which is used.

    I don't plan on working on the plugin anymore, so I don't have a fix or solution.

    cheers

  • OhhBaby

    I can't see your images.

  • Sprites are best for general purpose stuff. For animation they are a must unless you are willing to hide multiple objects and only show one at a time.

    If you have areas where a texture is repeated then a tiledbackground can be useful because it can render that as one object. If you need it animated that’s not what it’s for.

    If the objects are laid out in a grid you can look at the tilemap object. Again it’s not animated but it is faster than rendering multiple sprites, and collision detection is a bit faster with it.

    The rule of thumb is sprites are general purpose and the other objects are special purpose that are faster in some ways but less flexible.

    Other objects that may be useful:

    Spritesheet - lets you select a subrectangle of a texture to draw instead of the whole thing.

    Paster - lets you draw objects to it so you don’t have to redraw it every frame normally.

    Anyways if the game runs slow, the rendering of that many objects is the main bottleneck. You may just need to scale the amount of objects back.

    For the logic you can do

    Tree: myscale<1

    —- tree: set myscale to min(1, self.myscale+dt)

    Or whatever the variable name is.

    The condition only updates the trees that aren’t full grown, and stops at 1. Is that what you were after?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • It’s the same download as the free version. You put that file in the same folder or in your documents and then when c2 runs it will see the file and unlock to be the full version.

  • The example I made was only for one axis of infinite scrolling.

    Two scroll both we need to do something a bit different. Basically four copies of each object.

    https://www.dropbox.com/s/sw2z30j560be0 ... .capx?dl=1

  • If you don't use solid you can make the player stand perfectly on the sphere like so:

    every tick

    --- player: set angle toward earth.x, earth.y

    --- player: rotate 90 degrees counterclockwise

    distance(earth.x,earth.y,player.x,player.y) <= radius

    --- player: set position to earth

    --- player: move radius pixels at angle player.angle+90

    Making the platform behavior happy is another issue. Since there is no solid, the platform behavior doesn't know when it's on the ground. You can do the logic manually though. When the second event runs, the player is on the earth, so you can add a sub-event to check for the jump key is pressed and then simulate a jump.

    Walking could be done similarly, but for smoothest motion I suppose you can be more clever.

  • NetOne

    No worries. It’s basically a way to access objects like a programming language such as JavaScript or c++ would.

    Maybe useful when using some data structure more complex than a single array or dictionary.

    I need to attempt using it for something to see if it helps or is more tedius than using a bunch of picking tricks.

    For now it’s kind of cool that I can create a bunch of arrays and dictionaries linked together by uids and be able to access things with a single line.

    Did the usb drive just stop working or did it’s file system get corrupted?

    If it’s the latter you may have luck with a recovery tool that just scans the drive in a low level way and gets any files it can find.

    If it’s the former there are companies that can recover data off of broken hardware like that. I’ve never used it but from what I saw they often let you send your device to them and they’ll look at it and give you a quote to do the recovery. You may be able to just contact them to get a ballpark estimate since I’m guessing it’s case by case.

    Anyways cheers

  • A rough idea would be to use one or more perlin noise textures moving around, then use a gradient sprite to have it fade. You can use the particle effect too but with a much smaller spray rate, it's only needed for the little pixies.

    Here's a proof of concept:

    https://www.dropbox.com/s/77v8r2wp0nwpi ... .capx?dl=1

    Multiple instances of the same noise texture randomly scaled and moving forward with random speed and angle. I also threw a sine on the opacity for more variance. I then used a gradient and a solid sprite so everything fades to black. If you use images with alpha instead of b/w you could probably use a blend mode instead.

    One thing i didn't address is if you watch it long enough you will see the edges of the sprites pass by. Some way to wrap it around would be nice.

    Actually if you feather the edge of the noise texture and throw it in a particle object with a low flow rate you can get close to the same effect. Just use the blending trick.

    Anyways just some ideas.

  • You probably can, it's busy programming work mainly. You'll need to look at the format of the tmx file and take the xml file contents and convert it over piece by piece.

    As I recall the tiles are stored in a compact fashion, but eh. It's just a matter of writing out text according to the tmx file format spec and saving it to a file.

  • If the screen height is 480, then half of it is 240 and you can do this:

    Set scale to lerp(0.6, 1, (sprite.y-240)/240)

  • New version. Added a json parser that just creates a bunch of c2 arrays and dictionaries.

    Also fixed some mistakes and made a console with better error feedback.

    https://www.dropbox.com/s/0lq0i3diuz3db ... .capx?dl=1

    I guess the biggest disadvantage of this is the programmer has to keep track if a value is a uid or just a number.

R0J0hound's avatar

R0J0hound

Member since 15 Jun, 2009

Twitter
R0J0hound has 157 followers

Connect with R0J0hound