123
-=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- (c) WidthPadding Industries 1987 0|686|0 -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=-
Socoder -> Console Coding -> SmileBASIC Switch - Sale

Page : 1 Prev 2 3 Next 4 5 6 7
Sat, 09 Jul 2022, 14:11
spinal
I think I have a deep misunderstanding about how these spritesheets are ordered...



Trying to draw that large 3x3 sprite, with the top left frame seeming to be 96, suggests that there are 32 tiles per line, which isn't true because of some sort of paging or other.
Anyway, even the 3rd sprite is no the correct frame never mine the next row. I can't even see some of those images on the spritesheet!

-=-=-
Check out my excellent homepage!
Sat, 09 Jul 2022, 15:17
Jayenkai
One of the first things my template does is a big for n=0 to ?? (can't remember) resetting all the SPDef's
SPDef n,(n%32)*16, Floor(n/32)*16 ,16,16

The SPDef value is a square on the spritesheet.
You then SPSet SpriteNum,DefNum, and SPOfs SpriteNum,x,y to draw it onscreen.

SPDef DefNum,x,y,w,h
Essentially you can Define any rectangular area on the spritesheet (layer 4) to be a sprite, so if you want to make a gigantic 512,512 sprite, it'll let you do that.

I tend to reset them because, IIRC, by default they're not in the order I expected them to be in!

-=-=-
''Load, Next List!''
Sun, 10 Jul 2022, 13:03
spinal
Not 100% sure on the style yet, mostly pasted from existing sprites, but It'll do until it's a game I guess.



-=-=-
Check out my excellent homepage!
Sun, 10 Jul 2022, 13:05
Jayenkai
\o/yeay\o/
Sun, 10 Jul 2022, 15:41
spinal
Did I see a tweet recently about someone getting a smilebasic game Into the Nintendo store? Or might that have been a mistranslation?

-=-=-
Check out my excellent homepage!
Sun, 10 Jul 2022, 16:28
Jayenkai
Yes, it's now possible to do it.
I'm not sure on the exact steps to do it, but it involves requiring a Nintendo Company Account and all the guff that goes with that, as well as packaging your game up using some sort of Windows tools. (Unsure of the exact methodology)

When I was in hospital in 2020, they contacted me asking A) if I was ok, and B) if I wanted to try out the functionality. Wasn't the best time for me, if I'm honest, and I said as much in my reply.
And as the number of games increases, so did the overall complexity of what I'd have to do, namely compile all the games into a giant sprawling menu system, probably with little screenshots for each, and stuff like that..

..
Yeah, not really ideal..

Still, the option's there, and I'm sure if you get in touch, they'll happily let you know the steps to get your game up there.

-=-=-
''Load, Next List!''
Mon, 11 Jul 2022, 07:57
spinal
Lets see if I can get my game to work before taking those steps, but placing carrot on the stick might help my motivation to continue

-=-=-
Check out my excellent homepage!
Mon, 11 Jul 2022, 08:49
spinal
So the plan would have been for you to do a compilation? Would have been cool.

-=-=-
Check out my excellent homepage!
Mon, 11 Jul 2022, 13:17
spinal
Stupid question time, is it possible to create a sprite at runtime? I don't want to draw a full deck of cards, only to change my mind later about how the cards look.

