#1✎ 13legofordmnNew to Smilebasic, but wondering how to make a counting program where it would print each individual number, like if it would count for nearly forever.
#2✎ 13legofordmnNever mind, figured out how to do that. However, is there a way a variable could be a specific line of code? If so, could you give me an example to use?
#3✎ 78kitesinpowerlinesAvatar BlockI didn't change my avatar for 30 days.WebsiteAvatar EmbargoI didn't change my avatar for 90 daysWebsiteAvatar TabooI didn't change my avatar for 180 daysWebsiteWhat have you tried?
#4✎ 287ProKukuQSP Contest 1 Contest ParticipantI participated in the first SmileBASIC Source QSP Contest!Night PersonI like the quiet night and sleep late.Express YourselfPokemon Is Awesome!I love Pokemon!Express Yourself
However, is there a way a variable could be a specific line of code? If so, could you give me an example to use?
I’m not too sure what you mean by that. What are you doing right now for variables?
#5✎ 8S_DE_SolutionsAvatar BlockI didn't change my avatar for 30 days.WebsiteZelda Is Awesome!I love The Legend Of Zelda!Express YourselfIts seems you are realy new. So welcome to Smilebasic :-)
I thoght, that your problem is that each variable is printing in a new line. You have to "refresh" the Display. Try to use command CLS to fix this.
(Don't forget VSYNC for maximum Speed or setting Frame-rate)
#6✎ 13legofordmnOk, thank you guys for responding so quickly. However, I have a new problem. I am trying to make Minecraft for the 3DS a reality, and I made a super flat world with a purple block sitting on the grass what I want to do is make an effect where if you press up on the d-pad, the player will walk forward making the block get bigger and bigger as it moves toward it. Can you guys give me some tips on how to do something similar to this?
#7✎ 999YttriaHead Adminw-wait, we're going from a counting program to minecraft?
aren't there a few steps missing in there?
If you really want to do 3D, I would suggest learning one of the engines that already exist: SIM.3D, P3D, etc. rather than trying to write your own.
#8✎ 13legofordmn✎ 989Yttria Head Admin Are those programs ported to Smilebasic?
#9✎ 287ProKukuQSP Contest 1 Contest ParticipantI participated in the first SmileBASIC Source QSP Contest!Night PersonI like the quiet night and sleep late.Express YourselfPokemon Is Awesome!I love Pokemon!Express YourselfI'd recommend gradually gaining toward the goal of a 3-D Minecraft clone. Moving from a counting program to 3D rendering and movement would be like learning how to throw a ball, and then playing in the NFL the next day; it's just not.. practical. It'd be much better if you had some practice first.
Some things you might want to try to get some hands-on experience with SB:
Learn how to use GCIRCLE and all of the other graphics commands so you can draw shapes to the screen, then figure out how to add color to them, etc.
Figure out how to use the D-pad for moving a sprite across the screen, and find ways to add sound effects (BEEP command) and music (BGMPLAY command) into it.
There are many tutorials on here that explain just about everything related to SB, so if you have trouble figuring out a specific command, try searching for a thread with the same question before asking on another thread.
#11✎ 69photonegativemickeyMinecraft Is Awesome!I love Minecraft!Express YourselfIntermediate ProgrammerI can make programs, but I still have trouble here and there. Programming StrengthVideo GamesI like to play video games!Hobbies
#12✎ 287ProKukuQSP Contest 1 Contest ParticipantI participated in the first SmileBASIC Source QSP Contest!Night PersonI like the quiet night and sleep late.Express YourselfPokemon Is Awesome!I love Pokemon!Express YourselfI have a hard time seeing anyone completely new to programming being able to understand any of those... EH http://smilebasicsource.com/page?pid=50 this is the game Spooky Maze, but it also has the Raycaster library included.
#13✎ 13legofordmnOk, sorry if I am annoying you guys with problems, but I just want to figure out coding. Anywho, how do you save your programs to Smilebasic? As in, what statement do I use to save my programs?
#14✎ 287ProKukuQSP Contest 1 Contest ParticipantI participated in the first SmileBASIC Source QSP Contest!Night PersonI like the quiet night and sleep late.Express YourselfPokemon Is Awesome!I love Pokemon!Express YourselfThe simplest way to save a program is holding down L or R in edit mode, and tapping on the save button at the top of the bottom screen (it’ll ask you to give a name for the program if it hasn’t been saved already).
#15✎ 694random_godIntermediate ProgrammerI can make programs, but I still have trouble here and there. Programming StrengthQSP Contest 1 Contest ParticipantI participated in the first SmileBASIC Source QSP Contest!Video GamesI like to play video games!Hobbies
Don't forget Raycaster
Based off of what has been said, raycasting isn't good for minecraft ports. But, it does help build up to 3d stuff.
#16✎ 13legofordmnOk, how do you make a text scroll intro, if you know what I mean, because if I type in, PRINT, it will just print out the entire text at once, and I don't want it to do that, so do see what I am trying to get at here?
#17✎ 129seggiepantsIs this the sort of thing you are after? Remember you need to animate things, and that requires a game loop. You could put in a pause between print statements more easily but that doesn't let you animate or do other things in-between print statements. Please give this a read and let me know if you have any questions. Since you went from number counting to minecraft with nothing in between I assume you should have a lot of questions.
OPTION STRICT 'MAKE ME DECLARE VARIABLES
VAR CHAR_W = 8, CHAR_H = 8 'FAKE CONSTANTS
VAR SCREEN_W = 400, SCREEN_H = 240
VAR END_FLAG$ = "@"
VAR I, X, Y, DX 'REGULAR VARIABLES
'READ THE TEXT TO SCROLL, AND
'SAVE IT IN A HANDY ARRAY, ONE
'ENTRY PER LINE
WHILE LINE$ != END_FLAG$
PUSH MESSAGE$, LINE$
'DRAW A NICE DARK BACKGROUND
'JUST TO SHOW OFF DOING OTHER
'THINGS WHILE THE TEXT SCROLLS
'EXIT EARLY IF SET TO TRUE
QUIT_FLAG = FALSE
X = 0
DX = 1
Y = SCREEN_H - 1 'START AT BOTTOM OF SCREEN
GPRIO -255 'PUT DRAWING IN FRONT
'EXIT WHEN WE FINISH SCROLLING OR THE
'USER HITS THE EXIT BUTTON
WHILE (Y >= -1 * (LEN(MESSAGE$) * CHAR_H * 2)) AND QUIT_FLAG == FALSE
'CLEAR THE SCREEN TO TRANSPARENT
GFILL 0, 0, SCREEN_W - 1, SCREEN_H - 1, 0
'WRITE OUT THE TEXT BASED ON OUR SCROLL
FOR I = 0 TO LEN(MESSAGE$) - 1
CENTER_PRINT MESSAGE$[I], Y + (I * CHAR_H * 2)
'SET UP THE NEXT ANIMATION FRAME
Y = Y - 1
X = (X + DX)
IF X < 0 THEN
X = 0
DX = 1
ELSEIF X >= SCREEN_W THEN
X = SCREEN_W - 1
DX = -1
'MOVE THE BACKGROUND LAYER TO PROVE
'WE CAN DO MULTIPLE THINGS AND AREN'T
BGOFS 0, X, 0
'WAIT FOR THE SCREEN TO REFESH
'SEE IF WE NEED TO EXIT EARLY
IF (BUTTON(3) AND #B) != 0 THEN
QUIT_FLAG = TRUE
'DRAW A LINE OF TEXT ON THE SCREEN CENTERED
'AND AT THE DESIRED Y-COORDINATE
DEF CENTER_PRINT VALUE$, Y
'EXIT EARLY IF OFFSCREEN
IF Y >= SCREEN_H OR (Y + CHAR_H) < 0 THEN
'FLOOR ROUNDS DOWN
X = FLOOR((SCREEN_W - (LEN(VALUE$) * CHAR_W)) / 2)
GPUTCHR X, Y, VALUE$, #WHITE
'SETUP OUR BACKGROUND WE WILL BE SCROLLING
VAR TILE_SIZE = 16, TILE = 571 'BLUE BLOCK
VAR COLS = (SCREEN_W / TILE_SIZE) * 2
VAR ROWS = (SCREEN_H / TILE_SIZE)
BGSCREEN 0, COLS, ROWS
BGFILL 0, 0, 0, COLS, ROWS, TILE
'THE TEXT TO SCROLL
'STOP READING WHEN WE GET "@"
DATA "It was the best of times,"
DATA "it was the worst of times,"
DATA "it was the age of wisdom"
DATA "it was the age of foolishness,"
DATA "it was the epoch of belief,"
DATA "it was the epoch of incredulity,"
DATA "it was the season of Light,"
DATA "it was the season of Darkness,"
DATA "it was the spring of hope,"
DATA "it was the winter of despair,"
DATA "we had everything before us,"
DATA "we had nothing before us,"
DATA "we were all going direct to Heaven,"
DATA "we were all going direct the other way"
DATA "-- in short, the period was so far"
DATA "like the present period, that some of"
DATA "its noisiest authorities insisted on"
DATA "its being received,"
DATA "for good or evil,"
DATA "in the superlative degree"
DATA "of comparison only"
#18✎ 112SamAmazing PageHiddenAchievementsGreat PageHiddenAchievementsGood PageHiddenAchievementsObscure fact: there's actually a command designed for this, SCROLL.
GOTO @AIt isn't very powerful, but for beginners it's simple enough.
#19✎ 287ProKukuQSP Contest 1 Contest ParticipantI participated in the first SmileBASIC Source QSP Contest!Night PersonI like the quiet night and sleep late.Express YourselfPokemon Is Awesome!I love Pokemon!Express YourselfHow have I never heard of that command after all this time I’ve used SB
#20✎ 13legofordmnIs there a color eyedropper technique or something similar when you are designing textures, maps, etc.