? SIM.3D ● SmileBASIC Source

Sign In

Register
*Usernames are case-sensitive
Forgot my password

SIM.3D

Submitted
Updated
Author
Simeon
Public Key
HEAEP3
Min. Compat.
All
Version
1.5
Size
90.4KB
Rating
30 votes
Description

A lightweight yet powerful 3D game engine

Instructions

What's New

_____________________

Version 1.5 - The physics update

  1. Although only bounding box physics are currently supported, it has been implemented in such a way that more complex shapes will soon be supported.
  2. Many performance improvements
  3. Now supports split-screen gameplay as well as quadruple-screen gameplay. Using two or four screens does not noticably change the overall framerate!
  4. Added the ability to merge objects into one, and split them (MERGEOBJ,SPLITOBJ).
  5. Added object bounding box variables (OBJMINX,Y,Z,OBJMAXX,Y,Z).
  6. An object's center is not longer its center of mass, but rather the center of its bounding box.
  7. Added a wireframe cube object (called WCUBE) as well as UPDATEWCUBETOOBJ to set the wireframe position ans size to match another object's bounding box.
  8. Added CHECKCOLLISION to check every object in the world to check for collisions.
  9. Added ISCOLLIDING to check if two objects are intersecting.
  10. Added RAYTHROUGHOBJ to check if an infinite ray is intersecting an object.
  11. Added COLOROBJAB function to color a specific range of triangles in an object.
  12. Added a FLAG object (the main character of 3D Parkour).
  13. Added 3D Parkour 2 Alpha as a demo.
  14. Instead of typing GCLS:BUFFER:RENDER you now just type RENDER to do everything.
  15. GETRAY2D now only takes in X,Z as opposed to X,Y,Z.
  16. Added variables to keep track of an object's scale.
  17. Added OBJSTR$ variables, which work the same as the OBJTAG$ variables.
  18. Added SETSTATICOBJ function to set if an object is affected by physics or not.
  19. Added variables to define the velocity for each object.

Version 1.4

  1. Added TEXT as a new object type! Check the documentation for more details! Game worlds can easily display messages as 3D objects.
  2. CHESS.3D has been worked on, the AI is more intelligent and uses alpha-beta pruning to simulate ahead in the future to find how to maximize the minimum score. In the first few lines you can set the AI_VS_AI to watch it play against itself.
  3. Every demo has been updated to make use of the new features.
  4. Fixed the randomly-appearing-flickering-lines-bug for DLC users.
  5. Fixed triangles-sometimes-not-rendering-glitch for non-DLC users.
  6. Also non-DLC users run at a fairly higher framerate due to less function calls.
  7. Perspective calculations and rendering have been worked on a lot, graphics are much smoother.
  8. Added a new demo to showcase 3D randomized fractal tree generation.
  9. Spheres now render without borders to improve the look of scenes.
  10. Changed the way object tags work, instead of saving TAG$ to every triangle it saves it in the objects themselves. Also triangles no longer carry a second color (the sphere border color). Triangles only carry the most necessary data now.
  11. FPS is more smooth/stabilized.
  12. Added the ability to change the view distance to make programs run faster for o3DS users.
  13. Added function APPLYSURFACEEQUATION to automatically set a SURFACE object to mimic a mathematical equation. This makes the code for the GRAPH_3D demo much simpler and gives users much more power to simulate terrain.
  14. Added lots of new functions!

Version 1.3

  1. Added a fully functional 3D chess game against a real AI that looks a few moves ahead to determine the best way to move.
  2. Added an first person shooter game demo.
  3. Added support for 3D lines using ADDLINE(X1,Y1,Z1,X2,Y2,Z2,COLOR).
  4. Added a surface object, which is a grid plane with multiple sections (used in the 3D grapher).
  5. Fixed a few bugs when deleting an object.
  6. Added some new functions.
  7. BUFFERing only buffers the top screen, use BUFFERBOTTOM to buffer the lower screen.
  8. Other small tweaks and optimizations.

