LoginLogin

Wire3D

Root / Submissions / [.]

kevinfoleyCreated:
Download:XKA335AF
Version:0.6Size:4 KB
Wire3D is a 3D wireframe rendering engine. This is a barebones engine with only basic features and a sample scene, but it is a good demonstration of what you can do with SmileBASIC. The included scene contains two spinning 3D TIE Fighters. You can walk and look around the scene. Features: *Renders 3D objects in wireframe using trig operations *Objects fade in the distance and brighten as you draw closer *Support for basic 3D models defined as vertices and edges *Walk around the scene with the D-Pad *Look around horizontally and vertically with the gyro controls (default) or touch screen *Includes (hardcoded) 3D model of a TIE Fighter *Realtime FPS counter *Basic culling - objects that aren't on screen won't be fully processed, to reduce render time This is a port of my original engine for Petit Computer. The performance is insanely better! This scene was averaging 15fps on Petit, but never dips below 60fps on SmileBASIC. I haven't stress-tested it yet but am curious how many edges we can draw before performance drops. I coded this from scratch to see how far I could get making a 3D engine without referring to any resources. While most 3D engines use matrix operations, mine uses trig. I can't say how this impacts performance.

Instructions:

Default settings: Use D-Pad to walk; aim with the Gyro (by moving your 3DS around). The Gyro is calibrated when you start the app, so you should start it with the 3DS held upright in front of you. To disable the Gyro and use the touch screen for aiming, set line 12 to USEGYRO=FALSE By default, the lower screen extends the upper screen. To use the lower screen for rendering radar blips instead, set XSCREEN 2 on line 13 and make sure RADAR = TRUE on line 18

Notes:

Please note that there was some ghosting while I photographed the 3DS screen with my phone which makes it look like each edge is rendered with 5 lines; in the actual application, each edge is a single clean line. Future plans: *Better support for instancing models *Support circle stick for walking and circle pad pro for aiming *Support for triangles? That would be dangerously close to a true 3D engine I would love to add actual gameplay features such as collision detection, but I don't know if I'll be able to commit enough time to make that happen.

Are those tie-fighters?

This is a very cool demo! I hope you make something out of it!

Replying to:haloopdy
This is a very cool demo! I hope you make something out of it!
Thanks, I hope I do as well :P

Replying to:Guzzler
Are those tie-fighters?
Yes, I think I mentioned that a few times in the description :D