KermMartian wrote:
Sonlen wrote:
KermMartian wrote:
Not the way you have it written. Razz And kindly address what Weregoose said, perhaps?

I am sorry weregoose, I didn't see that, I was trying to post before I had to go install some hard drives in a room. It will go UP and LEFT for the map change, if I go down or right, it just reloads the same map you are currently on.
Ah, but you can move the player's sprite down and right along the current single screen? That would imply that the A=1 and B=1 cases aren't correctly being checked to decrement C or D.


Look at the 2 codes and tell me what you see wrong, I have scoured the codes like you wouldn't believe, and I still have nothing.
OK, I'll keep searching, but I suspect the problem is where you're updating A and B.
KermMartian wrote:
OK, I'll keep searching, but I suspect the problem is where you're updating A and B.

Thanks, I had been trying to find that for a long time, I think I have gotten rid of all but one Goto, and that is the Goto 0, so that shouldn't be the issue. I forgot to mention the one that handles the sword is using Goto J to get around it, unless I did the While 0 thingy.
Hey, I've been looking over your code today, and was able to modify the engine to load new maps without using labels. Here's what I got:

Code:

::DC6
:ClrHome
:8→A
:4→B
:8→C
:8→D
:2→H
:{8,16→dim([A]
:Fill(0,[A]
:"Wθ~→Str2
:While 1
:prgmZMAP9
:{1→L3
:Repeat 7.5=abs(A-8.5) or 3.5=abs(B-4.5
:Output(B,A,"π
:Repeat Ans
:getKey→K
:End
:If max(K={24,25,26,34
:Then
:(K-23)-7(K=34→H
:Output(B,A,"
:A-(K=24)+(K=26→Z
:B+(K=34)-(K=25
:If not(max(L3=[A](Ans,Z
:Then
:Ans→B
:Z→A
:Output(B,A,"π
:End
:End
:End
:End

All the code works perfectly. I also (because you hadn't ever posted your version of ZMAP9) made my own ZMAP9 program that has 4 or 5 rooms in it, compiled in strings, in RLE format. Here's my version of ZMAP9:

Code:

:ClrHome
:D-(A=1)+(A=16→D
:C-(B=1)+(B=8→C
:"W0
:If C=7 and D=8
:"M112B1C03120111011101110111011N01110111011101110113021C0912081
:If C=8 and D=6
:"41102330A110239011121120239011402390114023902130239041102390512391
:If C=8 and D=7
:"A12041D031B011202160111011I011A01110116011D0J1
:If C=8 and D=8
:"6120B11211409190113011W011B06190L1
:Ans→Str1
:A+14(A=1)-14(A=16→A
:B+6(B=1)-6(B=8→B
:1→H
:1→I
:Output(B,A,"π
:Fill(0,[A]
:If Str1≠"W0
:Then
:For(E,1,length(Str1),2
:inString("12",sub(Str1,E+1,1→G
:inString("123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ",sub(Str1,E,1→F
:If G
:Then
:For(F,1,F
:G→[A](H,I
:Output(H,I,sub(Str2,Ans,1
:I+1→I
:H+(I=17→H
:I-16(I=17→I
:End
:Else
:For(F,1,F
:I+1→I
:H+(I=17→H
:I-16(I=17→I
:End
:End
:End
:End
:getKey

I haven't played LoZ in a while so the few maps there are, were all based off of memory, so just play along like it's all correct.

Code:
:C+(B=1)-(B=8)→C
:D+(A=1)-(A=16)→D
:real(10,1,1
:"ZMAP"+sub("12345678",1+4int(C/4-4‾¹)+int(D/4-4‾¹),1
:real(10,0,1
:prgmXTEMP001
:real(10,1,1
:ClrHome
:{8,16→dim([A]
:length(Str1→W
:1→θ
:While θ≠W
:For(X,1,8
:For(Z,1,16
:[A](X,Z
:expr(sub(Str1,θ,1→V
:θ+1→θ
:V→[A](X,Z
:If Ans
:Output(X,Z,sub("WθXO",Ans,1
:End:End
:Return
:Pause


Here is ZMAP9 for your reference.
Although nice to have, it isn't very useful without the subprograms it uses.
MufinMcFlufin wrote:
Although nice to have, it isn't very useful without the subprograms it uses.


They all have 16 strings, in a 4x4 coordinate map, ZMAP1-ZMAP8.
Most are just 128 0's per string right now.
Ah, I see. I was trying out this RLE format for storing maps, and instead of 132 bytes for a map, it's (so far) been as little as 44 bytes per map, and as much as 60-ish bytes per map.
MufinMcFlufin wrote:
Ah, I see. I was trying out this RLE format for storing maps, and instead of 132 bytes for a map, it's (so far) been as little as 44 bytes per map, and as much as 60-ish bytes per map.
Sweet! I hope that Sonlen uses it; this is the perfect sort of application for RLE.
Mhmm... wouldn't such compression be very slow for BASIC? Maybe I am underestimating the language a bit, but I remember that people did not appreciate waiting 30 seconds for map loading in The Reign of Legends 3 on their TI-83 Plus Silver Edition or TI-84 Plus.
If it ends up taking over four seconds per character on average, I will write the decompressor myself.
DJ Omnimaga wrote:
Mhmm... wouldn't such compression be very slow for BASIC? Maybe I am underestimating the language a bit, but I remember that people did not appreciate waiting 30 seconds for map loading in The Reign of Legends 3 on their TI-83 Plus Silver Edition or TI-84 Plus.

It doesn't take terribly long with RLE. It in fact seemed to take just as long as storing the map into a string, then decompressing. I tried to make it a quick decompression, so I took all the necessary values from the string before ever looping through, and then it uses stored variables for the tiles. Also, when it would loop through empty tiles, it just increments H and I. Here's a screenshot:

It displays 0 at the end because the last line of code is getKey, so if you pressed down after you just went up on accident, then it'll forget about that.
That's quite impressive speed, but I'm willing to bet that that's running at fullspeed on a 15MHz calculator...
That was from WabbitEmu, using the same code as I posted before. It runs at about the same speed on my physical calculator.
MufinMcFlufin wrote:
That was from WabbitEmu, using the same code as I posted before. It runs at about the same speed on my physical calculator.
Aye, but it's a 15MHz calculator, right? On a 6MHz calculator the speed will be sadly less impressive. Smile
That still seems quite impressive, considering compression is involved. I was worried about something much slower.
DJ Omnimaga wrote:
That still seems quite impressive, considering compression is involved. I was worried about something much slower.
Oh, definitely, don't misunderstand my statements, I just want to make sure not to lose sight of the differences between fast and slightly slower hardware. This is still quite impressive.
I have now decided that when I get back to this project, I will be using XLib.
That's good. I began playing the original, and was thinking to myself that you were probably getting way in over your head.

I don't think I posted it, but I did make a little bit of code that would let you enter those little one room caves, exit them, and it would remember what part of the overworld map, and what part of that specific little map you were in as well.
MufinMcFlufin wrote:
That's good. I began playing the original, and was thinking to myself that you were probably getting way in over your head.

I don't think I posted it, but I did make a little bit of code that would let you enter those little one room caves, exit them, and it would remember what part of the overworld map, and what part of that specific little map you were in as well.


I had that bit solved :p

The only true issue I would have is implementing weapons and enemies.
  
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
» Goto page Previous  1, 2, 3 ... 13, 14, 15, 16  Next
» View previous topic :: View next topic  
Page 14 of 16
» All times are UTC - 5 Hours
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 

Advertisement