Omnimaga > The Blue Platform

The Blue Platform

(1/59) > >>

Eeems:
ok, this was part of the topic "Side Project #2: DUNGEON" until now. Basically this is a Platform game engine of a sorts. it currently has powerups, items, enemies, rope/monkeybars, spikes, health, and magic. It uses dual layer text sprites for the map. It runs moderately fast on a TI-83+.

Currently in the attachments: screenies of the game in action, and the current files

current code
--- Code: ---main engine::

:Text(‾1,0,0,sub(Str1,1,15
:Text(‾1,8,0,sub(Str1,16,15
:Text(‾1,16,0,sub(Str1,31,15
:Text(‾1,24,0,sub(Str1,46,15
:Text(‾1,32,0,sub(Str1,61,15
:Text(‾1,40,0,sub(Str1,76,15
:Text(‾1,48,0,sub(Str1,91,15
:Text(‾1,56,0,sub(Str1,106,15
:StorePic 2
:Text(‾1,0,0,sub(Str2,1,15
:Text(‾1,8,0,sub(Str2,16,15
:Text(‾1,16,0,sub(Str2,31,15
:Text(‾1,24,0,sub(Str2,46,15
:Text(‾1,32,0,sub(Str2,61,15
:Text(‾1,40,0,sub(Str2,76,15
:Text(‾1,48,0,sub(Str2,91,15
:Text(‾1,56,0,sub(Str2,106,15
:RecallPic 2
:L1(3→B:L1(4→A
:L1(1→G
:L1(2→H
:L1(5→S
:L1(6→T
:L2(1→Z
:L2(2→Y
:L2(3→X
:DelVar M
:DelVar JText(‾1,0,90,H
:If S:Then
:Text(‾1,24,90,"!
:End
:If G=3:Then
:Text(‾1,16,90,"
:End
:If T:Then
:Text(‾1,32,90,"
:End
:While A≠1 and A≠9 and B≠0 and B≠16 and H
:If E:Then
:E-1→E
:If not(E
:Then
:Text(‾1,8,90,"
:End:End
:A→C
:B→D
:Text(‾1,8A-8,6B-6,"Ω
:If M
:Then
:2→M
:Text(‾1,8A-8,6B-6,"Î
:End
:getKey→K
:If K:Then
:B+(K=26)-(K=24→B
:If B≠D
:Then
:If B and B≠16 and ""=sub(Str1,15A-14+B-1,1
:Then
:D→B
:End
:End
:End
:If A≠1 and A≠9
:Then
:If not(J) and ""≠sub(Str1,15(A+1)-15+B,1) and ""≠sub(Str1,15(A-1)-15+B,1
:Then
:A+1→A
:Else
:If S and K=21:Then
:prgmZAT
:End
:If T and K=31:Then
:prgmZSH
:End
:J+G(K=25 and not(J→J
:End
:If J:Then
:If ""≠sub(Str1,15(A-1)-15+B,1
:Then
:A-1→A
:End
:J-1→J
:End
:If (A≠C or B≠D) and B and B≠16
:Then
:Text(‾1,8A-8,6B-6,"Ω
:Text(‾1,8C-8,6D-6,"
:If ""=sub(Str1,15C-15+B,1
:Then
:Text(‾1,8C-8,6D-6,"
:End
:If 2=M
:Then
:Text(‾1,8C-8,6D-6,"Î
:DelVar M
:End
:End
:If " "≠sub(Str1,15A-15+B,1
:Then
:prgmZIT
:End:End
:If Z:Then
:prgmZEN
:End:End
:G→L1(1
:H→L1(2
:A→L1(3
:B→L1(4
:S→L1(5

special tiles (prgmZIT)

:If "o"=sub(Str1,15A-15+B,1
:Then
:1→T
:sub(Str1,15A-15+B,length(Str1)-15A-14+B→Str3
:sub(Str2,1,15A-16+B)+" "+Str3→Str1
:Else
:If "!"=sub(Str1,15A-15+B,1
:Then
:1→S
:sub(Str1,15A-14+B,length(Str1)-(15A-14+B→Str3
:sub(Str1,1,15A-16+B)+" "+Str3→Str1
:Text(‾1,24,90,"!
:Else
:If "Δ"=sub(Str1,15A-14+B-1,1
:Then
:H+3→H
:If 9<H
:Then
:9→H
:End
:sub(Str1,15A-14+B,length(Str1)-(15A-14+B→Str3
:sub(Str1,1,15A-16+B)+" "+Str3→Str1
:Text(‾1,0,90,H
:Text(‾1,8,90,"┼
:3→E
:Else
:If ""=sub(Str1,15A-14+B-1,1
:Then
:Text(‾1,16,90,"
:sub(Str1,15A-14+B,length(Str1)-15A-14+B→Str3
:sub(Str1,1,15A-14+B-2)+" "+Str3→Str1
:3→G
:Else
:If "Î"=sub(Str1,15A-14+B-1,1
:Then
:Text(‾1,0,90,H
:H-1→H
:1→M
:End
:End
:End
:End

sword animation (prgmZAT)

:15A-15+B→S
:Text(‾1,8A-8,6B,"-
:Text(‾1,8A-16,6B-6,"/
:Text(‾1,8A-8,6B,sub(Str1,S+1,1
:StorePic 2
:Text(‾1,8A-8,6B,sub(Str2,S+1,1
:RecallPic 2
:Text(‾1,8A-16,6B-6,"!
:Text(‾1,8A-16,6B,sub(Str1,S-14,1
:StorePic 2
:Text(‾1,8A-16,6B,sub(Str2,S-14,1
:RecallPic 2
:Text(‾1,8A-16,6B-12,"
:Text(‾1,8A-16,6B-6,sub(Str1,S-15,1
:StorePic 2
:Text(‾1,8-16,6B-6,sub(Str2,S-15,1
:RecallPic 2
:Text(‾1,8A-8,6B-12,"-
:Text(‾1,8A-16,6B-12,sub(Str1,S-16,1
:StorePic 2
:Text(‾1,8A-16,6B-12,sub(Str2,S-16,1
:RecallPic 2
:Text(‾1,8A-8,6B-12,sub(Str1,15A-16+B,1
:StorePic 2
:Text(‾1,8A-8,6B-12,sub(Str2,15A-16+B,1
:RecallPic 2
:1→S
:If (A=Y and (B-1=X or B+1=X)) or (A-1=Y and (B-1=X or B=X or B+1=X
:Then
:DelVar Z
:End

magic animation (prgmZSH)

:H+2(X=B or X=B+1 or X=B-1→H
:A-1→T
:If H>9:Then
:9→H
:End
:Text(‾1,8T-8,6B-6,"O
:For(θ,1,10):End
:Text(‾1,8T-8,6B-6,"o
:For(θ,1,10):End
:Text(‾1,8T-8,6B-6,"o
:For(θ,1,10):End
:Text(‾1,8T-8,6B-6,"∙
:For(θ,1,10):End
:Text(‾1,8T-8,6B-6,sub(Str1,15T-15+B,1
:StorePic 2
:Text(‾1,8T-8,6B-6,sub(Str2,15T-15+B,1
:RecallPic 2


enemy movement and action handler (prgmZEN)

:H+2(X=B or X=B+1 or X=B-1→H
:A-1→T
:If H>9:Then
:9→H
:End
:Text(‾1,8T-8,6B-6,"O
:For(θ,1,10):End
:Text(‾1,8T-8,6B-6,"o
:For(θ,1,10):End
:Text(‾1,8T-8,6B-6,"o
:For(θ,1,10):End
:Text(‾1,8T-8,6B-6,"∙
:For(θ,1,10):End
:Text(‾1,8T-8,6B-6,sub(Str1,15T-15+B,1
:StorePic 2
:Text(‾1,8T-8,6B-6,sub(Str2,15T-15+B,1
:RecallPic 2
--- End code ---
please give me your optimizations :)

Eeems:
ok I'm uploading the edited version, and I fixed the error with the falling off the bottom thing.

DJ Omnimaga:
Cool I'll check this one soon. How many levels does this one have? I know the other only had 2

Eeems:
three I think, but I don't know if I could get the third to work right (just play around with prgmPLATFORM if it doesn't)

Eeems:
ok, I've played around with the programs a bit and I've gotten rid of a few errors, I'm also trying to make it more programmer friendly for switching levels by giving a map coordinates thing (L3) so every time you go off the map it will change the list vars accordingly. I'm also going to add a little bit of code at the end to make it easier to figure out where the char comes on in the new map (0->15 and 16->1 etc) but it will still take in manual lists. I'm going to add some more maps when I get this finished

Navigation

[0] Message Index

[#] Next page

Go to full version