Version 1.2

  1. Framerate has been doubled and possibly tripled, especially for DLC users. The engine runs incredibly fast for users that have purchased the SmileBASIC DLC!
  2. SIM.3D no longer needs any other program slots other than 3. So this update makes it a lot more compact and simple.
  3. Hue, saturation, and value are now optional by using HSV(H,S,V) just like RGB(R,G,B). Objects only need a single color value to be initialized. So #RED, #GREEN, #BLUE, etc... can work too.
  4. Field of view (FOV), world scale constant (WSC), and the cutoff ratio (CUTOFF_RATIO) are modifiable. Cutoff ratio is the ratio between the camera and the object of focus in which polygons will no longer be drawn. Default is 0.5.
  5. Lots of new functions that give more power to the user, such as finding the closest/furthest objects to a point, and making an object rotate to face a given point in the world.
  6. Behind the scenes optimizations for maximum performance.

Version 1.1

  1. DLC is fully implemented! The engine runs much smoother when the Advanced Sound DLC is purchased, the application now only needs to run a few ARYOP operations each frame.
  2. Performance without DLC has also been improved, but DLC gives much higher performance.
  3. Circles have been removed, and re-implemented as triangle objects. Now that there is complete consistency with objects, huge performance advancements have been made.
  4. The flickering graphics bug has been targeted and removed. Graphics feel cleaner with modified algorithms.
  5. Example programs have been modified a little bit. Please feel free to view the code for those, and use them to implement your own games. I do not require any credit. Everything is free for everybody.
  6. Triangles are now sorted by the furthest away Z point.
  7. CIRCLE functions are now called SPHERE functions.
  8. All future updates from this point forward will minimize the modifications required for a game to run on the updated engine. Any modifications required will be listed down here for you.

Version 1.0

  1. Application is stable.
Notes This application was designed specifically to teach the idea of 3D game design. While this engine was built with simplicity in mind, it was also built to maximize efficiency and minimize the computation required to display good looking graphics. With that said this is an excellent engine to make 3D games, I don't ask for any credit, and anyone can use this program for their own purposes. Use the comment section below for help, or if you have any questions, I'll be glad to help! To see the power of SIM.3D, I added some regular demos that will give a better idea on how to use SIM.3D. The files include:
  1. 3D.ENGINE - The engine in all it's glory.
  2. BOX_O_GEMS - A demo to show all the different kinds of objects, and how fast they render.
  3. CHESS.3D - A rather complex program to show what can be made with SIM.3D.
  4. FPS_DEMO - A first-person-shooter-styled simulation, on a Perlin-noise-generated map.
  5. GRAPH_3D - A powerful yet simple 3D equation grapher.
  6. PARKOUR2_ALPHA - The new development of 3D Parkour 2, in alpha state.
  7. SIERPINSKI - Using simple code to generate a Sierpinski pyramid.
  8. SIMPLE_CUBES - A short code demo to show how SIM.3D is used.
  9. SPIRAL_SPHERE - Generate colorful sphere-spirals of spheres.
  10. SPLIT_SCREEN - Example of using splitscreen (with 3D Parkour 2 Alpha)
  11. TREE_OF_WISDOM - Showcasing three dimensional fractal tree generation using simple recursion.
To use this engine, simply add this to the first line of your code PRGEDIT 3 EXEC "PRG3:3D.ENGINE" ENDDoing so will load the 3D engine into program slot 3, then insert the code from program slot 0 into program slot 3, then execute itself. The most basic application to rotate a cube in the center of the screen is as follows: PRGEDIT 3 EXEC "PRG3:3D.ENGINE" END 'S1M.3D VAR C=ADDCUBE(0,0,0,1,1,1,#GRAY) 'C CONTAINS A REFERENCE TO THE CUBE @LOOP VSYNC 'STABALIZE THE FRAMERATE ROTOBJ C,0,1,0 'ROTATE THE CUBE AROUND THE Y AXIS RENDER 'RENDER THE WORLD GOTO @LOOP 'REPEAT There are a few things to be aware of before diving into the 3D engine
  1. One in-world unit is the equivalent of 50 pixels. Adding a scale definition like this makes the game feel more realistic. This can be customized by changing the WSC (world scaling contant) variable.
  2. When working with SIM.3D, you must work in the default program slot 0, you will need to save every time you run the code. Any errors can be traced to your code in program slot 3 where the actual engine is.
  3. Or you could work directly in the 3D engine and avoid the use of the loader. There's a spot in the beginning of the code dedicated for user programs to go.
  4. Every object is composed of triangles. If a triangle is defined clockwise then it will be visible from the outside of the object. There are preset objects to make this easier to work with.
  5. So triangles can only be seen from one side (for higher performance), using STRETCHOBJ with negative values to stretch an object inside-out will let you see the object's back faces instead of front
  6. Every object is given an index. This index will never change until the object is deleted, in which case the ID will be given to the next future object to be defined.
