Zed2100's Recent Forum Activity

  • You can even create a custom behavior using the javascript sdk if you know how to. However, for 2 tilemaps, the custom scrolling shouldn't take more than a few events.

    I'm facing similar challenges with my Parallax Backgrounds behavior. Not only do I have scrolling, but also zooming, parallaxing and screen wrapping in all directions. If you succeed in implementing the solution, I would love to know about it.

  • A better approach would be to scrap this terrible idea entirely.

    Early optimization is the bane of game development.

    Most of the processing power is consumed by the graphics, so unless your framerate drops to 5, you're good.

    Are you making a RimWorld/Dwarf Fortress clone where even cat poop is tracked? If not, then don't bother.

  • ... or have unbounded scrolling and ignore the layout size completely.

  • I'm making an open world game and for the procedural generation I need to change the layout size, but how do I do it?

    Can't be done. You can't change the layout size at runtime.

    What you can do is have multiple layouts with doors between them. An example that comes to mind is Evoland and Stardew Valley.

    Or you can have a giant layout and generate your world inside it.

    You didn't give much informations, so I'm afraid I can't help you further until you do.

  • At this point, i was going to implement "lives" in my C2 first game, so i'll read this.

    The idea of using tiled backgrounds adjusted to sprite width is fine, but if you have an animated sprite won't work, i see lots of possible solutions, thanks

    OMG why did you bump a 4 years old thread?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • This is a complex problem and should be broken down into multiple smaller problems :

    First: how to know that the player has passed a checkpoint.

    Checking for overlap is a bad idea. If the player jumps or misses the checkpoint then it won't work.

    A better solution is to compare the X coordinate of the checkpoint to the X coordinate of the player. I suppose you're making a side-scroller (otherwise, you can switch X with Y). So the player will pass when her X is greater than the checkpoint's X. Maybe throw in a flag to mark the checkpoint as passed.

    Next :

    "first, I want the user to be able to continue only onetime. meaning that when he dies first time and continue, the second time he does not have the option to continue again. Currently the continue windows appears everytime the player dies."

    Have a global variable named "DeathCount" (initialized to zero), increment it whenever the player dies. Before you increment it, check if its value is equal to 1, if yes then show your game over window, if not, then just respawn the player.

    Next mini-problem: Saving the progress

    Well from a game design perspective. I'd say don't even bother. No one is going to bother saving their progress in an endless runner, especially if it's for mobile or browser.

    Let's say you want that anyway, your solution works. The system's "save/load" functions will do the job just fine.

    Next mini-problem: The death save

    Use the WebStorage plugin to save a simple flag, let's call it "SaveIsValid", set it to 0 when the save slot is a death slot, and set it to 1 when it's ok for the player to continue the game.

  • Allow me to add to the conversation by pointing to my (paid) addons :

    • Health lets you toggle invincibility with a simple action.
    • As said previously, the wait action can cause all sorts of problems, the solution is using FSM to create two states: "Idle" and "Invincible", and using a timed transition to go from invincible to idle.

    I'm going to release a Construct 3 update to the addons by the end of the week. You can buy them now and receive the update for free.

  • Mixing the graphics with the game logic is usually a very bad idea. You want to separate them, to allow both to live in their own world, so in case you want to change an animation name or a variable name it doesn't mess up your whole project.

    Don't focus on how to achieve this particular task, what is your overall objective ? Why do you need to bind variables to animations ? What are you trying to achieve?

  • I would not use layout scrolling for the map. As you said, if you have multiple levels, each with a different size, the map would be limited to the level's size, which could be smaller than the map.

    Instead, I would suggest implementing custom scrolling events for the objects that make up your map. You didn't tell how you built your map. But I would guess it's made of sprites?

    You can add all these sprites to one family, then, in the event sheet, implement a function to scroll the family. It's not that hard. Here is an idea :

    You will need a reference point on your map, so create a sprite and call it "MapMarker". Place it on your map layer at the top-left position. All coordinates on the map will be computed from this point.

    Give your map layer parallax values of (0,0) so we completely disable the built-in parallax/scrolling system.

    Problem: How to scroll to a point on the map.

    Here is what we know :

    • At all times, we know the position of the marker on the layout. Let's call it Pm
    • We also know the point at which we're looking at right now, let's call it Point 1.

    Point 1 in map space will be equal to (Screen Width/2, ScreenHeight/2) - Pm

    So in order to scroll from Point 1 to Point 2, you need to translate all the objects on the map (including the marker), by a vector equal to Point2 - Point 1

    Just my humble opinion.

  • [quote:3uih6r8g]Thanks for noticing! No, it's not a mistake at all.

    I'm offering the addon for free, and I'm also selling it. Both version are exactly the same.

    Ok, but you need 2 posts for that? Hah it's none of my business, it's just my OCD kicking in lol. Oh amazing plugin by the way, fantastic work. Thanks!

    It's how these forums work. This thread was automatically created after I published the addon to the store, while the other thread was already there, so I ended up with 2 of them. I just roll with it

    I don't care about the logistics, what matters to me is answering support questions properly and getting feedback to improve the addons.

    You don't need to bother reading both threads, I'm compiling everything in the PDF manual that ships with the addon. So you can safely redirect your OCD to building pixel perfect structures in minecraft, or fuel efficient rockets in Kerbal Space Program

  • You made a post a day before with the same behavior for free: . So...do you intend to only sell it or can I get this for free? This seems like a mistake, you should probably ask Scirra to delete your other post.

    Thanks for noticing! No, it's not a mistake at all.

    I'm offering the addon for free, and I'm also selling it. Both version are exactly the same.

    This allows me to :

    • Give back to the community. I know it's cheesy but it's true. I wouldn't be the developer I am today if not for the kindness of people around these forums and the people who made Construct.
    • Allow people to support my work, since I spend a ton of hours coding, doing QA testing, writing the manual, making demos, etc. I'm doing this professionally, I'm not a hobbyist, I want the money to build even more beautiful games, addons, etc. All the funds I make on the scirra store are directly reinvested in better software, better art, better tools, game dev books and courses, better equipment, etc.
    • I want to advertise my products by offering my flagship product for free. I'm very proud of the work I've made on Parallax Backgrounds, Health and FSM. I want more people to use them in their games.
  • You do not have permission to view this post

Zed2100's avatar

Zed2100

Member since 15 Jul, 2014

Twitter
Zed2100 has 64 followers

Connect with Zed2100

Trophy Case

  • 10-Year Club
  • x2
    Popular Game One of your games has over 1,000 players
  • x2
    Famous Game One of your games has over 10,000 players
  • Viral Game One of your games has over 100,000 players
  • RTFM Read the fabulous manual
  • Email Verified

Progress

15/44
How to earn trophies