-=-=-
Check out my excellent homepage!
Mon, 11 Jul 2022, 13:20
Jayenkai
The spritesheet is image layer 4. (You're probably already using LoadG,"sprites",4)
If you GTarget 4, you can use GCopy and GRect, GPSet, GLine, etc, to draw onto that layer.
(Don't forget to GTarget 0 again, afterwards!!)

-=-=-
''Load, Next List!''
Mon, 11 Jul 2022, 13:41
spinal
That sounds straight forward 👍
Wed, 13 Jul 2022, 07:30
spinal
I don't see anything about manually setting capslock, numlock etc. That would be the only way I can think of to comunicate back from the switch to the arduino...

-=-=-
Check out my excellent homepage!
Wed, 13 Jul 2022, 08:55
Jayenkai
Going from Switch to PC?
That's not "too" hard, and there's multiple ways to do it.
Possibilities..

Onscreen data burst.. as in convert to binary, render coloured pixels, take screenshot, load into app on PC.
Audio data burst.. Though I haven't used SmileBASICs audio waveform generating functions, it's possible to create a "tape loading" style thing. Cable from headphone jack to pc mic input.. record.. decode.

But... yeah, it can still be tricky.
There's a reason that my 150 games are only on SmileBASIC

-=-=-
''Load, Next List!''
Thu, 14 Jul 2022, 09:20
spinal
Stumbling block #1, Arduino does not support UK keyboard layout. Some special keys are wrong. That slows down my "insert some ascii art into my code" keyboard test.

|edit|
Switch doesn't recognise arduino as a usb keyboard

-=-=-
Check out my excellent homepage!
Fri, 15 Jul 2022, 03:12
spinal
Getting further, but stuck at - there seems to be no way possible to pass a string to a function (in C) that preserves special characters like '\' etc. so I can not in any way 'type' ascii art. Surely that's not right?

-=-=-
Check out my excellent homepage!
Fri, 15 Jul 2022, 04:10
spinal
OK, skipped using strings and functions etc. just reading the bytes from a txt file one at a time and 'typing' each byte regardless of it being a valid character or not seems to have done the trick...


View on YouTube


View on YouTube


Next step, a little screen and a couple of buttons for navigating different files, then.... spritesheets!

-=-=-
Check out my excellent homepage!
Fri, 15 Jul 2022, 04:52
steve_ancell
You persevered and you found a way forward. Keep going mate, we're all proud of you.
Fri, 15 Jul 2022, 05:17
AndyH
DOH!
Fri, 15 Jul 2022, 05:22
steve_ancell
He will find a way, he always does. Best way forward is to keep failures in the head, there's usually part of the solution still in there when combined with other ideas.
Fri, 15 Jul 2022, 05:26
steve_ancell
Does SmileBasic have some sort of feature request forum?, if so you could raise a ticket and ask them to put that in the SB libraries.
Fri, 15 Jul 2022, 05:35
Jayenkai
The head CEO of SmileBoom is on Twitter : @Notohoho. He listens, as long as you explain your issue, though they're currently a bit busy launching a 3D RPG maker for Windows!

|update| -=-=- |update|
Definitely looking good, there, Spinal!
Now make us some awesome games!!

-=-=-
''Load, Next List!''
Mon, 18 Jul 2022, 09:47
spinal
Has anyone seen the smailebasic4 spritesheet anywhere online in the wild? It should be 2048x2048, I can't seem to find it anywhere, I guess nobody has saw fit to rip it yet

-=-=-
Check out my excellent homepage!
Mon, 18 Jul 2022, 12:02
Jayenkai
Done quickly, no transparency, and with possible jpeg artefacts. If you want better, maybe give it a go yourself!
The method I used was basically to for-loop across the whole image, using the Switch's capture button to take screenshots as I went, then pieced it back together on the Mac using a PHP script.
I upscaled it 2x, so as to allow a crisp reduction.

Linkage

-=-=-
''Load, Next List!''
Mon, 18 Jul 2022, 12:29
spinal
Christ Jay, a simple "nope, never seen it" would have done you know!

Thanks!

-=-=-
Check out my excellent homepage!
Mon, 18 Jul 2022, 12:50
Jayenkai
Too hot to code anything significant, so figured it'd pass the time

-=-=-
''Load, Next List!''
Mon, 18 Jul 2022, 13:04
spinal
I'm currently wraping my head around opening a bmp file on the arduino and typing the daya into the switch. It's fun and irritating trying to think about two different projects at once in relation to eachother.

-=-=-
Check out my excellent homepage!
Page : 1 Prev 2 3 Next 4 5 6 7