#161✎ 272TheV360Pokemon Is Awesome!I love Pokemon!Express YourselfFirst DayJoined on the very first day of SmileBASIC SourceWebsiteNight PersonI like the quiet night and sleep late.Express YourselfI think my 3DS is cursed.
I was happily coding my event engine, and it worked! Then I tried events that trigger when you walk over them. Suddenly, I was given an error that made no sense. It was from the function that gets called every frame that a player exists on. The function is attached to a sprite via the SPFUNC command, so there was no way of it getting wrong parameters.
Out of range in 0:263(SPOFS:1)
I checked what was wrong with that line of code.
SPOFS CALLIDX,X%-7,Y%-7
I checked to see if the coordinate variables contained weird values. Nothing. I checked if I had any random new players being generated. Nothing. Finally, I checked the CALLIDX.
?CALLIDX
496
496. The flipping ID was outside my limit I set. Here, right at the beginning of my code, is this line:
XSCREEN 3,496,3(This means only use sprites 0 to 495.)
It's impossible to attach a function to a sprite that doesn't exist. What the heck.
EDIT: Somehow, I fixed it right after posting this. It seems that when using sprite functions, going inside a function causes CALLIDX to be reset in a weird way, which makes it 496. To solve this bug, I simply saved CALLIDX to a variable in the beginning of the player function and it worked.
Posted
Edited
by TheV360
#162✎ 178ChaseCZIntermediate ProgrammerI can make programs, but I still have trouble here and there. Programming StrengthVideo GamesI like to play video games!HobbiesZelda Is Awesome!I love The Legend Of Zelda!Express YourselfShould i release a bugfix demo after i finish the first level?
Posted
#163✎ 341spaceturtlesVideo GamesI like to play video games!HobbiesAvatar BlockI didn't change my avatar for 30 days.WebsiteIntermediate ProgrammerI can make programs, but I still have trouble here and there. Programming StrengthIf you wish. I would suggest finishing everything then, if you want, release a "test" version for others to test, fix any issues, then re-upload it.
Posted
#164✎ 178ChaseCZIntermediate ProgrammerI can make programs, but I still have trouble here and there. Programming StrengthVideo GamesI like to play video games!HobbiesZelda Is Awesome!I love The Legend Of Zelda!Express YourselfThat's what i meant. But you have in all levels the same ability, just the levels, bosses and other stuff are different, so that's why i asked
Posted
#165✎ 409SwanBotHalloween 2017 Contest Runner UpI placed 2nd in the SmileBASIC Source Halloween 2017 Contest!Programming ContestIntermediate ProgrammerI can make programs, but I still have trouble here and there. Programming StrengthFirst YearMy account is over 1 year oldWebsitetoday i finally made it to a whole 75 lines of code yipee.
well i guess i have a game to make still.. um here ill get a screen show of my nothingness i made.
A LITERAL 18 HOURS LATER AFTER LOOKING AND SLEEPING
(got the picture)
so yeah its 3 color bars that can move a sprite and set its colors and stuff
Posted
#166✎ 178ChaseCZIntermediate ProgrammerI can make programs, but I still have trouble here and there. Programming StrengthVideo GamesI like to play video games!HobbiesZelda Is Awesome!I love The Legend Of Zelda!Express Yourself
today i finally made it to a whole 75 lines of code yipee.
well i guess i have a game to make still.. um here ill get a screen show of my nothingness i made.
A LITERAL 18 HOURS LATER AFTER LOOKING AND SLEEPING
(got the picture)
so yeah its 3 color bars that can move a sprite and set its colors and stuff
That looks and sounds really good
Posted
#167✎ 188412Me21Syntax HighlighterReceived for creating the code syntax highlighter on SBSNight PersonI like the quiet night and sleep late.Express Yourself
I think my 3DS is cursed.
I was happily coding my event engine, and it worked! Then I tried events that trigger when you walk over them. Suddenly, I was given an error that made no sense. It was from the function that gets called every frame that a player exists on. The function is attached to a sprite via the SPFUNC command, so there was no way of it getting wrong parameters.
Out of range in 0:263(SPOFS:1)
I checked what was wrong with that line of code.
SPOFS CALLIDX,X%-7,Y%-7
I checked to see if the coordinate variables contained weird values. Nothing. I checked if I had any random new players being generated. Nothing. Finally, I checked the CALLIDX.
?CALLIDX
496
496. The flipping ID was outside my limit I set. Here, right at the beginning of my code, is this line:
XSCREEN 3,496,3(This means only use sprites 0 to 495.)
It's impossible to attach a function to a sprite that doesn't exist. What the heck.
EDIT: Somehow, I fixed it right after posting this. It seems that when using sprite functions, going inside a function causes CALLIDX to be reset in a weird way, which makes it 496. To solve this bug, I simply saved CALLIDX to a variable in the beginning of the player function and it worked.
Make sure you're calling the function with CALL SPRITE, otherwise CALLIDX is never set.
Posted
#168✎ 85Tiger2Can I use my own libraries that I created? So can I reuse them in different contests if I want because they are mine?
Posted
#169✎ 188412Me21Syntax HighlighterReceived for creating the code syntax highlighter on SBSNight PersonI like the quiet night and sleep late.Express Yourself
Can I use my own libraries that I created? So can I reuse them in different contests if I want because they are mine?
As long as they were publicly available before the start of the contest.
Posted
Can I use my own libraries that I created? So can I reuse them in different contests if I want because they are mine?
As long as they were publicly available before the start of the contest.
What do you mean? What if they are mine and i don't want to worry about someone taking my stuff without permission? Or do you mean I just have to tell you that I am using my own stuff?
Posted
#171✎ 341spaceturtlesVideo GamesI like to play video games!HobbiesAvatar BlockI didn't change my avatar for 30 days.WebsiteIntermediate ProgrammerI can make programs, but I still have trouble here and there. Programming Strength
Can I use my own libraries that I created? So can I reuse them in different contests if I want because they are mine?
As long as they were publicly available before the start of the contest.
What do you mean? What if they are mine and i don't want to worry about someone taking my stuff without permission? Or do you mean I just have to tell you that I am using my own stuff?
I think he means if they were uploaded by you then you can. If they weren't uploaded/downloaded then I guess they have to have been created during the contest (right after the start date, a little later, etc.).
Posted
Can I use my own libraries that I created? So can I reuse them in different contests if I want because they are mine?
As long as they were publicly available before the start of the contest.
What do you mean? What if they are mine and i don't want to worry about someone taking my stuff without permission? Or do you mean I just have to tell you that I am using my own stuff?
I think he means if they were uploaded by you then you can. If they weren't uploaded/downloaded then I guess they have to have been created during the contest (right after the start date, a little later, etc.).
What if they never were uploaded to begin with? It is in my system and my system only. Are you saying that if I created them before the contest I can't use them.
Which reminds me of another question. If I made a program before hand, and then there is a contest, can I use the program I just made if it is made by me and me only (no one else's libraries are used in it).
Posted
#173✎ 188412Me21Syntax HighlighterReceived for creating the code syntax highlighter on SBSNight PersonI like the quiet night and sleep late.Express Yourself
Existing Code:Libraries only. You can use pre-existing libraries that are publicly available (they have a key), but you can't use any other pre-existing code/projects/etc. You must program the whole thing now.
Existing Assets:Allowed. You can use any graphics or audio created at any time. Use other's assets with permission, please.
Existing Code:Libraries only. You can use pre-existing libraries that are publicly available (they have a key), but you can't use any other pre-existing code/projects/etc. You must program the whole thing now.
Existing Assets:Allowed. You can use any graphics or audio created at any time. Use other's assets with permission, please.
So if I give them a key, I can use my own libraries? Okay, I think I get it.
Posted
#175✎ 1134snail_Power UserQSP Contest 1 Contest ParticipantI participated in the first SmileBASIC Source QSP Contest!HelperReceived for being very helpful around SmileBASIC SourceAchievementsAmazing ContributorSomeone thinks I'm an awesome person who has done so much for the community!Achievements
Existing Code:Libraries only. You can use pre-existing libraries that are publicly available (they have a key), but you can't use any other pre-existing code/projects/etc. You must program the whole thing now.
Existing Assets:Allowed. You can use any graphics or audio created at any time. Use other's assets with permission, please.
So if I give them a key, I can use my own libraries? Okay, I think I get it.
Only if they had a key sometime before the contest start date though, I believe.
Posted
#177✎ 104kantackistanAnnouncing Virtual Buffalo - the world's most difficult, most intense, twitch based... pet simulator.
Not going to reveal gameplay details just yet, but it's not what you're expecting!
Favorite feature so far is that the background music is randomly assembled. Every few seconds the melody, bassline, and percussion are swapped and combined to try and keep things interesting. Here's just a small taste of what the results could sound like:
[url=https://youtu.be/-UUx84KNNqI]https://youtu.be/-UUx84KNNqI[/url]
Posted
Edited
by kantackistan
#178✎ 114Autz64QSP Contest 1 WinnerI won the first SmileBASIC Source QSP Contest!Programming ContestEnd of 2017 Contest ParticipantI participated in the SmileBASIC Source End of 2017 Contest!Programming ContestDeep SleepHiddenWebsiteGameplay reveal of Sun Gun Payback. Sorry for the poor lightning, my camera isn't that good.
[url=https://www.youtube.com/watch?v=douhKae9QKs]https://www.youtube.com/watch?v=douhKae9QKs[/url]
Posted
#179✎ 341spaceturtlesVideo GamesI like to play video games!HobbiesAvatar BlockI didn't change my avatar for 30 days.WebsiteIntermediate ProgrammerI can make programs, but I still have trouble here and there. Programming Strength
Gameplay reveal of Sun Gun Payback. Sorry for the poor lightning, my camera isn't that good.
[url=https://www.youtube.com/watch?v=douhKae9QKs]https://www.youtube.com/watch?v=douhKae9QKs[/url]
Whoa, that's good! Is that the bottom screen?
Posted
#180✎ 114Autz64QSP Contest 1 WinnerI won the first SmileBASIC Source QSP Contest!Programming ContestEnd of 2017 Contest ParticipantI participated in the SmileBASIC Source End of 2017 Contest!Programming ContestDeep SleepHiddenWebsite
Whoa, that's good! Is that the bottom screen?
Thanks!
And yes, that's the bottom screen. All the game will be on the bottom screen, hence the warning advice at the beginning.
Posted