Engine variables:VAR CAMX,CAMY,CAMZ 'THE FOCUS POSITION OF THE CAMERA (DEFAULT: 0,0,0) VAR CAMRX,CAMRY,CAMRZ 'ROTATION OF THE CAMERA (IN DEGREES) AROUND THE CAMERA FOCUS (DEFAULT: 0,20,0) VAR CAMDIST 'DISTANCE AWAY FROM CAMERA'S FOCUS POINT (DEFAULT: 10) VAR FOV 'FIELD OF VIEW (DEFAULT: 5) VAR WSC 'WORLD SCALING CONSTANT IN PIXELS (DEFAULT: 50) VAR CUTOFF_RATIO 'THE RATIO BETWEEN CAMERA AND FOCUS IN WHICH THINGS STOP RENDERING (DEFAULT: 0.7) VAR BOUNDCAMANGLES 'TRUE/FALSE, TELL IF THE CAMERA SHOULD BE BOUNDED BETWEEN -180 AND 180 (DEFAULT: 1) VAR RENDERDIST 'HOW FAR THE PLACER CAN SEE, 0=INFINITE (DEFAULT: 0) VAR ACCELERATED_RENDERING 'TRUE/FALSE TO USE ADVANCED SOUND DLC (DEFAULT: 1 IF POSSIBLE) VAR FPS 'FRAMES PER SECOND VAR GMW0,GMH0 'Where the screen starts (default: 0,0) VAR GMW1,GMH1 'Where the screen ends (default: 400,240) VAR GMW05,GMH05 'Defines the center of the screen to save computational resources Here are the preset object definitions:ADDCUBE(X,Y,Z,LENGTH,WIDTH,HEIGHT,COLOR) 'CREATES A RECTANGULAR PRISM, RETURNS ITS INDEX ADDWCUBE(X,Y,Z,LENGTH,WIDTH,HEIGHT,COLOR) 'CREATES A WIREFRAME RECTANGULAR PRISM, RETURNS ITS INDEX ADDSPHERE(X,Y,Z,RADIUS,COLOR) 'CREATES A SPHERE, RETURNS ITS INDEX IN THE WORLD ADDLINE(X1,Y1,Z1,X2,Y2,Z2,COLOR) 'CREATES A LINE, RETURNS ITS INDEX ADDPYRAMID(X,Y,Z,WIDTH,HEIGHT,COLOR) 'CREATES A PYRAMID, WHERE THE BASE OF THE BOTTOM IS X,Y,Z 'RETURNS THE OBJECT'S INDEX ADDDIAMOND(X,Y,Z,WIDTH,HEIGHT,COLOR) 'RETURNS THE OBJECT'S INDEX ADDCRYSTAL(X,Y,Z,WIDTH,HEIGHT,COLOR) 'RETURNS THE OBJECT'S INDEX ADDSKYBOX(X,Y,Z,LENGTH,WIDTH,HEIGHT,COLOR) '(AN INSIDE-OUT CUBE) 'RETURNS THE OBJECT'S INDEX ADDSURFACE(X,Y,Z,GRIDX,GRIDY,LENGTH,WIDTH,COLOR) 'CREATE A FLAT GRID PLANE, RETURNS ITS INDEX ADDFLAG(X,Y,Z,COLOR) 'CREATE A FLAG CHARACTER OBJECT, RETURNS ITS INDEX ADDTEXT X,Y,Z,TEXT$,COLOR 'MAKE A TEXT OBJECT IN THE WORLD 'RETURNS THE OBJECT'S INDEX You may also consider defining your own objectADDOBJ(TYPE$,X[],Y[],Z[],COLOR) 'X[],Y[],Z[] DEFINE EACH TRIANGLE. THESE ARRAYS MUST BE IN SETS OF 3, SO LENGTH=3,6,9,12,15,18,... Every object contains these variables:OBJX 'CENTER OF MASS X POSITION OBJY 'CENTER OF MASS Y POSITION OBJZ 'CENTER OF MASS Z POSITION OBJTEXT$ 'A STRING (USED IN TEXT OBJECTS) OBJTAG$ 'A STRING ONJTYPE$ 'A STRING TELLING WHAT TYPE OF OBJECT IT IS OBJINDEX 'THE INDEX POINTING TO WHICH TRIANGLES BELONG TO THIS OBJECT OBJLENGTH 'THE LENGTH OF HOW MANY TRIANGLES BELONG TO THIS OBJECT OBJRX 'GET (NO SET) THE OBJECT'S X ROTATION OBJRY 'GET (NO SET) THE OBJECT'S Y ROTATION OBJRZ 'GET (NO SET) THE OBJECT'S Z ROTATION OBJSX 'GET (NO SET) THE OBJECT'S X SCALE (WIDTH) OBJSY 'GET (NO SET) THE OBJECT'S Y SCALE (HEIGHT) OBJRZ 'GET (NO SET) THE OBJECT'S Z SCALE (LENGTH) OBJMINX 'GET (NO SET) THE OBJECT'S MINIMUM X VALUE OBJMINY 'GET (NO SET) THE OBJECT'S MINIMUM Y VALUE OBJMINZ 'GET (NO SET) THE OBJECT'S MINIMUM Z VALUE OBJMAXX 'GET (NO SET) THE OBJECT'S MAXIMUM X VALUE OBJMAXY 'GET (NO SET) THE OBJECT'S MAXIMUM Y VALUE OBJMAXZ 'GET (NO SET) THE OBJECT'S MAXIMUM Z VALUE OBJVX 'THE OBJECT'S X VELOSITY OBJVY 'THE OBJECT'S Y VELOSITY OBJVZ 'THE OBJECT'S Z VELOSITY OBJVISSTATIC 'TRUE/FALSE, IF THE OBJECT IS AFFECTED BY PHYSICS OBJMASK 'WHEN YOU DEFINE AN OBJECT YOU ARE GIVEN A MASK INDEX WHICH WILL NEVER 'CHANGE, SO YOU CAN ONLY ACCESS THE VARIABLES ABOVE BY GOING THROUGH THE OBJECT MASK 'FIRST: OBX[OBJMASK[MY_OBJECT_INDEX]]=FOO 'BY USING THIS MASK, WE CAN GUARANTEE THAT AN OBJECT INDEX WILL NEVER CHANGE 'EVEN IF OBJECTS BEFORE IT ARE DELETED. Here is a list of object functionsSTRETCHOBJ INDEX,SCALEX,SCALEY,SCALEZ 'SQUISHES OR STRETCHES AN OBJECT'S POINTS BY A GIVEN SCALE MOVEOBJ INDEX,DX,DY,DZ 'INCREMENT AN OBJECT'S POSITION MOVEOBJTO INDEX,X,Y,Z 'TELEPORT AN OBJECT SOMEWHERE ROTOBJ INDEX,AX,AY,AZ 'INCREMENT THE ROTATION OF AN OBJECT AROUND ITS CENTER OF MASS ROTOBJTO INDEX,AX,AY,AZ 'SET THE ROTATION OF AN OBJECT AROUND ITS CENTER OF MASS 'THIS WILL RESET THE OBJECT'S ROTATION TO ITS DEFAULT, THEN ROTATE IT AX,AY,AZ ROTOBJAROUND INDEX,X,Y,Z,AX,AY,AZ 'ROTATE AN OBJECT AROUND (X,Y,Z) ROTOBJAROUNDOBJ INDEX,INDEX2,AX,AY,AZ 'ROTATE AN OBJECT AROUND ANOTHER OBJECT ROTOBJTOPOINT INDEX,X,Y,Z 'ROTATE AN OBJECT SO THAT IT FACES THE POINT X,Y,Z MERGEOBJS(INDEX1,INDEX2) 'MERGE TWO OBJECTS, RETURNS THE NEW INDEX SPLITOBJ INDEX,TRIANGLES OUT INDEX1,INDEX2 'SPLIT AN OBJECT, DEFINING THE AMOUNT OF TRIANGLES FOR THE FIRST OBJECT DELOBJ INDEX : INDEX=-1 'DELETE AN OBJECT FROM THE WORLD CHANGEOBJCOLOR INDEX,COLOR 'SET AN OBJECT'S COLOR CHANGEOBJFACECOLOR INDEX,FACE,COLOR 'SET THE COLOR OF A SINGLE TRIANGLE ON AN OBJECT CHANGEOBJCOLORAB OBJECT,INDEX1,INDEX2,COLOR 'SET AN OBJECT'S COLOR FROM INDEX1 TO INDEX2 INSIDE THE OBJECT 'OBJECT TRIANGLE INDEXES START AT 0 FOR EACH OBJECT SETTAG INDEX,TAG$ 'GIVE AN OBJECT A STRING, DEFAULT="" 'THIS CAN BE ANYTHING, IT DOESN'T AFFECT THE 3D ENGINE GETTAG$(INDEX) 'GET THE TAG$ VALUE OF AN OBJECT FINDIBJBYTAG(TAG$) 'QUICKLY FIND AN OBJECT WITH A SPECIFIC TAG$ VALUE 'RETURNS -1 IF NO OBJECT EXISTS WITH THIS TAG SETSTR INDEX,S$ 'GIVE AN OBJECT A STRING, DEFAULT="" 'THIS IS USED TO STORE THE VALUE IN TEXT OBJECTS GETSTR$(INDEX) 'GET THE STRING VALUE OF AN OBJECT FINDIBJBYSTR(S$) 'QUICKLY FIND AN OBJECT WITH A SPECIFIC STRING$ VALUE 'RETURNS -1 IF NO OBJECT EXISTS WITH THIS STRING GETOBJTYPE$(INDEX) 'RETURNS THE STRING DEFINING WHAT TYPE OF OBJECT IT IS 'POSSIBLE RESULTS ARE: "CUBE","SPHERE","DIAMOND","CRYSTAL","PYRAMID","SKYBOX","LINE","SURFACE","TEXT" GETOBJSBYDIST(X,Y,Z) 'RETURNS A SORTED ARRAY OF OBJECT INDEXES SUCH THAT THE FIRST ITEM IS CLOSEST 'TO (X,Y,Z) AND THE LAST ITEM IS FURTHEST AWAY FROM (X,Y,Z) 'AND THE LAST ITEM IS FURTHEST AWAY FROM (X,Y,Z) UPDATEWCUBEAROUNDOBJ INDEX1,INDEX2 'CHANGE THE WIREFRAME CUBE OBJECT INSIDE INDEX1 TO THE SAME SHAPE AND 'SIZE OF THE OBJECT INSIDE INDEX2 (INDEX1 MUST BE A WCUBE OBJECT) APPLYSURFACEEQUATION INDEX,EQU$,MINY,MAXY,SCX,SCY,SCZ 'APPLY A MATH EXPRESSION TO A SURFACE OBJECT 'EQU$ IS AN EQUATION WITH X,Y, AND Z IN IT 'EQU$="SIN(X)+COS(Z)" MAKES A WAVY SURFACE 'MINY AND MAXY DEFINE THE OBJECT'S Y BOUNDS 'SCX,SCY,SCZ ARE THE ZOOM FACTORS, 0.1=>10X ZOOM GETUNMASKEDINDEX(MASKEDINDEX) 'SAME AS SAYING OBJMASK[MASKEDINDEX] UPDATEOBJCENTER INDEX 'UPDATES THE CENTER OF MASS OF AN OBJECT (DONE AUTOMATICALLY) SETSTATICOBJ INDEX,STATE 'SET IF AN OBJECT IS AFFECTED BY GRAVITY AND COLLISIONS 'STATE IS EITHER 1 OR 0 (0=nOT STATIC (PHYSICS)) ADDVEL INDEX,VX,VY,VZ 'ADD VELOCITY TO AN OBJECT 'YOU COULD ALSO JUST DO: 'OBJVX[OBJMASK[INDEX]]=X 'OBJVY[OBJMASK[INDEX]]=Y 'OBJVZ[OBJMASK[INDEX]]=Z And a few other functions, slightly unrelated, but implemented nonetheless:RENDER 'DRAWS THE CURRENT WORLD STATE, REQUIRED TO RUN ONCE EVERY FRAME BUFFER 'PREVENTS FLICKERING BY SWAPPING GPAGES EACH FRAME, DRAWING TO THE ONE NOT 'BEING SHOWN. THIS SHOULD BE RAN ONCE EVERY FRAME, WITH A GCLS DIRECTLY AFTER IT 'THIS ONLY AFFECTS THE TOP SCREEN 'THIS IS AUTOMATICALLY CALLED INSIDE RENDER _RENDER 'RENDERS THE SCENE WITHOUT CALLING BUFFER AND CLEARING THE SCREEN BUFFERBOTTOM 'PREVENT FLICKERING ON THE LOWER SCREEN, PUT GCLS DIRECTLY AFTER IT SPLITSCREENDRAW X1,Y1,Z1,RX1,RY1,RZ1,X2,Y2,Z2,RX2,RY2,RZ2 'REPLACES THE RENDER FUNCTION 'DRAWS TWO PERSPECTIVES FROM TWO CAMERA POSITIONS AND ANGLES QUADRUPLEDRAW X1,Y1,Z1,RX1,RY1,RZ1,X2,Y2,Z2,RX2,RY2,RZ2,X3,Y3,Z3,RX3,RY3,RZ3,X4,Y4,Z4,RX4,RY4,RZ4 'REPLACES THE RENDER FUNCTION 'DRAWS FOUR PERSPECTIVES FROM FOUR CAMERA POSITIONS AND ANGLES GETCAMRAY OUT X,Y,Z 'RETURNS THE NORMALIZED DIRECTION THE CAMERA IS FACING GETCAMRAY2D OUT X,Z 'RETURNS THE NORMALIZED DIRECTION THE CAMERA IS FACING EXCLUDING Y RAYTHROUGHOBJ(X,Y,Z,RX,RY,RZ,INDEX) 'CHECK IF THE RAY STARTING AT X,Y,Z AT THE ANGLE RX,RY,RZ 'IS COLLIDING WITH THE OBJECT INSIDE INDEX NORMALIZE X,Y,Z OUT X,Y,Z 'SET THE DISTANCE OF AN X,Y,Z DISPLACEMENT EQUAL TO 1 'WHILE MAINTAINING THE ANGLE CLEARWORLD 'DELETES EVERYTHING IN THE WORLD 'TRIANGLE OPERATION FUNCTIONS ADDTRI INDEX,TAG$,X1,Y1,Z1,X2,Y2,Z2,X3,Y3,Z3,COLOR SETTRI INDEX,X1,Y1,Z1,X2,Y2,Z2,X3,Y3,Z3 'SET A TRIANGLES POSITION DELTRI TRIANGLEINDEX 'DELETE A TRIANGLE '3D POINT ROTATION FUNCTIONS ROT X,Y,Z,ORIGINX,ORIGINY,ORIGINZ,ANGLEX,ANGLEY,ANGLEZ OUT X,Y,Z ROTX X,Y,Z,ANGLE OUT X,Y,Z 'ROTATE A POINT JUST AROUND X AXIS ROTY X,Y,Z,ANGLE OUT X,Y,Z 'ROTATE A POINT JUST AROUND Y AXIS ROTZ X,Y,Z,ANGLE OUT X,Y,Z 'ROTATE A POINT JUST AROUND Z AXIS INSERT ARRAY[],INDEX,VALUE 'QUICKLY INSERT AN ELEMENT INTO AN ARRAY REMOVE ARRAY[],INDEX 'QUICKLY REMOVE AN ELEMENT FROM AN ARRAY TRIM$(S$) 'REMOVE SPACES AND NEW LINES FROM THE FRONT AND END OF A STRING 'HSV OPERATIONS HSV2RGB HUE,SATURATION,VALUE OUT RED,GREEN,BLUE RGB2HSV RED,GREEN,BLUE OUT HUE,SATURATION,VALUE HSV(HUE,SATURATION,VALUE) 'RETURNS THE COLOR AS A SINGLE NUMBER, JUST LIKE RGB(R,G,B) DOES FCIRCLE X,Y,RADIUS,FILLCOLOR,BORDERCOLOR 'DRAW A FILLED CIRCLE TEXT X,Y,TEXT$,COLOR 'DRAW CENTERED TEXT ON THE SCREEN PERSPECTIVE X,Y,Z OUT X,Y,Z 'CONVERT IN-WORLD COORDINATES TO SCREEN COORDINATES PERSPECTIVEZ(X,Y,Z) 'QUICKLY JUST CALCULATE THE Z VALUE AFTER PERSPECTIVE ARYOP_PERSPECTIVE X[],Y[],Z[] OUT X[],Y[],Z[] 'CALCULATE FASTER PERSPECTIVE
Categories
Keywords
  • 3D
  • game
  • engine
