Navigation

    Fuze Arena Logo
    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Popular
    • Users
    • Groups
    • Help
    • Discord
    1. Home
    2. Tags
    3. collision
    Log in to post
    • All categories
    • N

      How can I make collision?
      Help • collision screen sprite • • NewJoeniel

      2
      0
      Votes
      2
      Posts
      364
      Views

      PickleCatStars

      Normally what I do is a bunch of ‘if player x position < 0 then player xspeed = - player xspeed
      If player x > screenwidth then player xspeed = - player xspeed
      If player y position < 0 then player y speed = - player y speed
      If player y position > screen height then player y speed = - player y speed.’

      This has the effect of bouncing you off walls. To stop dead, you’d put speed = 0, and laso probably shift the players position a bit to put them back jnside the screen if they go over by a few pixels.

      There’s a clever example in the tutorials using clamp() which looks neater. It’s at https://fuzearena.com/help/view/Sprite Game - scroll down to the part ‘creating boundaries’

      You can also use maps, probably, and use the map collision. All sorts of ways to skin a cat. Hope this helps!

    • monkeee

      3D Split Screen Shooter (2 players)
      Finished Projects • collision multiplayer split screen 3d-game • • monkeee

      3
      5
      Votes
      3
      Posts
      384
      Views

      monkeee

      @monkeee polished this up and added new maps, hp, reload and ui. I made it a new project because it got a bit long and complicated. I liked how simple the original one was.
      Here's the download code:
      S5L43MNDHB

      Preview:

    • spikey

      Quad Tree gives 3 x fps for collision detection of 180 sprites
      Advanced • collision quad tree performance • • spikey

      10
      4
      Votes
      10
      Posts
      872
      Views

      Devieus

      I gave this a look and I found an easy improvement as it is now is to increase the node capacity to around 9 or 10. It seems to perform much better than 3. After that it starts to bottleneck somewhere else.

    • spikey

      Is distance() quicker than detectSpriteCollision()?
      Beginners • collision sprites performance • • spikey

      4
      0
      Votes
      4
      Posts
      352
      Views

      spikey

      Thank you both for your inputs. This means to me I am close to the borders, where the CPU/Interpreter forgives me quick solutions ;-). I think I could get along, if I review my checks, but if I want to get further with more sprites/objects, I will have to review my code and apply optimizations.

    • Chronos

      Coding for Fun: Measuring Models and Making Advanced Collision Responses
      Functions • dimensions collision measure response • • Chronos

      11
      2
      Votes
      11
      Posts
      937
      Views

      joyrider3774

      thanks soo much for this i use it to know objects dimensions for my projects well i use it to find the values i need, i don't use the code in my project

    • landein207

      Collision with box()
      Beginners • collision box • • landein207

      5
      0
      Votes
      5
      Posts
      498
      Views

      landein207

      Ok i will check that out and test if i can do the bullet board (enemy turn) and the dialog/menu(player turn) with that but idk if i could just colide with a location lets say like corners x 50 and 100 and y 4 and 36 so i could collide with the location itself instead of the box()

    • spikey

      collideMap() only in the main loop scope?
      Beginners • collision sprites collidemap • • spikey

      5
      0
      Votes
      5
      Posts
      361
      Views

      spikey

      @waldron i appreciate that guidance. I will do it like this.

    • landein207

      Problems with collisions
      Beginners • collision help • • landein207

      36
      1
      Votes
      36
      Posts
      2355
      Views

      R

      I think you want something like:

      setSpriteSpeed (plr,100*c.lx,-100*c.ly)

      Though 100 seems fast, but is in line with what you had.

    • M

      Having troubles with collision in Gothic Vania.
      Help • collision gothic vania • • Mexx Storm

      4
      0
      Votes
      4
      Posts
      365
      Views

      SteveZX81

      I tend to do my collisions the same and something like this:

      for i = 0 to len(enemy) loop
      col = detectenemycollision(enemy[i],player)
      if col then
      ..collission happened, do something..
      endif
      repeat

      Not sure if that'll help at all/