|
I am very excited it's a lot to get into with no prior SmileBASIC knowledge though, and the software itself isn't that good at giving basic examples so I think it would be really helpful to have some super basic stuff explained (assuming it roughly follows the same logic as the previous version.) Particularly I'm having a difficult time wrapping my head around how I'm supposed to create, save and utilize custom sprites and music since the tutorial only tells you how to play or display the built-in stuff at the moment I'm just messing around with writing stuff directly to the graphic pages (which I think are essentially frame buffers?) and making pretty colors
|
# ¿ Apr 24, 2020 02:14 |
|
|
# ¿ May 16, 2024 05:14 |
|
ErrEff posted:Found this, it's a helpful text guide to understand the language and syntax, with examples. The examples are very good and one thing I've been missing with the official documentation. The reference manual only lists all the functions without any examples of how to use them, and while the in-game help function is very useful it doesn't always show how to use something and sometimes the examples are even cut off weirdly. It's a bit extra confusing because I'm not sure why some functions are called like "FUNC(A,B)" while others are called like "FUNC A,B" (no parenthesis)
|
# ¿ Apr 24, 2020 22:37 |
|
homeless snail posted:IDK if its a weird BASIC convention or what (last time i used BASIC before PTC2 was like, the C64), but they make a distinction between functions that have return values and ones that don't. The ones with parenthesis always return a value and can only be used in an expression, and the ones without parenthesis never have return values and can't be used in the middle of an expression. There are also functions with OUT parameters that fall more in line with the latter. ee: also on the topic of out parameters, there's a couple of functions that you pass arrays to for results but aren't OUT, since arrays are always passed by reference Well! That explains it Thanks! I've got a question only tangentially related to SmileBASIC 4 - other than (obviously) buying a copy of SmileBASIC 3, is there a way to get a look at the source code of programs from SB3 with public keys (like downloading the files on a computer)? There are so many and it would be a treasure trove of ideas on how to implement certain stuff but I tried googling and couldn't really find anything.
|
# ¿ Apr 25, 2020 05:07 |
|
homeless snail posted:You can load SB3 pubkeys into SB4 I'm pretty sure, they just won't run I never even thought to try (it works!)
|
# ¿ Apr 25, 2020 05:18 |
|
progress I've always wanted to try implementing a raycasting engine and this seemed like a good time. I was having a lot of problems that I just couldn't figure out until I turned on OPTION STRICT which I honestly recommend everyone use. SmileBASIC is very happy to just read whatever you write as a (new) variable so the tiniest typo or misunderstanding leads to some really tricky bugs. e: babby's first raycaster is now working! https://twitter.com/YourComputerSA/status/1254237340207210497?s=20 Your Computer fucked around with this message at 03:36 on Apr 26, 2020 |
# ¿ Apr 25, 2020 23:45 |
|
Casaval posted:Has anyone ever made something like a laptop shell for the Switch? Like you slot it into the top half like a dock and the bottom half is a usb keyboard (and maybe a trackpad). I've been doing something similar to that with the Hori USB Stand with a keyboard and mouse plugged in a bit more floppy than a laptop but i've successfully coded in bed this way Your Computer fucked around with this message at 02:51 on Apr 28, 2020 |
# ¿ Apr 28, 2020 02:49 |
|
I've been kinda hooked on this https://twitter.com/YourComputerSA/status/1255033774913359875?s=20 (twitter's compression is not kind to this... that's uh.. supposed to be a minimap on the left) I've got some bugs I can't figure out and I'm also running into performance trouble now by calling GPSET for each pixel which is.... not a particularly great way of doing this! Next thing I'm gonna do is make use of GARRAY to get the graphic page as an array and work directly on that instead, which should hopefully do the trick. speaking of graphics, is there any information anywhere on how SmileBASIC stores graphics with GSAVE? It gives you an array with..... something but I can't figure out what. It's not GCOLOR values and I couldn't find anything about converting it to anything useful. It's not important or anything, but it would be easier if I could just load textures by using GSAVE rather than making an array and then copying each pixel into the array.
|
# ¿ Apr 28, 2020 08:29 |
|
magimix posted:
that said, I fixed some of the bugs I had and added floors and ceilings. Even using the buffer like I mentioned previously, it chugs along at ~5 fps https://twitter.com/YourComputerSA/status/1255094577448382466 without the floors and ceilings it's running a lot better however https://twitter.com/YourComputerSA/status/1255094681852997632
|
# ¿ Apr 28, 2020 12:29 |
|
is there some neat way of storing a collection of data similar to a struct? I've found this is honestly the thing I'm missing the most so far if I'm just storing floats I realize I can simply use an array, but if I'm saving a variety of different data types it becomes a bit more complicated and I'm not sure what the "smart" way of handling it is in BASIC.
|
# ¿ May 2, 2020 00:09 |
|
homeless snail posted:No, not really. You're pretty much stuck using multiple arrays if you have to store things of different types. One thing in your favor though is that if you explicitly type stuff they can all have the same name, array# and array% and array$ don't collide and imo that makes it a little more clear that they're storing related stuff. For stuff of the same type, I used multi dimensional arrays a lot in SB3 to make lovely structs Thanks! I've been using SPVAR a bunch and it's very convenient, but I'm starting to make some non-sprite objects and I realized that I need some other way to store things I didn't know that about the explicit types so that's gonna come in handy for sure! One other idea I've toyed with is making enums for the different "structs" to make the code a bit more human-readable, like say I have a sphere "struct" with values like x,y,z,r etc. I could make an enum with x=0,y=1, and so on and then access values using the enum, like sphere[y] or sphere[r]
|
# ¿ May 2, 2020 00:47 |
|
I realize I already have half the posts in this thread but I'm just having a lot of fun currently toying with pixel-based collision detection using a collision map. It's not quite there yet but the results are pretty promising for a single night of work! https://twitter.com/YourComputerSA/status/1256622576064851971?s=20
|
# ¿ May 2, 2020 17:38 |
|
atholbrose posted:Ah, hell. I had no idea about this. Got it just now; it's way too cool to ignore! Thanks for bringing it up over in the Making Games thread, Your Computer. I wouldn't mind sharing the code, although I don't know if there's a good way to do it? It's quite a bit of code (330 lines) I tried going through the uploading thing but apparently that is a proper publish thing that has to go through reviews and stuff? I just backed out of it. If there's anything you're wondering about I'll gladly help though! also FWIW I've barely used a mouse at all. I do use the touchscreen a bunch though, even when I'm using a keyboard. organburner posted:IMO you need to post more tbh... as for posting more, here's the update to the previous gif. 2D pixel-based collisions using a normal map! https://twitter.com/YourComputerSA/status/1257009424763285504?s=20 is it clever or dumb? I don't know, but I just had the idea and needed to see if it worked!
|
# ¿ May 4, 2020 17:46 |
|
organburner posted:I do have one question, can you change the keyboard layout in the game? The switch has poo poo keyboard layout support and trying to program without knowing where symbols are is a pain in the poo poo. that said, I'm starting to get used to where a lot of the symbols are despite not being able to see them
|
# ¿ May 4, 2020 19:20 |
|
so although the normal map idea was way flashier, it turns out you can also just use a grayscale bitmap and map the 0-1 value to the angle of the surface and that's probably gonna be a lot easier to draw vv I'm aiming to make a simple 8-bit pinball game (always loved them in all their jank) and although the Switch is perfect for pinball when held vertical I'm kinda debating what to go with. Most people either don't have a flip grip or play primarily docked which would make a vertical-only game kinda unplayable, and it would be a lot more annoying to program/draw too. In addition to this I feel like the split board is one of those things that kinda make 8-bit pinball games what they are? maybe I'm just making up excuses anyway I got the collision stuff to work fine across multiple screens so that's cool https://twitter.com/YourComputerSA/status/1257401611783147523?s=20
|
# ¿ May 4, 2020 21:26 |
|
homeless snail posted:Don't forget you can just rotate the sprite your board is drawn to, so for tate you can draw it to grp memory the exact same way as regular it's hard enough for me to wrap my head around these grayscale values as polar coordinates in the first place, having to draw everything sideways would just be too confusing
|
# ¿ May 5, 2020 08:30 |
|
so uh, the downside of doing the grayscale collision map...... I just spent over an hour trying to figure out why my collisions were behaving oddly against some new collision geometry I had painted in. It made no sense. The problem? Turns out there were rogue 253,253,253 pixels among the white background pixels because the GAHAKU default palette is devoid of pure colors and even black/white aren't actually pure black/white
|
# ¿ May 5, 2020 17:20 |
|
atholbrose posted:And I can't stop thinking about what to do with it next. There's just something about BASIC, calling back to the earliest programs I ever wrote -- a lot of them games -- that is really appealing to me. speaking of which, progress! e: fixed an issue, I was applying the force the wrong way around oops! https://twitter.com/YourComputerSA/status/1258383707515138048?s=20 Your Computer fucked around with this message at 14:12 on May 7, 2020 |
# ¿ May 7, 2020 13:09 |
|
homeless snail posted:This sure is a productive use of my time aw man, I loved playing with those simulators as a kid
|
# ¿ May 8, 2020 09:08 |
|
honestly my biggest hurdle right now is that GAHAKU is garbage and creating sprites is therefore a massive pain are there any better pixel art tools yet, or some way to transfer images?
|
# ¿ May 8, 2020 13:17 |
|
Tempura Wizard posted:Looked like there were some editing tools uploaded by users, last time I checked. Can't say if they're any better or worse than Gahaku, but it's worth a shot. of the ones I tried, TH_GED easily seemed like the most capable and I'll probably spend some more time trying to understand it. also, I'm still working on the project! https://twitter.com/YourComputerSA/status/1259512053955301377?s=20 drawing the collision map is an extremely tedious process with no proper image editing tools, so it's a lot of trial and error
|
# ¿ May 10, 2020 17:10 |
|
the project is coming along nicely so I don't feel too bad about doubleposting https://twitter.com/YourComputerSA/status/1260778956375986177?s=20 I've revised the physics and added a ton of stuff. Once I've added switches and scorekeeping I'll probably draw the board and consider it done What you're seeing in the clip is the pure collision data, and although it's a massive pain to draw all of it in GAHAKU I'm starting to get the hang of it.
|
# ¿ May 14, 2020 05:29 |
|
I'm making a futile attempt to generalize my code a bit and make it easier to reuse, but I've hit a wall - is there really no way to make a const/enum accessible to other programs?
|
# ¿ May 28, 2020 23:18 |
|
|
# ¿ May 16, 2024 05:14 |
|
homeless snail posted:Not that I've seen. You're probably better off getting it from the US or Japanese store, because I don't have much faith that they're gonna navigate whatever issues they had with the ratings any time soon. With SB3 it was like two years between the NA and eventual EU release it's that bad? goodness, I'm glad I got this at launch
|
# ¿ Jun 5, 2020 00:50 |