203 Comment(s) TheV360 TheV360 Third Year My account is over 3 years old Website First Day Joined on the very first day of SmileBASIC Source Website Night Person I like the quiet night and sleep late. Express Yourself Bug report: RGB2HSV makes yellow become blue. RGB2HSV 255,255,0 OUT H,S,V ?H,S,V Simeon Simeon Scholar Received for knowing a great deal about programming topics Achievements Amazing Page Hidden Achievements Drawing I like to draw! Hobbies That function was made by the creator of SmileBASIC, uh oh 12Me21 12Me21 Head Admin Syntax Highlighter Received for creating the code syntax highlighter on SBS Night Person I like the quiet night and sleep late. Express Yourself Second Year My account is over 2 years old Website do you know what units they're using? Simeon Simeon Scholar Received for knowing a great deal about programming topics Achievements Amazing Page Hidden Achievements Drawing I like to draw! Hobbies Oh, well hue is from 0 to 360 Saturation and value are from 0 to 255 Maybe that would change things? snail_ snail_ Helper Received for being very helpful around SmileBASIC Source Achievements OSP Contest 2 Contest Participant I participated in the second SmileBASIC Source OSP Contest! Night Person I like the quiet night and sleep late. Express Yourself I think the HSV function you're using is bad. Value of 255 still looked gray. spaceturtles spaceturtles Video Games I like to play video games! Hobbies Avatar Block I didn't change my avatar for 30 days. Website Intermediate Programmer I can make programs, but I still have trouble here and there. Programming Strength Is the equation used to generate the chart in the screenshot the same as the default or what is it? Simeon Simeon Scholar Received for knowing a great deal about programming topics Achievements Amazing Page Hidden Achievements Drawing I like to draw! Hobbies Well, that's the 3D grapher, so the equation in the screenshot was Y=SIN(X)+COS(Z) It can graph any function IAmRalsei IAmRalsei Video Games I like to play video games! Hobbies First Year My account is over 1 year old Website Expert Programmer Programming no longer gives me any trouble. Come to me for help, if you like! Programming Strength is this raycasting or raytracing? Shelly Shelly I think its polygon rendering, so neither. IAmRalsei IAmRalsei Video Games I like to play video games! Hobbies First Year My account is over 1 year old Website Expert Programmer Programming no longer gives me any trouble. Come to me for help, if you like! Programming Strength okay Shelly Shelly Love it! VG_Lover VG_Lover Expert Programmer Programming no longer gives me any trouble. Come to me for help, if you like! Programming Strength Avatar Embargo I didn't change my avatar for 90 days Website Video Games I like to play video games! Hobbies Min. Compat. New 3DS Does that mean it doesn't work on o3DS? Simeon Simeon Scholar Received for knowing a great deal about programming topics Achievements Amazing Page Hidden Achievements Drawing I like to draw! Hobbies It works regardless, but this version was made on New 3DS, and so it's kindof slow on the o3DS. Why TF do you still own an original 3DS just trade it in for a New 3DS IAmRalsei IAmRalsei Video Games I like to play video games! Hobbies First Year My account is over 1 year old Website Expert Programmer Programming no longer gives me any trouble. Come to me for help, if you like! Programming Strength why are you FORCING people to get a new 3DS? they should be able to decide for themselves whether or not they get one (originally the title said what's wrong with you? but bold and italic doesn't work in spoiler titles) well i mean there's people who turn old 3ds-es into new ones UnderCake UnderCake Halloween 2017 Contest Runner Up I placed 2nd in the SmileBASIC Source Halloween 2017 Contest! Programming Contest Intermediate Programmer I can make programs, but I still have trouble here and there. Programming Strength First Year My account is over 1 year old Website Well because unlike many others getting a new3ds costs too much (even with trade in). As much as id looooooooooovvvvvvvveeee a new3ds its just not happening soon snail_ snail_ Helper Received for being very helpful around SmileBASIC Source Achievements OSP Contest 2 Contest Participant I participated in the second SmileBASIC Source OSP Contest! Night Person I like the quiet night and sleep late. Express Yourself New 2DS is a good upgrade option too if you're willing to give up 3D. Pros: vastly superior case design (YMMV), card slot hatch, about $50 cheaper MSRP Cons: weird speaker placement, weird stylus, no 3D (obviously), camera placement is different (but not bad) Went with this instead of a new 3DS and I don't regret it. Always research before you buy though. UnderCake UnderCake Halloween 2017 Contest Runner Up I placed 2nd in the SmileBASIC Source Halloween 2017 Contest! Programming Contest Intermediate Programmer I can make programs, but I still have trouble here and there. Programming Strength First Year My account is over 1 year old Website Yeah but still same thing, I don't have the money to buy it even if it is cheaper (and if i were going to spend the money i think i would indeed just get new3ds instead of two as i personally like the look and weight a lot more) Especially after holding a new2ds and a new3ds i can say the new3ds felt much better to hold for me. Buuuut otherwise i would be happy either way, just that if your going to spend the already $150 you might s well just make it $200 and get the 3d/stuff. snail_ snail_ Helper Received for being very helpful around SmileBASIC Source Achievements OSP Contest 2 Contest Participant I participated in the second SmileBASIC Source OSP Contest! Night Person I like the quiet night and sleep late. Express Yourself The mere accessability benefit that you don't have to unscrew the back panel to take out the microSD was enough for me (on top of the fact that I don't use the 3D.) UnderCake UnderCake Halloween 2017 Contest Runner Up I placed 2nd in the SmileBASIC Source Halloween 2017 Contest! Programming Contest Intermediate Programmer I can make programs, but I still have trouble here and there. Programming Strength First Year My account is over 1 year old Website Ooh that I did not know about...... (the not needing screws) that is a big reason lol. spaceturtles spaceturtles Video Games I like to play video games! Hobbies Avatar Block I didn't change my avatar for 30 days. Website Intermediate Programmer I can make programs, but I still have trouble here and there. Programming Strength I like the new 2ds too. It made a fine replacement for my old 3ds but I miss the small size and color. Also I'm sure Simeon wasn't forcing anyone to use a new model. He was suggesting/recommending it. VG_Lover VG_Lover Expert Programmer Programming no longer gives me any trouble. Come to me for help, if you like! Programming Strength Avatar Embargo I didn't change my avatar for 90 days Website Video Games I like to play video games! Hobbies Yeah, I'm sure he's just saying that it would be more worth it to upgrade Simeon Simeon Scholar Received for knowing a great deal about programming topics Achievements Amazing Page Hidden Achievements Drawing I like to draw! Hobbies Lol sorry Well, there's still hope, now it supports the DLC Idk how fast it would run on an o3DS with DLC, but probably around the same as a New 3DS MZ952 MZ952 Intermediate Programmer I can make programs, but I still have trouble here and there. Programming Strength Drawing I like to draw! Hobbies Reading I like to read books! Hobbies Awesome work so far! What got me really excited was the prospect that this will be a tutorial on building your own 3D graphics engine. I've searched online and experimented with only minimal success. Seeing as how everything programming that I learned came from SmileBASIC and trickled down, that kind of tutorial may have great implications on me. Simeon Simeon Scholar Received for knowing a great deal about programming topics Achievements Amazing Page Hidden Achievements Drawing I like to draw! Hobbies Thanks! Yes I'll be sure to put a lot of effort into the tutorial. Would you like an interactive SmileBASIC app tutorial? Or a the tutorial on this site? Walkthrough styled, like directions? Or explaining how everything works in depth? Or a combination of both? MochaProbably MochaProbably Expert Programmer Programming no longer gives me any trouble. Come to me for help, if you like! Programming Strength Night Person I like the quiet night and sleep late. Express Yourself Drawing I like to draw! Hobbies You should do the tutorial on the site so you don’t lose the key or something, and probably a combination IAmRalsei IAmRalsei Video Games I like to play video games! Hobbies First Year My account is over 1 year old Website Expert Programmer Programming no longer gives me any trouble. Come to me for help, if you like! Programming Strength i once messaged them about making a 3D engine and they said they were thinking about making a tutorial MZ952 MZ952 Intermediate Programmer I can make programs, but I still have trouble here and there. Programming Strength Drawing I like to draw! Hobbies Reading I like to read books! Hobbies I'd agree that a combination of the two would probably suit most parties. With me, the math behind it all (and the ideas linked to the math, like the virtual screen thing or the field of view or converting 3d world coordinates to screen coordinates given all factors) is the thing that stumps me most. If you're good at breaking things down to layman terms, I'm sure you'd achieve the best of both worlds anyway. Simeon Simeon Scholar Received for knowing a great deal about programming topics Achievements Amazing Page Hidden Achievements Drawing I like to draw! Hobbies Alright! I'll keep that in mind, it might take a bit to finish the tutorial 1 2 3