dop2000's Recent Forum Activity

  • 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.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • 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.

  • 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.

dop2000's avatar

dop2000

Member since 26 May, 2016

Twitter
dop2000 has 247 followers

Connect with dop2000

Trophy Case

  • 8-Year Club
  • Entrepreneur Sold something in the asset store
  • Jupiter Mission Supports Gordon's mission to Jupiter
  • Forum Contributor Made 100 posts in the forums
  • Forum Patron Made 500 posts in the forums
  • Forum Hero Made 1,000 posts in the forums
  • Forum Wizard Made 5,000 posts in the forums
  • Forum Unicorn Made 10,000 posts in the forums
  • x4
    Popular Game One of your games has over 1,000 players
  • x2
    Coach One of your tutorials has over 1,000 readers
  • Educator One of your tutorials has over 10,000 readers
  • Regular Visitor Visited Construct.net 7 days in a row
  • Steady Visitor Visited Construct.net 30 days in a row
  • Enduring Visitor Visited Construct.net 90 days in a row
  • Unrelenting Visitor Visited Construct.net 180 days in a row
  • Continuous Visitor Visited Construct.net 365 days in a row
  • RTFM Read the fabulous manual
  • x3
    Quick Draw First 5 people to up-vote a new Construct 3 release
  • x13
    Great Comment One of your comments gets 3 upvotes
  • Delicious Comment One of your comments gets 10 upvotes
  • Email Verified

Progress

28/44
How to earn trophies