dop2000's Forum Posts

  • Tom, the thing is - without signatures and any info in profiles people on this forum kind of lost their identity and individuality.. Everybody look the same now (well, apart from the avatars). There is zero information about who everybody are, what they do, what country they are from, what games they make... If you ask me, this is not a good thing.

  • Tom, why do we have fields like "Occupation", "Email address", "About you", if they are not displayed in public profile? Could you make them visible?

  • Just set Unbounded scrolling=Yes in layout properties.

  • Could you explain why do you need to disable Solid for the floor under your character?

  • I don't understand what's going on in your code, and sprite names like "P1" and "G2" don't help..

    Have you seen this tutorial?

    gamedevelopment.tutsplus.com/series/make-a-match-3-game-in-construct-2--gamedev-12721

    It explains in great detail how to make a match 3 game.

  • This happens because the bullet can travel a different number of pixels on each tick.

    You need to change your code like this:

  • First of all, make a backup copy of this folder, just in case.

    Then check if there are any files ending with ".backup" or ".autosave"

    If you find such file, rename it (remove ".backup") and try to open.

    .

    Also, check this folder: C:\Users\YourName\Local Settings\Temp

    Sort by new, see if there are any recent folders with names like "CAP123456". Copy them to a safe place and check if any of them contain your project.

  • Are you sure the problem is in Construct2, and not in your PHP script or server or browser etc.?

    Have you tried requesting the same file directly from the browser address line?

  • You can use distance() expression.

    Something like this:

    Every 0.5s -> NightBlock set opacity to lerp(80, 0, distance(planet.x, planet.y, sun.x, sun.y)/200)

    If the planet is more than 200px away from the sun, opacity will be 0.

    As the planet moves closer, opacity will increase up to 80.

  • The easiest solution would be making a bigger collision box (by the way, the collision polygon in your red line sprite is wrong).

    Or put a bigger invisible sprite for swipe detection.

    Or you can make a more complex system - on touch start remember the coordinates and time, then on every tick as the touch continues, check if new touch coordinates are on the other side of the line. If this happened quite quickly, then you can assume that there was a swipe gesture across the line.

  • Can you post a screenshot of your code?

  • Hey, no problem! I happen to have some free time and I enjoy helping people on this forum, by doing this I feel like I'm learning a lot of new things myself and getting better at game development.

  • 20-60 second delays are quite long, so forget about using "Wait" action.

    Add Timer behavior to one of your objects (background sprite for example) and a variable "callCounter".

    Then you can do something like this:

    On start of layout
    [ul]
    	[li]> Sprite start Timer "CallFunction" for random(20, 60)[/li]
    [/ul]
    Sprite On Timer "CallFunction" 
    callCounter<3 
    [ul]
    	[li]> Add 1 to callCounter[/li]
    	[li]> Sprite start Timer "CallFunction" for random(20, 60)[/li]
    	[li]> Function call ...[/li]
    [/ul]
  • Yes, of course you can set the value to some variable.

    Dictionaries are perfect for use together with local storage, because you can easily save and load a lot of information at once.

    If you are saving each variable separately in LocalStorage, you need a million of events to save and retrieve each item. If you are saving a dictionary, you only need a couple of events.

    .

    I also suggest keeping dictionaries not just to store data in local storage, but actually using them in your game. For example, you can have a dictionary GameSettings, with keys like "MusicVolume", "SoundVolume", "Difficulty" etc.

    You don't need to create variables with the same data, just use the dictionary, for example:

    Audio set volume to GameSettings.Get("MusicVolume")

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Global variables are not always evil, but in this task (where you need them to store information about lots of objects), they are a very bad choice.

    Instance variables is a good choice for this task, they are much more efficient. You can have 100 items and only 10 instance variables to store all items properties. (With global variables you would have to create several hundreds of them and many-many more events)

    .

    If you have multiple of sprites with similar features, you need to combine them into a family. If you have, or planning to have sprites Player1, Player2, Player3, Player4 - add them to FPlayer family and move all instance variables, all behaviors from sprite level to family level. This will save you a lot of time and efforts in the future and you could organize your code better. For example - instead of four almost identical events "On player1 jump - do something..." you can create just one event "On FPLayer jump".

    .

    I recommend doing the same with items - you can make an individual sprite for each item, but you need to combine them all into a family.

    Individual sprites are probably even better for this job. You can keep them all on a separate (unused) layout "ItemsInstances", fill in all the values into their instance variables. And this will become your database of all items and their properties. When you spawn an item in the game, it will be created with all those properties you defined.

    .

    Don't worry about the Save feature, it saves everything - global variables and instance variables.