? Globe ● SmileBASIC Source

Sign In

Register
*Usernames are case-sensitive
Forgot my password
Another contest? You asked for it!

Globe

Submitted
Updated
Author
12Me21
Public Key
4DY3EEH3
Min. Compat.
All
Version
3.7
Size
513 KB
Rating
10 votes
Description Displays an image on a sphere. Changes from version 1: -increased speed (around 2x) -now writes a function into slot 2 instead of using a FOR loop -removed quality setting since it's faster to just use a smaller size and SPSCALE it up. Instructions 1: load map image using LOADMAP: DIM MAP%[0,0] MAP%=LOADMAP(file,u,v,width,height)u: image X start v: image Y start width: image width height: image height (like SPSET) 2: generate sphere function: SPHERESETUP radius,width,height,precisionradius: radius of sphere to draw width: image width height: image height precision: angle precision (number of decimal places to keep in the angle value. Higher values can take longer to load initially, and might exceed the maximum program size) 3: draw sphere DIM OUT%[radius*2-1,radius*2-1] SPHERE angle,MAP%,OUT% GLOAD x,y,radius*2-1,radius*2-1,OUT%,TRUE,FALSEangle: angle to display the sphere at (must be between 0 and 1)
Categories
Keywords
  • globe
  • planet
  • sphere
  • projection
22 Comment(s) 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 Seems pretty cool. Could it be used for a simple KSP clone of some type, or would it lag too much? chicken chicken OSP Contest 1 Contest Participant I participated in the first SmileBASIC Source OSP Contest! Second Year My account is over 2 years old Website Good Page Hidden Achievements you can only change one angle. the other angles are static and cannot be changed. therefore, you could only look at places on the equator at bird's eye view in your KSP game. 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 Oh, okay. I didn't say that I would make it, but as soon as I get done with Lasership 2, I plan on working on Turtle Space Program, which, unfortunately, won't be 3d. 12Me21 12Me21 Admin Syntax Highlighter Received for creating the code syntax highlighter on SBS Night Person I like the quiet night and sleep late. Express Yourself Now it can draw a 239x239 sphere at 10 FPS... With 45000 lines of code... 12Me21 12Me21 Admin Syntax Highlighter Received for creating the code syntax highlighter on SBS Night Person I like the quiet night and sleep late. Express Yourself oh I guess I should actually upload the new version at some point... Chemicalex Chemicalex Drawing I like to draw! Hobbies RNG Hidden Easter Eggs Video Games I like to play video games! Hobbies Okay andrito give 12Me21's account back </lumage> 12Me21 12Me21 Admin Syntax Highlighter Received for creating the code syntax highlighter on SBS Night Person I like the quiet night and sleep late. Express Yourself I figured out how to make it around 3-4 times faster! The disadvantage is that now you have to wait like 3 seconds for SB to compile it. chicken chicken OSP Contest 1 Contest Participant I participated in the first SmileBASIC Source OSP Contest! Second Year My account is over 2 years old Website Good Page Hidden Achievements i know this would completely change your code, but... horizontal axis rotation? 12Me21 12Me21 Admin Syntax Highlighter Received for creating the code syntax highlighter on SBS Night Person I like the quiet night and sleep late. Express Yourself I tried, but I'm not sure how. It's a lot more complicated, I think. randomous randomous Power User Robot Hidden Easter Eggs Second Year My account is over 2 years old Website Drawing I like to draw! Hobbies Fancy! If it's extensible, it'd be cool if someone based a game around it. Or at least used it in the background. chicken chicken OSP Contest 1 Contest Participant I participated in the first SmileBASIC Source OSP Contest! Second Year My account is over 2 years old Website Good Page Hidden Achievements part of the cutscene for finding a new planet? Joshuaham123 Joshuaham123 How do you make it not so pixilated? 12Me21 12Me21 Admin Syntax Highlighter Received for creating the code syntax highlighter on SBS Night Person I like the quiet night and sleep late. Express Yourself There's a quality setting I think. But I'm going to upload a new version that will run twice as fast. Joshuaham123 Joshuaham123 Wow impressive amount of code. Joshuaham123 Joshuaham123 Looks sweet. there was something like this on PTC that You drew a picture on a rectangle and then it made it into a holographic looking globe. 12Me21 12Me21 Admin Syntax Highlighter Received for creating the code syntax highlighter on SBS Night Person I like the quiet night and sleep late. Express Yourself Yeah, that's what inspired me to do this. Nathaniel Nathaniel Spring 2017 Contest Winner I won the SmileBASIC Source Spring 2017 Contest! Programming Contest Helper Received for being very helpful around SmileBASIC Source Achievements Staff Pick "Your program is one of our favorites!" - Staff Achievements Do you want me to send you the 3D version? Perska Perska Summer 2016 Contest Winner I won the SmileBASICSource Summer 2016 Contest! Programming Contest Expert Programmer Programming no longer gives me any trouble. Come to me for help, if you like! Programming Strength RNG Hidden Easter Eggs I'm not sure the Moon is a planet. snail_ snail_ Power User Helper Received for being very helpful around SmileBASIC Source Achievements Expert Programmer Programming no longer gives me any trouble. Come to me for help, if you like! Programming Strength Second Year My account is over 2 years old Website But what IS a planet? Nathaniel Nathaniel Spring 2017 Contest Winner I won the SmileBASIC Source Spring 2017 Contest! Programming Contest Helper Received for being very helpful around SmileBASIC Source Achievements Staff Pick "Your program is one of our favorites!" - Staff Achievements According to Wikipedia- A planet is an astronomical body orbiting a star or stellar remnant that
  1. is massive enough to be rounded by its own gravity,
  2. is not massive enough to cause thermonuclear fusion, and
  3. has cleared its neighbouring region of planetesimals.
:)
12Me21 12Me21 Admin Syntax Highlighter Received for creating the code syntax highlighter on SBS Night Person I like the quiet night and sleep late. Express Yourself I never said it was a planet. I said I included maps of planets, but I didn't say all of them were planets. EDIT: A planet is a planet, you can't say it's only a half. ColeslawProductions ColeslawProductions Well, 12 """Me""" 21, hear me out.