gbadev.org forum archive

This is a read-only mirror of the content originally found on forum.gbadev.org (now offline), salvaged from Wayback machine copies. A new forum can be found here.

DS homebrew announcements > A mini 3d platformer engine

#177326 - bl0ckeduser - Sat Apr 14, 2012 5:19 pm

My little demo, nothing fancy. You can jump around in 3d worlds, collect keys that open doors and shoot bullets that disintegrate as soon as they touch an object.

Fully tested on a real DS.

Controls:
A button - jumping
B button - shooting bullets
D-pad - movement

Screenshots:
http://sites.google.com/site/bl0ckeduserssoftware/clown3d-ds-screen1.PNG
http://sites.google.com/site/bl0ckeduserssoftware/clown3d-ds-screen2.PNG

Source code and compiled .NDS file download:
http://github.com/bl0ckeduser/clown3d-DS

Special thanks:
- mtheall for his technical support
- Dovoto for his example code, of which I copied several bits (with proper citations)
- devKitPro developers and forum

Enjoy!

#177331 - Cid2Mizard - Mon Apr 16, 2012 11:24 am

Thanks !!!!
_________________
www.nintendomax.com 100% Hack 0% Warez

#177362 - another world - Fri May 11, 2012 9:45 am

this is a pretty cool little demo. keep it up. i've love to see this expanded upon.

-another world

#177365 - hacker013 - Fri May 11, 2012 11:08 pm

Nice begin :3 I hope to see more of your work :P

~Hacker013
_________________
Website / Blog

Let the nds be with you.

#177371 - bl0ckeduser - Mon May 14, 2012 7:55 pm

Thanks. I'm going to try to learn some more 3d / NDS in upcoming times.

#177392 - PypeBros - Thu May 24, 2012 3:48 pm

nice start. Have you considered the option of jumping only when the A button is *pushed*, rather than continuous jumping ?

Also, some edge-evasion algorithm (à la 2D-Zelda) would be nice so that we're not stuck as soon as we approach a corner.
_________________
SEDS: Sprite Edition on DS :: modplayer

#177395 - bl0ckeduser - Sat May 26, 2012 10:24 pm

PypeBros wrote:
nice start.

Thanks :)
PypeBros wrote:
Have you considered the option of jumping only when the A button is *pushed*, rather than continuous jumping ?

I think most good games do it as you describe. I've just pushed a fix to the repo. Continuous was sort of nice for testing and I guess I forgot to take it out.
PypeBros wrote:
Also, some edge-evasion algorithm (à la 2D-Zelda) would be nice so that we're not stuck as soon as we approach a corner.

I've noticed most good 3d engines, like smealum's dawnseekers, do this. I don't know how it's implemented but I'll do some research (or make something up). It seems good collision resolving algorithms have this effect as an easily-implemented corollary.

#177397 - PypeBros - Mon May 28, 2012 7:05 am

bl0ckeduser wrote:
PypeBros wrote:
nice start.

I've noticed most good 3d engines, like smealum's dawnseekers, do this. I don't know how it's implemented but I'll do some research (or make something up). It seems good collision resolving algorithms have this effect as an easily-implemented corollary.


In a 3D environment with freely positioned direction, you could use the projection of your intended velocity against the wall (cos normal_angle * velocity, iirc) as the collision resulting velocity.

There can be interesting things in Sonic (yeah, 2D) physics engine, where the collision box is complemented with "repelling bars" that push you away from walls when you approach them. Pretty handy way to mimic a spherical body with a simple tests, imho.
_________________
SEDS: Sprite Edition on DS :: modplayer

#177400 - bl0ckeduser - Tue May 29, 2012 10:46 pm

Yeah, easy projection stuff worked out well. I've added edge-evasion, and in the process I also removed the collision jitter (oscillation). Unfortunately there are still a few collision glitches, and since my collision code is not very robust I had to write some glitch-handling code.

EDIT: I cleaned up the edge-evasion code, much cleaner now.