R0J0hound's Recent Forum Activity

  • With seeded random I can calculate the same value every time for a square so I don't have to store the random values in an array.

    For regular random you would need an array to store the random values to interpolate between. I've yet to work out how it would be implemented exactly.

  • sqiddster

    A large array shouldn't be too much of a problem as most computers have a lot of memory.

    I tried out seeded random using the RandomPlus Plugin and here is the result:

    http://dl.dropbox.com/u/5426011/examples16/inf_map.capx

    If you're doing a scroller that goes in only on direction you could use the standard random, but store the values until they are no longer needed for interpolating.

  • Using a large array is an option, it will provide persistence. Shifting the array is another option but you won't be able to use for each xy element. You'll need to set the array in a certain order depending on which direction you shift. For example shifting right:

    for x from 32 to 0

    for y from 0 to 32

    -- set array(x,y) to array(x-1,y)

    A third option that would provide for persistence and and infinite size would be to use or implement a random function that allows you to set the seed.

    One example of this would be Perlin Noise

  • "unload layout textures" still works for images loaded at runtime, but the texture has to have no objects using it. If you loaded the images into a tiledbg instance, you need to destroy that instance before the image can be unloaded. If using sprites to store the loaded textures, then you will have to destroy all the instances of the sprite before it can be unloaded, or just load a small image into the frame you wish to remove.

  • cymrix

    It's a known issue with the canvas plugin. The plugin was originally made using just canvas2d (or no webgl). With webgl enabled every time the object draws, it's image is copied to a texture so it can be drawn, this is what causes the fps drop. The recommended solution is to set webgl to off.

  • That 2nd event is comparing carang1Stolen to choose(1,2,3), you need to set carang1Stolen to choose(1,2,3).

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Those behaviors are family behaviors. If you select the ball family in the projects bar you can edit the behaviors.

  • 1. You'd have to test it and see, and then it would also depend on the device. Generally the size of the image doesn't affect speed. Image size does affect memory usage, and keep in mind that mobile devices have less memory than PCs.

    2. You can do that approach. Load the text file with the ajax object and utilize the System text expressions to read parts of the text.

  • It looks fine to me. What is not working, or rather what is happening?

    My only thought is perhaps an animation is causing another collision in a frame or two.

  • I can think of a few ways to do it. One would be to use the array object to store the list.

    Another idea would be to take advantage of object picking so that the picked objects would be the list.

    In a game of say Chess or Monopoly, every game position would be an instance of a sprite.

    Then the grand pseudo event could look like this:

    +Pick a piece

    +pick game_positions that piece can move to

    +not game_positions that already have a piece on them.

  • In C2 0 degrees is to the right. Up would be -90 or 270 degrees. Chane the angle of your sprite and edit the sprite's image so that it's facing the right.

  • Computers cannot represent 0.1 exactly in binary, so a very close approximation a little less than 0.1 is used. That difference increases every time 0.1 is added.

    One solution would be to replace the TimeSpan=0.8 condition with:

    System Compare abs(TimeSpan-0.8) < 0.0001

    Another would be to only add integers to TimeSpan and set the text to TimeSpan/10.

    A final idea would be to instead of adding to TimeSpan every 0.1 sec, add dt to TimeSpan every tick and set the text to int(TimeSpan*10)/10.