iKiwed's Recent Forum Activity

  • 72677 for just a small area sounds like an amount that will very likely lead to performance problems, I would suggest changing the game design to allow for larger dust particles.

    I have tried different types of dust types.

    There is another type of dust that the roomba collects, which uses particles. But the purpose of that type of dust is completely different and is visually speaking different for a motive. Let's call it "special dust" just for reference.

    Using the same technique for normal dust isn't ideal and doesn't fit well with a vacuum cleaner. This is why using tilemaps works incredibly well. It's as if the roomba is a rubber on a sheet full of scratches. Unfortunately, the tiles are tiny, and therefore for each counted tile you get big numbers like 72677.

    I have tried with bigger tiles and sadly they don't fit well with the rest of the game, aesthetic-wise.

    At this point, I'm going to either find another way to make normal dust or just decide to see if there is another way to not calculate all the tiles (I don't know how, but we'll see).

    store tiles as x-y positions in a dictionary, use key.count as progression bar

    Yes, I'll let you know if it works!

  • Hello! Let me explain the game I am making and the problem.

    The Game:

    You are a roomba collecting dust from the floor.

    Months ago I used a technique that allowed the roomba to collect dust. The problem was that the dust collection was an extensive hierarchy of objects, which slowed the initial calculation when you boot the game up.

    A couple of days ago I have finally changed to tiles. I can draw whatever I want on the floopr and the roomba can delete these tiles by passing by in-game with no issue.

    Everything works as intended and the game doesn't suffer from the slow calculation.

    The problem:

    I want that the progress of collecting dust is expressed through a bar in the HUD.

    The more you collect, the more the bar gets bigger, until it's done.

    At the moment, the only thing I have thought of was to count the number of tiles in the game and subtract once the roomba collides with them.

    I have followed this Construct 2 tutorial, which worked for Construct 3 as well.

    construct.net/en/tutorials/working-tiles-tilemap-count-1427

    The problem is that the game now takes a lot of calculation for counting the tiles since they are 1 pixel each. A small square full of dust may contain 72677 tiles, for example.

    My questions are:

    1) Is there a better way to count tiles or make the counting faster?

    2) If not, do you know a better way to make a progression bar for the collected dust?

    3) If not, and if you think this technique is not necessary or ugly, do you know a better way to make dust in-game without freezing the game?

    Thank you so much... Have a good day!

  • Hello! I explain shortly: I'm making a game where you're a vacuum cleaner.

    At this moment, I've used a particle that spawns sprites (1x1 cubes) that can be collected on the map. To make the particle standstill, I set the particle time scale to 0 once it spawned enough sprites.

    The problem is that it takes time (1-2 secs max, depending on the number of sprites) each time I restart the layout, probably because the game has to render the particle every time.

    I was wondering if it's possible to pre-render the particle action.

    Also, if you have better ideas for how the "dust" particle works, please let me know!

    Thank you so much.

    Tagged:

  • Oh my gosh. I think I did it...!

    By reading a second time what calminthenight said, I noticed I made a mistake.

    The two conditions must align in the same event, and not in two.

    On Start Layout
    Global.MusicPlaying = Music.mp3 > Set Global.MusicPlaying to Music.mp3
    				> Play Global.MusicPlaying looping from Music at db (tag "music")
    
    

    Before that I had the two conditions I thought I had to search for a specific event action that would have helped me to "resume" the music. But this event is clearer and better. Nice!

    I hope this helps someone.

  • Hello! I have a similar issue but I didn't want to open a new topic, so I'll explain here.

    Basically, the player can restart the layout whenever they want, to keep it easy to try again. However, the selected music for that layout won't stop restarting.

    I did get an idea of what calminthenight said, but I don't know exactly how to execute it through the events.

    ^^^^

    This is basically what I wanted to say. Here below I am about to give extra thoughts.

    I guess the game should recognize that the game has already the music played. I guess one possible way to do this is through global variables, although there is an issue with the audio tag.

    On start Layout > Set Global.MusicPlaying to music.mp3
    			> Play Global.MusicPlaying looping from Music at 0db (tag "music")
    
    Global.MusicPlaying = music.mp3 > ???
    

    I could use the "Set Paused" event in the state of "Resume", but it requires the audio tag ("music"), which, by restarting the layout, gets removed and added once the layout starts again. Meaning, I doubt it's the solution.

    Let me know in the comments, I'm super open to suggestions! Thank you so much!

  • Hello! It's my first attempt to use a dictionary for collecting some data.

    I would like to count every time the player manually restarts (like pressing a button) or dies from the game in that specific layout, for each layout in the game. Ex:

    Room1

    Restarts: 5

    death: 2

    Room2

    Restarts: 3

    death: 1

    and so on. So in a sense, it's an array.

    Since it's been a while I made even the simplest database ever, I was wondering if it's possible to use the dictionary for this purpose. Once the game is ended, it will release a downloadable .json file with the written data.

    This is all I have to say that doesn't make the question more confused.

    Here below some of my experiments:

    Before posting this topic, I tried following my instinct and worked it out with trial-and-error. The project partially works: In each layout, the game creates a new dictionary with the name of the room on it, plus all the details like I mentioned before. There are two problems, however: If you go to the next layout, the first dictionary may take the name of the next layout. Furthermore, the data from the first dictionary continue to get collected even after passing through another layout.

    When I extract the text file, the data from the layouts I played are redundant.

    What do you think I should do next?

    Thank you!

  • Hi, I'd like to express in an event to mute all the music with any tags except one, how can I do this? I wouldn't want to name all of them, they're too many.

    Thank you very much!

    Tagged:

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hello! It's been a while.

    I promised that I would have noticy you for updates.

    Here's a short recap for whoever is reading:

    I'm making a top-down game in 4 directions.

    You're a robot vacuum cleaner, and your objective is to pick up the dust in levels.

    The robot will move automatically, while the player will just adjust the angle of direction, between up (270°), down (90°), right (0°), and left (180°).

    When the player hits a wall (either invisible or not), the robot "reflects" the direction.

    For example, if the player's direction is set to "right" and bounces on a wall, the new direction is set to "left".

    I had to make this premise because up to this moment, everything works as intended.

    I still want to thank R0J0hound for the suggestion.

    (Link: construct.net/en/forum/construct-3/how-do-i-8/bounce-8direction-fix-0speed-154535

    I still have their event. But there is a so-called bug I can't fix and is probably related to how the robot works.

    If the player spams against a wall in one direction, in a way or another, it will get stuck (if overlapping) or pass through it (if on collision). This happens only if the player makes a stress test, but I bet someone will do it just fine.

    Here you can see two videos:

    - dropbox.com/s/swrg9sarf9al9bl/10.06%20issue%20on%20collission.mp4 (collision)

    - dropbox.com/s/nu0az130nzbdjpm/10.06%20issue%20overlapping.mp4 (overlap)

    Is there any way to fix this? Thank you.

    UPDATE: Hello! Ok so, I say this for me and for the others as well:

    It's possible that I've fixed it by changing a parameter.

    If you look at R0J0hound's comment:

    "——— sprite: move 1 pixel at angle self.ang."

    I've changed from 1 pixel to 15, to leave enough space to not get stuck with the wall.

  • Hi everyone.

    I am making a pixel game (Aspect ratio 3:5).

    Usually I'd use "Letterbox Integer Scale" since it makes the artstyle consistent on any screens.

    But I've noticed that "Scale outer" is what I'm looking for, because What I want is that, if the window is bigger than the viewport, the player can see the rest of the game.

    The issue is that if I expand both width and height, the game zooms in.

    This doesn't happen if I only expand width or height.

    I just don't want that the screen zooms; I want that it expands what the player can see.

    Is it possible? Thank you for reading.

    (Let me know if you didn't get what I mean.)

  • Don’t use the behaviors. You can make the motion with events simple enough.

    Give the object you want to move two instance variables:

    Speed and ang. That’ll be your speed and angleOfMotion.

    Then the motion can be done with one event.

    Every tick

    — sprite: move self.speed*dt pixels at angle self.ang

    Then for the bounce it should be as simple as adding 180 to ang and moving out of the wall. Here’s what it should look like. The while and second overlap condition are in a sub event if that’s not clear.

    It moves out a pixel at a time but you can do a smaller step if needed.

    Sprite: overlaps wall

    — sprite: add 180 to ang

    ——while

    ——sprite: overlaps wall

    ——— sprite: move 1 pixel at angle self.ang.

    -cheers

    Hi there! Sorry for the long wait. I've implemented your idea, changed some variables, and ultimately polished and reorganized what I've done so far.

    Initially I thought that was a bad idea, instead it turned out that it's exactly what I wanted! Thank you so much for your help.

    As for now I'm doing great, eventually I'll let you know if I still have some issues.

  • Hi, I'm back because I have a question.

    In the end, my character can swipe thanks to the bullet behavior.

    But sometimes, when I hit the corner of an object, even if it's square shaped, the character bounce diagonally. My question is if it's possible to use the bullet system but they can bounce only on 4 precise angles (I guess 0, 90, 180, and 270). Thank you!

  • For lerp effect to work, it should update on every tick.

    See this demo:

    https://www.dropbox.com/s/tjowni4xr1fgkc9/Healthbar.c3p?dl=0

    Sorry for the late response. I've added the function on every tick and now it's working as you said, which is cool!

    But still, I think it's a awkward. By looking at the videos you can see the bar takes too long to reach the end, especially when it's near to 0. I wonder why.

    That said, thank you so much for your help, as always, you're very helpful and I hope this project of mine will finally show up in the future!

iKiwed's avatar

iKiwed

Member since 17 Jun, 2019

None one is following iKiwed yet!

Trophy Case

  • 5-Year Club
  • Regular Visitor Visited Construct.net 7 days in a row
  • RTFM Read the fabulous manual
  • Email Verified

Progress

8/44
How to earn trophies