? Just random questions to help me make a game (Page 1) ● SmileBASIC Source Forums

Sign In

Register
*Usernames are case-sensitive
Forgot my password

Migrating to a new website for SmileBASIC 4

Just random questions to help me make a game

1 2
  • #1 ✎ 31 legofordmn Is there a way to make an if then statement followed by another then statement? Posted
  • #2 ✎ 41 S_DE_Solutions Avatar Taboo I didn't change my avatar for 180 days Website First Year My account is over 1 year old Website Zelda Is Awesome! I love The Legend Of Zelda! Express Yourself Thera are more Ways to do this. If "Insert condition" THEN If "Insert condition" THEN 'insert code ENDIF ENDIF other way: If "Insert condition" THEN 'Insert Code ELSEIF "Insert condition" AND "Insert condition" THEN 'Insert Code ELSEIF "Insert condition" OR "Insert condition" THEN 'Insert Code ELSE 'Insert Code ENDIF Posted
  • #3 ✎ 336 Minxrod Third Year My account is over 3 years old Website Expert Programmer Programming no longer gives me any trouble. Come to me for help, if you like! Programming Strength QSP Contest 2 Contest Participant I participated in the second SmileBASIC Source QSP Contest! Also, multi-line IF statements IF CONDITION THEN PRINT"line 1" PRINT"line 2" ENDIF Posted
  • #4 ✎ 1507 rando Intermediate Programmer I can make programs, but I still have trouble here and there. Programming Strength Second Year My account is over 2 years old Website Avatar Taboo I didn't change my avatar for 180 days Website
    Also, multi-line IF statements IF CONDITION THEN PRINT"line 1" PRINT"line 2" ENDIF
    oooh I love those I use them all the time
    Posted
  • #5 ✎ 246 niconii Power User Video Games I like to play video games! Hobbies Expert Programmer Programming no longer gives me any trouble. Come to me for help, if you like! Programming Strength Drawing I like to draw! Hobbies For conditions, you should use && and || rather than AND and OR. && and || are logical operators, whereas AND and OR are bitwise operators, which you usually don't want. It may seem like AND and OR work fine with conditions, because they give the same result when both sides are 0 or 1, but they can give surprising results with other numbers: 1 && 2 '1 1 AND 2 '0 5 || 0 '1 5 OR 0 '5 That said, sometimes you do want AND and OR, when you're working with bitmasks like BUTTON(): BUTTON() AND #A Posted
  • #6 ✎ 31 legofordmn Is there a way to increase the size of a sprite in increments when you are in a game? (Ex. You press a button, and it makes the sprite bigger in increments?) Posted
  • #7 ✎ 31 legofordmn Also, is there a way, where you would press a button and it would do one thing, but if you pressed the same button again, it would do something else? Posted
  • #8 ✎ 31 legofordmn Also, is there a way to move a sprite in increments when you push a button? Posted
  • #9 ✎ 1507 rando Intermediate Programmer I can make programs, but I still have trouble here and there. Programming Strength Second Year My account is over 2 years old Website Avatar Taboo I didn't change my avatar for 180 days Website You should look at a variable tutorial. I know a good one: http://smilebasicsource.com/page?pid=404 Also, for increasing sprite scale and moving it, SPOFS moves it and SPSCALE scales it. Posted
  • #10 ✎ 157 Vakore I thought it all had to be one line. I'm spoiled by the neatness of brackets in my code. This would've been so useful to know awhile back. Too late now. Finish what I'm working on and implement it in my next program. Posted
  • #11 ✎ 31 legofordmn How do I load, scale, and position a custom sprite? Posted
  • #12 ✎ 521 chicken 'these are the placeholders i used for values in the examples below: FILENAME, ID, DEF, X, Y, W, H, XF, YF LOAD "GRP4:FILENAME",0 'loads a GRP named FILENAME into the fourth graphics slot, which is used as the spritesheet by default 'the ,0 makes it so there is no confirmation dialog (just remove it and you'll see) 'there are two main ways to create a sprite: SPSET ID,DEF 'initializes the sprite <ID> and sets it to <DEF> definition number SPSET ID,X,Y,W,H 'initializes the sprite <ID> and sets it to the region of the spritesheet defined by <X,Y,W,H> 'sprite ids are the number used to refer to the sprite for operations like scaling and positioning 'sprite ids range from 0-511 by default SPSCALE ID,XF,YF 'scales the sprite <ID> by a factor of <XF> horizontally and a factor of <YF> vertically 'the scaling factors can't be less than 0, but 0 itself might be fine (i don't remember) SPOFS ID,X,Y 'positions the sprite <ID> at the position <X,Y> 'the sprite's position is at the upper-left corner of the sprite 'the top screen is 400x240, and coordinates start from 0 on the top left Posted Edited by chicken
  • #13 ✎ 31 legofordmn Is there a program or something that takes the QR code of a Petit Computer game, scan it, and program it into a code or game for SmileBasic? Posted
  • #14 ✎ 1507 rando Intermediate Programmer I can make programs, but I still have trouble here and there. Programming Strength Second Year My account is over 2 years old Website Avatar Taboo I didn't change my avatar for 180 days Website
    Is there a program or something that takes the QR code of a Petit Computer game, scan it, and program it into a code or game for SmileBasic?
    I don't think so, but people have made SB clones of petit computer games.
    Posted
  • #15 ✎ 157 photonegativemickey Minecraft Is Awesome! I love Minecraft! Express Yourself Intermediate Programmer I can make programs, but I still have trouble here and there. Programming Strength Video Games I like to play video games! Hobbies
    Is there a program or something that takes the QR code of a Petit Computer game, scan it, and program it into a code or game for SmileBasic?
    There’s a PTC to SB Converter
    Posted
  • #16 ✎ 542 HTV04 Forum Leader Hidden Achievements Third Year My account is over 3 years old Website Intermediate Programmer I can make programs, but I still have trouble here and there. Programming Strength
    Is there a program or something that takes the QR code of a Petit Computer game, scan it, and program it into a code or game for SmileBasic?
    There’s a PTC to SB Converter
    I believe there's also a PTC interpreter for SB
    Posted
  • #17 ✎ 31 legofordmn So, I am trying to recreate the VERY first of Minecraft on the 3DS, but I am not a professional at coding, so I was wondering if you guys could help me. I have currently made it so you can place stone blocks, but I want the blocks to move when I push a button. Could you guys help me with this? I have a picture of the code I have written so far, and I have a video showcasing the issue I'm experiencing. Video Link of game footage: https://youtu.be/6awom9GkGm4 Posted
  • #18 ✎ 1507 rando Intermediate Programmer I can make programs, but I still have trouble here and there. Programming Strength Second Year My account is over 2 years old Website Avatar Taboo I didn't change my avatar for 180 days Website I would help but the video won't load on my 3DS :( Posted
  • #19 ✎ 31 legofordmn Rando, you could use a computer to watch it. Just saying. Posted
  • #20 ✎ 542 HTV04 Forum Leader Hidden Achievements Third Year My account is over 3 years old Website Intermediate Programmer I can make programs, but I still have trouble here and there. Programming Strength
    Rando, you could use a computer to watch it. Just saying.
    And what if he doesn't have a computer to access it? Just saying.
    Posted
1 2