LoginLogin
Nintendo shutting down 3DS + Wii U online services, see our post

eZSB Toolkit: SmileBASIC Made eZ

Root / Submissions / [.]

MYCRAFTisbestCreated:
Download:XXD3YD
Version:0.693Size:3.7MB
(Formerly Z3D) This is a simple toolkit that adds a easy to use functions that simplify certain tasks. It can even do MODE 7 stuff! (Thanks to Trinitro21 for the original basecode) This makes it easier to learn and use for newcomers and speeds up time spent coding. Originally, I made this toolkit mostly for my own use but decided it would make some sense to make it available here with extensive documentation and extra bits to make everything nice and user friendly. I try not to change formatting and syntax where I can help it. This means that for the most part, updating the version of eZSB you use is as simple as replacing the file. Update logs will generally list any changes if at all. Once this project is past v1.0, future updates will use a disambiguation for most changes. CURRENT FEATURES:
  • MODE 7 support
  • Ability to scale sprites and change the 3D perspective (the 3DS 3D effect) at the same time (smoothly)
  • Typing/Speaking Text Effect (for NPC text and other such things)
  • Pause feature + optional reset while paused
  • Create 2 color bars (specifically health bars) to represent a percent out of 100
  • Parse the Time and Date (EX: DAY() returns the current day as an integer)
  • Real time updating clock
  • Text Effects with real time updating(color and depth)
  • Convert fractions into percents (for use with bars or to display a number for the user)
  • And MORE!
PLANNED FEATURES:
  • More MODE 7 features
  • Background Scaling
  • Sprite Transparency Controller
  • Sprite Animation Controller
  • Credit Sequence (for easily adding credits into your game)
  • Title Screen (for quick implementation of a title screen)
  • More Graphic Scaling
  • Basic Wireless Multiplayer Support
  • Sprite Rotation
  • Sprite Trail (to leave an imprint/copy of a sprite that fades out, appearance of fast movement)
  • Probably More
PLANNED FOR v0.7
  • MODE7 (Full Sprite Support, faster render times, improved audio displacement, proper working shadows, lower screen support, functioning pause button for the mode)
  • Sprite Scaler based on Y position
  • 2D (top-down)maps with no bounding limit
  • Other Surprises
KNOWN BUGS (in v0.693)
    -Sprite Position Scaling is still broken -MODE7 lags near map edges -Empty space on MODE7 maps render slowly

Instructions:

Simply copy and paste the initialization code at the top of your program and that's it, you installed it! Initialization Code (found at top of Demo file and commented at top of Kit file):
LOAD"PRG1:EZSB.KIT",FALSE
USE 1
GOSUB "1:@BOOTEZSB"
'eZSB always sets XSCREEN 2 on boot, change it here
For instructions of use for each function, read the comments at the top of the EZSB.KIT file. If you wish to see an example of some of the functions, check out the included demo file EZSBDEMO. There is also a second demo that mainly shows off MODE7 called EZSBDEMO2. For an example of a game made using eZSB, see PONG 3D http://smilebasicsource.com/page?pid=303 ZID is a special ID provided for use with some eZSB functions/objects. ID ranges from 0-99. ZID is subject to be reworked in the near future. This should not greatly effect most projects but will change how they run internally

Notes:

