dop2000's Forum Posts

  • [quote:2cbt7wck]this isn't stopping the problem of being able to hold against the wall and just slide up it without leaving the wall

    Do you mean when it's sliding up the wall for about 100px before it starts falling down?

    I think this is not because you continue to hold any button, but because the jump is too high - you decrease the gravity by more than a half, so the character keeps accelerating up.

    The way you are disabling buttons by adding another condition like "wallToLeft=0" is perfectly fine.

  • You can change the "Pick player by UID" event in my demo with "For each player".

    Not sure what are you trying to achieve, could you give more details?

  • I'm sure it's possible, but I can only speculate what you are doing wrong.

    Your current two animations (attack and shield) probably "overwrite" each other, because they include movements of all body parts. If you make attack animation to only move one hand with a weapon, and shield animation to only move another hand with the shield, then you may be able to play both simultaneously. You'll probably need a third animation for the remaining body parts.

    But again, this is only a guess, I may be completely wrong

  • Check that you player's health and fullHealth are the same at the start of the game.

    Actually, you don't even need lerp (I like it so much I use it everywhere ), this formula is easier:

    bar.width=110 * (player.health/player.fullHealth)

  • You are testing line of sight for 3 instances at once, if any 2 of them have each other in sight, your condition will be true.

    If you need to test if left player instance sees another player instance, you need to pick left player first.

    But then your event "player has line of sight to player" will not work, because "player" now refers to only 1 picked instance.

    There is a workaround using a family, see this demo:

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

  • Could you use a different file sharing service? I don't want to give them my email address.

  • I haven't tried this but I think this should work:

    For example your layout is 100.000px long and your screen size is 1024x768

    Make the first 1024px and the last 1024px of your layout look identical.

    Once the player.X>=(100000-1024/2), set its position to Player.X-(100000-1024)

    This should teleport it to the beginning of the layout

  • First of all, your link doesn't work.

    I've seen this tutorial before and frankly, I don't like it. I think it's overly complicated.

    Search for "inventory" on this page, there are lots of other tutorials which may work better for you:

    https://www.scirra.com/tutorials/all

  • You can use lerp function.

    Healthbar -> Set width to Lerp(0, 110, (player.currentHealth/player.maxHealth))

    So, for example if player.maxHealth=130 and currentHealth=65, then the healthbar.width will be set to 55px

  • TRMG

    I don't have any experience with Spriter either, but I did a little googling and found the feature called character maps. Are you using it?

    https://www.brashmonkey.com/spriter_man ... 20maps.htm

    It allows you to replace parts of your animation, for example change a helmet or weapon. If it can be done with one weapon, I'm guessing you can easily do the same with the second weapon in another hand.

  • I don't think there is an easy way to do it.

    I recently converted lots of global variables to local static and actually your post made me realize that some of them need to be reset when a new level starts. I had to create several events that reset them to 0 one by one.

  • Simple angle(player.x, player.y, bullet.x, bullet.y) should work.

  • Try Construct 3

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

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

    Christmas

    Here is a new version. It doesn't need the Detector sprite anymore, works faster and spawns particles even when the asteroid sprite is located fully inside the ship sprite.

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

  • Wow, that was the longest sentence I've read the whole week!

    So what's your question? You want us to create the game for you?

    This is not how this forum works. You need to read a few tutorials first and then start developing your game, and if you have a problem, you should try to fix it yourself, and if you can't fix it, try googling and reading more tutorials, and if that fails too, only then you post it here

    Also, your link is broken.

  • dop2000 - 25x25 is just where it starts to faulter. I'm really trying to aim for 100x100. Think of each pixel of the heightmap as a chunk of the map. The idea is to take every chunk and expand it into a second array so that chunk is in reality 100x100 tiles. I do realize this is an absurd amount of data. As far as reusing the array I could, but wouldn't that wind up in losing the processed data. I suppose I could dump it to json after ever single cell expansion of the main map. Would be a lot of files being created however.

    gskunk

    Still, why do you need to hold all 10.000 chunks of the map in full detail in memory at all times?

    Take Google Maps approach - it loads a portion of the map only when you zoom into it.

    You can load/generate a block of 3x3 chunks to allow players to move freely and load new chunks once they move to a new area.

    Also, how do you populate that second array? If it's randomly generated, you should use seeded random, this will allow you to store just one number in the first array (the seed) and you will not need the second array at all! You will be able to recreate the data in each chunk of map at any time from the seed.

    And if your player makes some changes on the map (kills enemies, opens chests etc.) and you need to keep track of these changes, maybe consider creating another array just for that. It could be something as simple as [tile, newdata].

    This will save you hundreds Mbytes of memory.

    EDIT: You can go even further and get rid of the first array too!

    Compress your entire 100 million tiles map into a single number - MasterSeed.

    Use MasterSeed and a pixel from your heightmap image to generate MapChunkSeed, then use MapChunkSeed to generate 100x100 tiles portion of the map. You probably should be able to do this in real-time with very little or no lag.