[SHATTERED OASIS] Shattered Oasis Revived
Moderator: MaxCoderz Staff
- Madskillz
- Calc Wizard
- Posts: 745
- Joined: Fri 17 Dec, 2004 10:22 pm
- Location: Wandering around in the Jungle...
- Contact:
Wow looks awesome! I like the rage indicator too! I was wondering what your avatar was from...now all has been seen! Keep up the sweet work! I am looking forward to seeing this game finalized. 

The Revolution is here...
- Calv!n.n0.1
- New Member
- Posts: 49
- Joined: Fri 17 Dec, 2004 10:16 pm
- Contact:
- Shadow Phoenix
- Calc Guru
- Posts: 835
- Joined: Mon 03 Jan, 2005 7:54 pm
- Location: out there. seriosly.
- BetaSword
- Maxcoderz Staff
- Posts: 140
- Joined: Sat 18 Dec, 2004 3:34 am
- Location: West Chicago.
- Contact:
Quick updatey thing:
I've decided to ditch the idea of using strings to store and recall room data for now as the memory increase was not nearly enough to counter the speed hit (10-15 seconds to load a single room? hell no.) So it's back to the battle engine, which, as I revently realized, is the last part needing completion until the prologue can be released. Joy. So yeah. At least I can up with a spiffy way of easily choosing which enemy appears in battle, using a method similar to the one used to choose which sprites go onto the screen. So yeah. Great fun.
I've decided to ditch the idea of using strings to store and recall room data for now as the memory increase was not nearly enough to counter the speed hit (10-15 seconds to load a single room? hell no.) So it's back to the battle engine, which, as I revently realized, is the last part needing completion until the prologue can be released. Joy. So yeah. At least I can up with a spiffy way of easily choosing which enemy appears in battle, using a method similar to the one used to choose which sprites go onto the screen. So yeah. Great fun.
Well I'm using strings for the lvl data in my RPG... Currently the data looks like this:
Room = 7 x 11 sprites (xlib)
Block = 4x4 rooms
Level = 3 x 3 Blocks
So one level is made up of 144 rooms. Multiply times 77 for each sprite, that's 11088 datas to keep track of. As floating point: 99792 bytes for one level (matrix or list-wise). As strings: 11099! I definetly thing thats worth it (just a bit). If you consider that my RPG has at least 4 levels... ARGH!!! Strings are the way to go, plus I have a fast string to matrix converter... actually it converts str0 to [A](7,11) or vice-versa, and str0 to L1 and vice-versa (using ans as 0-11 for input).. I'll post the time for the converter when I get around to timing it.
Room = 7 x 11 sprites (xlib)
Block = 4x4 rooms
Level = 3 x 3 Blocks
So one level is made up of 144 rooms. Multiply times 77 for each sprite, that's 11088 datas to keep track of. As floating point: 99792 bytes for one level (matrix or list-wise). As strings: 11099! I definetly thing thats worth it (just a bit). If you consider that my RPG has at least 4 levels... ARGH!!! Strings are the way to go, plus I have a fast string to matrix converter... actually it converts str0 to [A](7,11) or vice-versa, and str0 to L1 and vice-versa (using ans as 0-11 for input).. I'll post the time for the converter when I get around to timing it.
ok, I timed it pretty roughly in my head... it converts str0 (length: 77) into [A](7,11) in roughly 4 seconds... As an added bonus it will work with any symbols you use. Here is the code: (just the str0 to [A])
Although it is pretty easy to understand (in my opinion) I'll explain it:
"ABC..."-> Str9: These are the symbols in your string that will represent numbers. A=1, B=2... and so on. You can add more or get rid of them if you need to.
{7,11}->dim([A]: This just sets up the right dimensions of [A], just in case.
For(Z,1,7, For(e,1,11: We neeed to loop 7 rows, 11, columns.
inString... The meat and potatoes of it. Here we go...
inString(Str9,sub(str0,(Z-1)11+e,1) -> [A](Z,e
Look in string 9 for the character in string 0 at this forumula... then save which place it is to [A], at the current loop coordinates.
thus if the current char. in str0 is 'B', it looks it up in str9, which just happens to be the second char. It stores that place (2) into the current coords in the matrix.
END:END: End our loops...
hope you like. please provide optimizations.

Code: Select all
"ABCDEFGHIJKLMNOPQRSTUV..."->Str9
{7,11}->dim([A]
For(Z,1,7
For([i]e[/i],1,11
inString(Str9,sub(str0,(Z-1)11+[i]e[/i],1) -> [A](Z,[i]e[/i]
End
End
"ABC..."-> Str9: These are the symbols in your string that will represent numbers. A=1, B=2... and so on. You can add more or get rid of them if you need to.
{7,11}->dim([A]: This just sets up the right dimensions of [A], just in case.
For(Z,1,7, For(e,1,11: We neeed to loop 7 rows, 11, columns.
inString... The meat and potatoes of it. Here we go...
inString(Str9,sub(str0,(Z-1)11+e,1) -> [A](Z,e
Look in string 9 for the character in string 0 at this forumula... then save which place it is to [A], at the current loop coordinates.
thus if the current char. in str0 is 'B', it looks it up in str9, which just happens to be the second char. It stores that place (2) into the current coords in the matrix.
END:END: End our loops...
hope you like. please provide optimizations.
-
- Extreme Poster
- Posts: 479
- Joined: Fri 17 Dec, 2004 11:09 pm
- Contact:
-
- Calc Wizard
- Posts: 526
- Joined: Tue 08 Mar, 2005 1:37 am
- Location: who wants to know?
- Contact:
Or you could use a list instead of the matrix, then all ya have to do is
Code: Select all
seq(inString(Str9,sub(Str0,I,1)),I,1,77