Author Topic: [axe] 3D collision detection library  (Read 8701 times)

0 Members and 1 Guest are viewing this topic.

Offline ben_g

  • Hey cool I can set a custom title now :)
  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1002
  • Rating: +125/-4
  • Asm noob
    • View Profile
    • Our programmer's team: GameCommandoSquad
[axe] 3D collision detection library
« on: July 25, 2014, 01:55:59 pm »
So, I've written a library to handle collisions in a 3D world.

I'll explain the features used in the demo based on some screenshots:

Demo room 1


The main feature of tis octogonal room is that it has diagonal walls. It may seem like something ordinary, but diagonal walls are actually quite complicated, and most raycasting engines are unable to render diagonal walls.
This room also has a pillar in the middle that demonstrates a use of the collision hooks: it starts to rise when something (the player) is on top of it, and it descends again when nothing is on top of it.
Nothing here
Demo room 2


This is the most complex room (especially when it comes to rendering) of the demo, so I cheated a bit and used 15MHz for this room. All other rooms do run at 6MHz though.
Anyway, this room is to demonstrate how moving platforms can be used. The horizontally moving platform uses a collision hook to move any objects on it with the platform, while the vertically moving one can work witouth a hook because of gravity.
Ignore this text
Demo room 3



This is just a simple hallway.
Simple white line
Demo room 4



This room uses a floor with a collision hook to create a trampoline. When you hold down the jump key (2ND), you gain a bit of altitude with every jump, when you don't hold 2ND, you lose a bit of altitude with every jump untill you stand still. Jump trough the window to get to the next room.
YAEL (yet another empty line)
Demo room 5



This room uses a ghost object to detect if the player is above the pit, and adjusts the shape of the room to make the player fall.
Last line of transparent text
Demo room 6



This room uses yet another ghost object to detect if the player is in a certain area: When the player is inside the "teleporter", it shows some text, and when the player presses ALPHA, it loads the first room again.
That's all the demo has to offer.

If you are interested in using this library, then check out the file "collision library.txt" in the zip that I'll attach to the post. It contains the documentation about everything the library has to offer.
« Last Edit: July 25, 2014, 03:25:07 pm by ben_g »
My projects
 - The Lost Survivors (Unreal Engine) ACTIVE [GameCommandoSquad main project]
 - Oxo, with single-calc multiplayer and AI (axe) RELEASED (screenshot) (topic)
 - An android version of oxo (java)  ACTIVE
 - A 3D collision detection library (axe) RELEASED! (topic)(screenshot)(more recent screenshot)(screenshot of it being used in a tilemapper)
Spoiler For inactive:
- A first person shooter with a polygon-based 3d engine. (z80, will probably be recoded in axe using GLib) ON HOLD (screenshot)
 - A java MORPG. (pc) DEEP COMA(read more)(screenshot)
 - a minecraft game in axe DEAD (source code available)
 - a 3D racing game (axe) ON HOLD (outdated screenshot of asm version)

This signature was last updated on 20/04/2015 and may be outdated

Offline Matrefeytontias

  • Axe roxxor (kinda)
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1982
  • Rating: +310/-12
  • Axe roxxor
    • View Profile
    • RMV Pixel Engineers
Re: [axe] 3D collision detection library
« Reply #1 on: July 25, 2014, 05:08:54 pm »
Wow, just ... Wow O.O stunning work ! I'll sure give it a try ! I assume it's intended to be used with GLib ?

Offline Sorunome

  • Fox Fox Fox Fox Fox Fox Fox!
  • Support Staff
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 7920
  • Rating: +374/-13
  • Derpy Hooves
    • View Profile
    • My website! (You might lose the game)
Re: [axe] 3D collision detection library
« Reply #2 on: July 25, 2014, 05:10:42 pm »
Just WOW, this is looking awesome O.o

THE GAME
Also, check out my website
If OmnomIRC is screwed up, blame me!
Click here to give me an internet!

Offline ben_g

  • Hey cool I can set a custom title now :)
  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1002
  • Rating: +125/-4
  • Asm noob
    • View Profile
    • Our programmer's team: GameCommandoSquad
Re: [axe] 3D collision detection library
« Reply #3 on: July 25, 2014, 06:06:11 pm »
Wow, just ... Wow O.O stunning work ! I'll sure give it a try ! I assume it's intended to be used with GLib ?
It is indeed intended to be used with GLib, but it doesn't use any of it's routines. It only handles the collisions, not the graphics. Therefore, it should work fine with any kind of raphics you like, wheather it is GLib, your axiom, or even a tilemap (if I have time, I might make a tilemap example in the future).
My projects
 - The Lost Survivors (Unreal Engine) ACTIVE [GameCommandoSquad main project]
 - Oxo, with single-calc multiplayer and AI (axe) RELEASED (screenshot) (topic)
 - An android version of oxo (java)  ACTIVE
 - A 3D collision detection library (axe) RELEASED! (topic)(screenshot)(more recent screenshot)(screenshot of it being used in a tilemapper)
Spoiler For inactive:
- A first person shooter with a polygon-based 3d engine. (z80, will probably be recoded in axe using GLib) ON HOLD (screenshot)
 - A java MORPG. (pc) DEEP COMA(read more)(screenshot)
 - a minecraft game in axe DEAD (source code available)
 - a 3D racing game (axe) ON HOLD (outdated screenshot of asm version)

This signature was last updated on 20/04/2015 and may be outdated

Offline ClrDraw

  • LV7 Elite (Next: 700)
  • *******
  • Posts: 627
  • Rating: +61/-2
    • View Profile
    • GitHub
Re: [axe] 3D collision detection library
« Reply #4 on: July 25, 2014, 10:13:07 pm »
This is amazing! I think you've earned the rainbow emoji:  *.*
Visit my GitHub for all my TI programs as well as other projects.
Also check out my website.

Offline Streetwalrus

  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3821
  • Rating: +80/-8
    • View Profile
Re: [axe] 3D collision detection library
« Reply #5 on: July 26, 2014, 06:02:24 am »
Holycrap this is freaking amazing. *.* Great job Ben_G ! :thumbsup:

Offline AndyLi

  • LV1 Newcomer (Next: 20)
  • *
  • Posts: 6
  • Rating: +6/-0
    • View Profile
Re: [axe] 3D collision detection library
« Reply #6 on: July 28, 2014, 11:41:49 am »
The graphics looks simple but beautiful !!
Incredible work  :thumbsup:
My calcs :
  Ti: Nspire cx, Nspire /cp EVT *2, Nspire CAS /tp EVT, Ti-84+ se,  Ti-36x Pro
  HP: HP-49g+, HP-40gs
  Sharp: PC-G850s, PC-1500 with printer
  Casio: PB-700 with FA-10