#661✎ 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!AchievementsI'm not really sure why everyone is trying to jump right into dynamic text screen copy/scrolling, when many decent sized maps will fit within the maximum size of a text screen. Just try putting your entire map on a text screen and using TOFS for now.
Posted
I'm not really sure why everyone is trying to jump right into dynamic text screen copy/scrolling, when many decent sized maps will fit within the maximum size of a text screen. Just try putting your entire map on a text screen and using TOFS for now.
For me, it's mainly to get some of the functionality I had back with PTC, as that was on the DS that had actual 2D hardware that handled that sort of feature. There are plenty of instances where having upwards of a 181x181 map array to fill the max size of a text screen (TS) is just not going to be enough, not to mention when features like wrap-around would be necessary. Anyways, I believe I've optimized my method enough. As it stands, I can fill a 35x16 character TS in as little as 60 microseconds (a 128x128 TS in as little as 727 microseconds) using either 1x or 2x COPY statements equivalent to the TS's character height. Source array can be of any character width/height (not restricted to power of 2), so long as the width is greater than or equal to the TS's width. The 128x128 test was done with a 2048x2048 character source array (roughly 32MB, each character is 2 entries, each entry is 4 bytes). Combined with proper restriction of TOFS positioning to the area of a TS's character size, I got smooth dynamic TS scrolling with plenty of room to do other things. Because it's copying, it also allows altering the source map array, and having it reflect on the TS itself.
Posted
#663✎ 1571randoIntermediate ProgrammerI can make programs, but I still have trouble here and there. Programming StrengthThird YearMy account is over 3 years oldWebsiteAvatar TabooI didn't change my avatar for 180 daysWebsite
I'm not really sure why everyone is trying to jump right into dynamic text screen copy/scrolling, when many decent sized maps will fit within the maximum size of a text screen. Just try putting your entire map on a text screen and using TOFS for now.
With the game I’m making, the entire world is 8 screens (400 tiles) wide right now at 3DS resolution, and I kind of wanted a bit more exploration involved. At 128x128, that doesn’t exist. Though, I guess for now I can lower the size and finish the port, while also adding the features that I can add at that size such as bosses. I just hope I get a solution soon enough that I can release a full version soon.
Posted
#664✎ 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
I'm not really sure why everyone is trying to jump right into dynamic text screen copy/scrolling, when many decent sized maps will fit within the maximum size of a text screen. Just try putting your entire map on a text screen and using TOFS for now.
With the game I’m making, the entire world is 8 screens (400 tiles) wide right now at 3DS resolution, and I kind of wanted a bit more exploration involved. At 128x128, that doesn’t exist. Though, I guess for now I can lower the size and finish the port, while also adding the features that I can add at that size such as bosses. I just hope I get a solution soon enough that I can release a full version soon.
How many tiles high is the world? The limit isn't fixed to each dimension, it's based on the width*height of the map. You could do 400x81 at maximum and remain within the limit if the world needs to be 400 tiles wide.
Posted
#665✎ 47DiscostewI know the first Final Fantasy had a world map size of 256x256 tiles (if tiles were 16x16 pixels, made up of 2x2 meta tiles of 8x8 pixels each), making an overall image size of 4096x4096, and that was a case where scrolling and wrap-around were used.
Posted
#666✎ 188412Me21Syntax HighlighterReceived for creating the code syntax highlighter on SBSNight PersonI like the quiet night and sleep late.Express YourselfPlease stop using this thread
Posted
#667✎ 856IAmRalseiForum LeaderHiddenAchievementsSecond YearMy account is over 2 years oldWebsiteExpert ProgrammerProgramming no longer gives me any trouble. Come to me for help, if you like!Programming Strength
Please stop using this thread
Please don't stop using this thread in general. Just don't use it for this.
Posted
#668✎ 1571randoIntermediate ProgrammerI can make programs, but I still have trouble here and there. Programming StrengthThird YearMy account is over 3 years oldWebsiteAvatar TabooI didn't change my avatar for 180 daysWebsite
I'm not really sure why everyone is trying to jump right into dynamic text screen copy/scrolling, when many decent sized maps will fit within the maximum size of a text screen. Just try putting your entire map on a text screen and using TOFS for now.
With the game I’m making, the entire world is 8 screens (400 tiles) wide right now at 3DS resolution, and I kind of wanted a bit more exploration involved. At 128x128, that doesn’t exist. Though, I guess for now I can lower the size and finish the port, while also adding the features that I can add at that size such as bosses. I just hope I get a solution soon enough that I can release a full version soon.
How many tiles high is the world? The limit isn't fixed to each dimension, it's based on the width*height of the map. You could do 400x81 at maximum and remain within the limit if the world needs to be 400 tiles wide.
Yeah but I also want to incorporate mining and exploring downward as well.
I also came up with using the graphics screen to copy data, using GSAVE and GLOAD. I don’t know how that’ll work.
Please stop using this thread
Sorry I’ll make a new one.
Posted
#669✎ 1571randoIntermediate ProgrammerI can make programs, but I still have trouble here and there. Programming StrengthThird YearMy account is over 3 years oldWebsiteAvatar TabooI didn't change my avatar for 180 daysWebsiteLemme just say, SB4 is so much better than SB3.
Posted
#670✎ 47DiscostewI came across something odd. It seems that the smaller resolution I set for XSCREEN, the more processing my code requires, even if it differs in microseconds. For instance, when I set XSCREEN to 800x480, my function that resides within PERFBEGIN/PERFEND takes roughly 60 microseconds to complete. But, when XSCREEN is set to 400x240, it takes nearly 90 microseconds to complete. Roughly a 50% increase in running time. Thing is, nothing within my function reads XSCREEN information. In fact, all my function does is copy data from one array to another. It doesn't touch any graphical functions at all or any other function besides COPY.
Posted
#671✎ 412MZ952Intermediate ProgrammerI can make programs, but I still have trouble here and there. Programming StrengthThird YearMy account is over 3 years oldWebsiteReadingI like to read books!HobbiesHuh, weird
Even though you're not using any graphic instructions, the program probably still needs to render the screen at every frame
Was this test with nearest-neighbor interpolation?
Posted
Edited
by MZ952
#672✎ 1571randoIntermediate ProgrammerI can make programs, but I still have trouble here and there. Programming StrengthThird YearMy account is over 3 years oldWebsiteAvatar TabooI didn't change my avatar for 180 daysWebsiteWait, so because you can reference 2D arrays as if they were 1D, can you do the opposite? Like this:
DIM ARR[4]
ARR[1,1]=7
Posted
Wait, so because you can reference 2D arrays as if they were 1D, can you do the opposite? Like this:
DIM ARR[4]
ARR[1,1]=7
Don't think so, because there's no information on how many elements there are per channel.
Finally got my tunnel demo published for folks wanting to look at it. It also contains my COPY2D functions.
Posted
Edited
by Discostew
#674✎ 256niconiiPower UserVideo GamesI like to play video games!HobbiesExpert ProgrammerProgramming no longer gives me any trouble. Come to me for help, if you like!Programming StrengthDrawingI like to draw!Hobbies
Wait, so because you can reference 2D arrays as if they were 1D, can you do the opposite? Like this:
DIM ARR[4]
ARR[1,1]=7
Nope, that wouldn't be possible.
Consider this code:
DIM ARR[6]
ARR[1,1]=7
How long is a row in ARR? If we assume it's two rows of three, then it's setting ARR[4]. If it's three rows of two, then it's setting ARR[3].
Posted
#675✎ 1571randoIntermediate ProgrammerI can make programs, but I still have trouble here and there. Programming StrengthThird YearMy account is over 3 years oldWebsiteAvatar TabooI didn't change my avatar for 180 daysWebsiteHmm ok then
Posted
#676✎ 12Wubdubb94So I don’t know if anyone understands but I’m trying to make a bitmap sprite with data commands like this here is the sprite
Data00000
Data01110
Data01110
Data00000
The 0 is the background and the 1 is the sprite pixel but I’ve tried many things but I can’t figure out how to do this in sb4 and after I made the sprite I would like to run a graphic page showing the sprite and then I’d like to save it
Posted
#677✎ 89JayenkaiSprites exist on graphics layer 4.
You'll want to do something like..
GTarget 4
Then the data
For y=0 to 4
Read string (Make them into strings to make them easier to work with)
For x=0 to 4
If mid(string,x,1)=="1" then GPSet x,y,COL,#G_NORMAL
If mid(string,x,1)=="0" then GPSet x,y,0,#G_NORMAL
Next
Next
(Not exact code.. typing this on an iPad!! You'll have to improvise! Make use of F1 for help for all commands)
Then you'll want to define the sprite with SPDef
. Oh and don't forget to switch your GTarget back to whatever you had it at, prior to this.
Incidentally, the layer is 2048x2048 pixels in size (I think.. or is it 1024?.. hmmm), so. Yeah, you can go crazy, really, and have tons of sprites on there.
If you're saving the spritesheet, later, you might want to start by clearing the spritesheet first. That way your save doesn't include all the default sprites.
SaveG and LoadG can be used to load or save the entire Layer 4 sheet in one simple way.
Posted
Sprites exist on graphics layer 4.
You'll want to do something like..
GTarget 4
Then the data
For y=0 to 4
Read string (Make them into strings to make them easier to work with)
For x=0 to 4
If mid(string,x,1)=="1" then GPSet x,y,COL,#G_NORMAL
If mid(string,x,1)=="0" then GPSet x,y,0,#G_NORMAL
Next
Next
(Not exact code.. typing this on an iPad!! You'll have to improvise! Make use of F1 for help for all commands)
Then you'll want to define the sprite with SPDef
. Oh and don't forget to switch your GTarget back to whatever you had it at, prior to this.
Incidentally, the layer is 2048x2048 pixels in size (I think.. or is it 1024?.. hmmm), so. Yeah, you can go crazy, really, and have tons of sprites on there.
If you're saving the spritesheet, later, you might want to start by clearing the spritesheet first. That way your save doesn't include all the default sprites.
SaveG and LoadG can be used to load or save the entire Layer 4 sheet in one simple way.
Can you give me an exact example I’m getting nowhere with string and data?
Posted
#679✎ 89JayenkaiStrings as data are easy. Simply use the same lines of data that you already are, but instead of having
DATA 12345
Have
DATA "12345"
Posted