zedissimo's Forum Posts

  • Wow! R0J0hound Sorry for late replay. Thank you very much for detailed explanation. Your formulas work exactly like I imagined and even better.

  • Idea: Asteroid turns around a central object in orbit using Force Physics

    I want the ability to make asteroids bounce off each other on collision or be pushed by other objects so they return to their orbits.

    My failed attempt with AI help... C3P https://www.dropbox.com/scl/fi/adllfgp1xp3vw72kxvg6s/Physics-Orbit-03.c3p?rlkey=4bc0mb1qnvrga0dnbr1nvt3tk&st=iggnyeyo&dl=0

    Illustration of what I want to achieve:

  • You do not have permission to view this post

  • You do not have permission to view this post

  • You need to locate a specific tile and find a path to it. I would use the Pathfinding and MoveTo behaviors together. First, find the path to the target location, and then (On Path Find) use MoveTo Move along Pathfinding path. This approach works well if the map is designed like a corridor, otherwise, enemy will cut corners and move in diagonal. (I don't know how to have to move only in 4 directions, turning off diagonal movement doesn't help)

    Also you can try to calculate tile where you want to move enemy and then connect pathfinding to MoveTo(tilemap.TileToPositionX(tileX), tilemap.TileToPositionY(tileY)). Maybe someone more experienced will correct me or will have a better and more elegant solution...

  • Thank you for explanation Ashley Now everything works like I imagined

  • Hello, I want to create system to save and load save from file using FileSystem.

    1) Save. Save only works with direct Text or when I'm saving SaveStateJSON to plugin Text and when taking data from there. (There is all version in the .C3P file)

    2) Load. Can't make it work. It's just don't read any of my saved files.

    What I'm doing wrong?

    My .C3P https://www.dropbox.com/scl/fi/ys9yhw6oe95bjnapweml4/Save-Load-to-File-02.c3p?rlkey=0gvxymlnl7rtf59wo5vnheet1&st=gni1bcnl&dl=0

  • I thing You can't clear canvas because in the end you are setting variable Mode to Moving, while clean canvas works only when Mode is ChooseMove. If you will disable line (System / Set "Mode" to "Moving") it will start working

  • Thank you Ashley and dop2000! Now save file can be loaded

  • Hello, I want to create system to save and load save from file. Save part works fine, but I cant load saved save file back and read it.

    File choose dialog is just not activating.

    I tried to use File System but it was not a good idea

    1) How do I choose file using File Chooser?

    2) How can I load file from specific location without asking user for location? For example: save to Documents/GameName/savefile.json

    Here is my C3P file

    https://www.dropbox.com/scl/fi/6h62kxony766dvqr7yb7f/Save-and-Load-to-File-01.c3p?rlkey=tji1w4vmtczcugfpgg1mzdihy&st=8pauybnr&dl=0

  • Thank you very much! Your method works great, I'm a blind bad copy paster :D I lost - 180 in this formula: angle(Car.X, Car.Y, Obstacle.X, Obstacle.Y) - 180 and it obviously did't work! Then I started my own overcomplicated methods...

    Examples: manually calculating car speed Car.Car.VectorX * cos(Car.Angle) + Car.Car.VectorY * sin(Car.Angle),

    Setting X and Y position Self.X + cos(Self.Angle) * 20 and Self.Y + sin(Self.Angle) * 20

    By the way I discovered something interesting. Did you know that if car Friction is set to 1 then you can't move it or set new position?

  • Hello, Igor! How are you? In my game there is no damage that effects on car stats, but idea is good. I want to reduce only 1 HP each time the car hits a wall. The idea was to push the car in the opposite direction of the hit to avoid multiple HP removal.(You can see it in yearly versions) When the car moves in reverse, the (car.car.speed) shows a negative number, right? There's a text display (Text 2) on the UI. I have a condition: if (car.car.speed) is greater than 0, then push. This means that if the car is moving in reverse, it should not be pushed, right?

    So, what’s the problem? Now, if the car moves backward and hits the obstacle, it's not pushing against the obstacle; it moves toward the obstacle. I reduced the speed and moved the obstacles behind the car to make it more visually obvious. I hope I was able to explain this clearly with my English

    How to determinate car hit was front or rear? I used car speed for that. If car speed is positive then on hit it's front. If car speed is negative then it's a front. Any better ways?

    updated "code"

    https://www.dropbox.com/scl/fi/9fdkeqr6nnagfgzapetr9/Car-Hit-Obstacle-2.c3p?rlkey=ms0heiqj9hpxtoj1c4vuvjovl&st=t6sqfiya&dl=0

  • The main goal was to make the car lose 1 hp when it hits an obstacle, but upon collision, it continues to remove more than 1 hp.

    I tried a few ideas, but I encountered some weird behavior.

    How can I fix the car collision with the obstacle when using car behavior?

    https://www.dropbox.com/scl/fi/n8jryp3izjfx4wdib1trn/Car-Hit-Obstacle.c3p?rlkey=6nu3gwbqn1so7knscrhn06121&st=u934dmwt&dl=0

    Try to test movement in reverse. Why it's pushing car back if car speed on reverse is negative? Bug?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Thanks for advice igortyhon "When I have a horizontal game and smartphone users open it in a browser and hold their smartphone vertically, everything looks terrible." Exactly! That need to be fixed

    "I also reload the layout when the resolution changes, because I have a lot of positioning of control elements at startup." Won’t reloading the layout reset unsaved progress? Why not use the Browser plugin’s On Resize event and call a function to position UI elements? (That function can also be called on start of layout)

    The idea of using a cover is good. I’ll also request fullscreen mode, but that looks like a temporary solution. It would be great to lock the game to horizontal orientation with a 16:9 aspect ratio when a mobile device is in portrait (vertical) mode, use letterbox scaling, and switch to inner or outer scale mode when it’s landscape. Maybe game distribution websites fix this on their side? (I have zero experience with game publishing.)

  • How can I lock screen in Landscape orientation while using inner or outer scale mode? It works only with letterbox scale...

    Project properties display setting are:

    - Fullscreen mode: Scale inner or Scale outer

    - Orientations: Landscape

    Also I tried to use Browser plugin: lock orientation

    It works only if I use Browser plugin: request fullscreen