? Wire3D ● SmileBASIC Source

Sign In

Register
*Usernames are case-sensitive
Forgot my password

Wire3D

Submitted
Updated
Author
kevinfoley
Public Key
XKA335AF
Min. Compat.
All
Version
0.6
Size
4 KB
Rating
5 votes
Description 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.
Categories
Keywords
  • 3d
  • engine
  • wireframe
4 Comment(s) randomous randomous Robot Hidden Easter Eggs Second Year My account is over 2 years old Website Drawing I like to draw! Hobbies This is a very cool demo! I hope you make something out of it! kevinfoley kevinfoley Thanks, I hope I do as well :P Guzzler Guzzler First Week Joined in the very first week of SmileBASIC Source Website Drawing I like to draw! Hobbies Intermediate Programmer I can make programs, but I still have trouble here and there. Programming Strength Are those tie-fighters? kevinfoley kevinfoley Yes, I think I mentioned that a few times in the description :D