Created by Richard Gordonson (AKA MYCRAFTisbest) CHANGELOG: 0.693: Fixed a Major oversight in sprite and sound positioning Improved the sprite positioning Added sound panning (one speaker louder than the other based on the location of the sound source to the camera) Improved speed slightly Changed syntax for MODE7 (not yet updated in the documentation, sorry :() (03/18/2016) 0.691: Improved MODE7 render speeds by nearly double Added partial implementation of positioned sprites Running EZSB.KIT as a standalone now loads a program telling you how to load it properly New 3DS now draws frames before displaying them (nicer look, Original 3DS does not do this) Experimental bottom screen support added Changed M7SET syntax Fixed a bug in the PAUSE function Updated documentation (located in comments of EZSB.KIT) Other minor changes and improvements to better user experience (03/04/2016) 0.69: Improved MODE7 Render Speeds on New 3DS Added Multi-GRP Map Stitching for Endless Worlds Added Proper Original 3DS Support and Locked Some HD Options Drew Some Awful Map Tilles (02/23/2016) 0.689: Added first implementation of MODE 7 (Thanks to Trinitro21 for base code) Added new demo to demo MODE 7 (EZSBDEMO2) Minor bug fixing and improved user experience (02/19/2016) 0.686: Maintains full compatibility with 0.684, just update the KIT file, no other changes required Splashscreen can now be skipped by pressing any button while it is running (by request) Fixed a bug in Pause Function that prevented the Reset from working Added missing documentation for ZBAR and ZPCT (02/15/2016) 0.684: Added Pause Function Added way to retrieve DIR Changed the Syntax for ZSPSM (just the default one) Bugfixes (02/14/2016) 0.68: Added Text Typing/Speaking Effect Added Demo Dialog to show Text Typing/Speaking Effect Added more Colors to ZBAR for a total of 15 (Plus all RGB colors) (02/10/2016) 0.65: Renamed from Z3D to eZSB Added Time and Date Functions Added Bar (Health) Function Added Percent Functions Added more Sprite Functions Improved Existing Functions Bug Fixes and Minor Improvements Improved Documentation in Comments (02/09/2016) 0.50: Added ZIDs. Added ZIDDEL. Added ZDIR. Added ZTXTS for a text shake effect. Added ZTXTW for a text color/z depth wave. Replaced Z3DRTS(A,B) with ZSPSM(A,B). Split into two files, Z3D.KIT and Z3DDEMO. Hardcoded spashscreen into KIT file (You may remove it if you want) Bugfixes & Improvements. (02/06/16) 0.31: Added Z3DRTSB call for simplest implementation. Added more scale features ((X)(Y)EXP, ZMIN, ZMAX). Removed Frame Option, please add your own VSYNC. Added data printout on bottom screen of demo. Added another sprite being scalled with Z3DRTSA (controllable one uses Z3DRTSB) (02/03/16) 0.25: Added function calls. Z3DRTS and Z3DRTSA (02/03/16) 0.10: RELEASE (02/02/16)

Replying to:16bitcoder
Cool! I am determined that one day, #AC will be as good!
Compilers are still hard... no offense

Replying to:16bitcoder
Cool! I am determined that one day, #AC will be as good!
None taken

If only I had a New 3DS XL... But super cool!

Replying to:Guzzler
If only I had a New 3DS XL... But super cool!
Yeah, sadly it does run a bit awful on the original 3DS. I am still optimizing the code, so it might run faster, but of course adding other things to it that would make it a game will lower it back. By v0.7 I'll probably have added something that allows the new3DS to run at a slower speed for testing O3DS performance as well as a built in function that matches run speeds with certain quality options.

Just going to say this, but you can use TMREAD and DTREAD to get the date and time. String operations are slower I think?

Replying to:Perska
Just going to say this, but you can use TMREAD and DTREAD to get the date and time. String operations are slower I think?
Yeah I know that now. Didn't realize it when I originally added the functions and have been too lazy/forgetful to fix those. I'll fix it now before I forget again.

lol, When I saw the thumbnail for this my first thought was "Hey, its Mode 7" :D I am not one for libraries, but this looks like it would be fun to mess around with. I will be sure to try it sometime.

Replying to:PetrifiedLasagna
lol, When I saw the thumbnail for this my first thought was "Hey, its Mode 7" :D I am not one for libraries, but this looks like it would be fun to mess around with. I will be sure to try it sometime.
Always glad to see that people are finding interest in the eZSB library. Just to note (for you or anyone else) that the Mode 7 functions are subject to change until the features are fully implemented in 0.700 as I am constantly optimizing the program as well as changing what is needed to properly use it. Also it's currently only properly optimized on the New 3DS. Older models are less supported than FireWire, although they will be getting proper support in the near future.

Can I recommend Semantic Versioning? It's a lot easier for the end user to understand changes that are breaking. http://semver.org/

Replying to:MasterR3C0RD
Can I recommend Semantic Versioning? It's a lot easier for the end user to understand changes that are breaking. http://semver.org/
I'm eventually just going to have depreciated functions. I do try to contain changes in the changelog, but 0.69X are not stable releases, they are debugging versions. You can potentially start work on some code using the existing functions, but they will need to be changed when updates are released.

Has anyone made a game using this?

Replying to:HumbleWario
Has anyone made a game using this?
Incredibly late response, but last I checked the only proper game created with eZSB is PONG 3D, which is something I made to demonstrate an earlier build of the Toolkit. http://smilebasicsource.com/page?pid=303 Really I more made this for my own personal projects (assuming few would have interest in reading any of the documentation) but things halted a while back. I might consider continuing work on it if it gains any notability.

It's about time I looked at this and holy cow that first demo was a bit all over the place and the second was impressive. I'm quite proud of my DEFY though...with my.. um... MAPRANGE() I guess... xD Seriously though, that MODE7 was pretty cool.

Replying to:Avery
It's about time I looked at this and holy cow that first demo was a bit all over the place and the second was impressive. I'm quite proud of my DEFY though...with my.. um... MAPRANGE() I guess... xD Seriously though, that MODE7 was pretty cool.
Thanks. The first demo is more of a tech test than a tech demo really. I am glad you enjoyed the MODE7. Trinitro wrote the original code for that, I just optimized it and added some features like the GRP stitching. If I ever actually get the chance, I want to come back and finish the mode 7 code to properly use sprites and then make something out of it. (Don't count on it though)

this is a cool MODE7 game

Replying to:DizzyDude
this is a cool MODE7 game
It's not a game, rather a library that Mode7 is implemented in. The Mode7 tech demo merely shows the potential of the feature

Hi, how do you use and make
TOOLS LIKE THIS
because I'm trying to make a SmileBASIC tool but only know how to do copy & paste type tools (and I might try using this)

Replying to:VG_Lover
Hi, how do you use and make
TOOLS LIKE THIS
because I'm trying to make a SmileBASIC tool but only know how to do copy & paste type tools (and I might try using this)
To let libraries work from another slot, do
EXEC "PRG<slot>:<libname>" 
. Those libraries are 100% functions and comments. These functions are slightly different, though. Instead of
DEF FUNC
they use a special variant
COMMON DEF FUNC
which lets the functions be used outside of the slot.

Replying to:VG_Lover
Hi, how do you use and make
TOOLS LIKE THIS
because I'm trying to make a SmileBASIC tool but only know how to do copy & paste type tools (and I might try using this)
Sorry, I'm still not used to what all these mean, what I did was stuff like:
TD=-256'TD Stands for Three Dimensional

Replying to:VG_Lover
Hi, how do you use and make
TOOLS LIKE THIS
because I'm trying to make a SmileBASIC tool but only know how to do copy & paste type tools (and I might try using this)
And by copy & paste tools, I mean you just copy and paste them into your active project