Homebrew [WIP] 3DS Physics Sandbox

KiiWii

Editorial Team
Editorial Team
Joined
Nov 17, 2008
Messages
16,574
Trophies
3
Website
defaultdnb.github.io
XP
26,881
Country
United Kingdom
Oh for sure. This is staying 2d for the near future though.

I am working on a small update right now so I can make a video when it is finished.

I have worked on a 2D physics demo a long time ago but I could never get it quite right. I'm looking forward to checking this out as it will probably spur me on to dig it back out and rewrite it :)
 

pipe01

Member
Newcomer
Joined
Mar 2, 2016
Messages
20
Trophies
0
XP
52
Country
Last edited by pipe01,

PieFace

Well-Known Member
OP
Newcomer
Joined
Aug 4, 2014
Messages
59
Trophies
0
XP
157
Country
United States
v0.2 Released

Changelog
  • Press Y to toggle using gyroscope as gravity , or allow the square to follow tilt of 3ds)
  • Press select to take a screenshot (needs optimization)
  • Friction now takes into account appropriate gravity, resulting in mostly increased friction at the default value
  • Fixed precision bug with increment
Next update will include multiple squares that interact with each other. It should be out within the next week.

I've been playing around with the code for a while, and I've added a few things. I'm too lazy to setup a git repo, so here's the download: https://www.dropbox.com/s/ackpisffvfzgwob/3dsphysicssandbox-fork.zip?dl=0

EDIT: In case anyone wants the code, http://pastebin.com/kRBM2RDj
EDIT2: Ignore the files' names, I used a different project as base lol

Very cool! Thank you for sharing. I added your links to the op
 
  • Like
Reactions: Magical Sheep

Magical Sheep

The Super Stylish Cat
Member
Joined
Jan 22, 2016
Messages
306
Trophies
0
Age
25
Location
The Metaverse
XP
801
Country
United States
v0.2 Released

Changelog
  • Press Y to toggle using gyroscope as gravity , or allow the square to follow tilt of 3ds)
  • Press select to take a screenshot (needs optimization)
  • Friction now takes into account appropriate gravity, resulting in mostly increased friction at the default value
  • Fixed precision bug with increment
Next update will include multiple squares that interact with each other. It should be out within the next week.



Very cool! Thank you for sharing. I added your links to the op
Oh yay! The gyroscope feature works nicely, and the friction mode seems to be much better. Good job!
 
  • Like
Reactions: PieFace

PieFace

Well-Known Member
OP
Newcomer
Joined
Aug 4, 2014
Messages
59
Trophies
0
XP
157
Country
United States
v0.3 released

Changelog:
  • Added support for up to 32 squares
  • Added walls, immobile objects(lines) that objects bounce off of (up to 32)
  • Removed square bouncing on edges of screen (by default replaced by walls in the same locations)
  • Added camera, use circle pad to move view around
  • Updated UI:
    • Now contains two columns of information, global variables and object specific variables
    • Change the mod_val scope to switch between these two
    • All data of squares and walls can be modified (position, size, etc)
    • Use obj_type to change between squares and walls
    • Use curr_view to change which object you are looking at
    • Use coord to change the objects position
    • Use vel.x/y to change the square's velocity
    • Use direction to change wall's direction
    • Use length to change the objects size
    • NOTE: the program stops searching through the array when it finds the first inactive object. Add new objects in order
  • Press X to reset the entire world to default
  • Press B to bring the currently selected square to the center of the world
  • Started modularization of code
  • Collision now takes momentum into account (more realistic collisions)
Current bugs:
  • If squares are traveling fast enough, they can clip through walls (more apparent in smaller squares)
  • Sometimes squares get "crushed" against vertical walls because of x gravity
  • Titledb won't let me update the link so it will be outdated. Use QR code or github to download fixed

Coming in v0.4 for sure
  • Fixes for above bugs
  • Better file handling
  • Save and load world states from a file
 
Last edited by PieFace,
  • Like
Reactions: Biovirulent

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    K3Nv2 @ K3Nv2: You were my trimmer