Omnimaga

Calculator Community => Other Calc-Related Projects and Ideas => TI Z80 => Topic started by: trevmeister66 on May 05, 2009, 01:55:54 am

Title: Side Project #2: DUNGEON
Post by: trevmeister66 on May 05, 2009, 01:55:54 am
Well after playing Zoith a couple times (not sure why I played more than once, since it's really short), I thought it'd be fun/interesting to make a Zoith on steroids, or rather a game similar to Zoith, except with MUCH more.

Here's a screenie of what I have so far:
(http://www.freeimagehosting.net/uploads/f8050eb487.gif)

I have a bunch of bugs that I need to fix, but I'm still adding a bunch of stuff as well, and will get to the bugs later.

It's going to bet 8 'rooms' by 8 'rooms', and each room is 8 tiles by 12 tiles (8 high, 12 wide). The object of the game is to get to the dungeon exit, located at (8,8),  the farthest point from the starting point (1,1). Like Zoith, DUNGEON will have 'enemies' who just move around and deal damage to you if you run into them, and there will be bombs and spikes that you'll have to avoid; Unlike Zoith, however, DUNGEON will include Power Ups and  and Items that will aid you in getting to finish (For example, Super Jump in the screenie, which lets you jump 1 space higher). Currently I have 5 P-ups and 5 items planned, which could change based on how much space/speed is given up for each one.

Also, the number in the top right is your health.
Title: Re: Side Project #2: DUNGEON
Post by: DJ Omnimaga on May 05, 2009, 02:05:17 am
Wow this is looking awesome, darn I really need to experiment with dual layer tiles one day. My favourite part are the bombs. This seems to run pretty fast so far.
Title: Re: Side Project #2: DUNGEON
Post by: trevmeister66 on May 05, 2009, 02:39:44 am
Thanks :) Yeah I've been trying for a while to get some sort of decent game with duel layer ASCII going, and this is the first time I've actually gotten it to be somewhat fast and decent looking, although the spikes sprite doesn't look like a spike, and the bomb sprite I got from Zoith, so I can't take credit for it.

I have now coded in 1 more power up: Regenerate. You heal 5 HP every time you change rooms until you get to your max HP, which starts off at 100. I might switch it to 1 HP instead so that people don't abuse it by going between 2 "safe" rooms to boost up their HP to full.

I have about 1/4 of the total map designed (technically 12/64, but who's counting?). Designing the different rooms is definitely the hard part...I have to keep it somewhat simple to navigate through, make sure it's still a little difficult, but not TOO difficult, and still make it kind of like a puzzle as well so that you have to think a little.
Title: Re: Side Project #2: DUNGEON
Post by: DJ Omnimaga on May 05, 2009, 03:19:05 am
Interesting. I wonder if there will be some sort of projectile based enemies? I mean for example every now and then a missile going through the screen and you must avoid it along with other enemies moving around?
Title: Re: Side Project #2: DUNGEON
Post by: kalan_vod on May 05, 2009, 08:22:13 am
I like the sound of this, but your SS died or is gone :(
Title: Re: Side Project #2: DUNGEON
Post by: DJ Omnimaga on May 05, 2009, 11:43:01 am
It works for me but it takes a ridiculous amount of time to load x.x

I bet it is on a very slow image hosting x.x
Title: Re: Side Project #2: DUNGEON
Post by: kalan_vod on May 05, 2009, 12:21:23 pm
It was down last night, now it works fine. Looks great! I would suggest one thing though:

Code: [Select]
:Text(-1,Y,X,"U    ;char your using
;it looks like thats what your doing (something similar) in the SS, as it makes the char flash
:Text(-1,oldY,oldX,"    ;space
:Text(-1,Y,X,"U
:Y->oldY:X->oldX  ;vars at your choice

Now when you move it will update your chars old position, and then your new. But making it not flash. Just a thought, I will go into detail if you wish (sorry if you already have this or something like it going on).
Title: Re: Side Project #2: DUNGEON
Post by: trevmeister66 on May 05, 2009, 01:51:10 pm
Interesting. I wonder if there will be some sort of projectile based enemies? I mean for example every now and then a missile going through the screen and you must avoid it along with other enemies moving around?

Hmm I might think about adding in 'projectiles' that will be shot, kind of like the cannon things in  Super Mario, although I think the code for that might slow this game up too much. It's already running slower now, although I think it's because my comp is making Wabbitemu run slower -.- I'm gonna add in moving enemies first and see how that goes. All the other things are already added in or if they're not, they shouldn't slow it down really at all.

It was down last night, now it works fine. Looks great! I would suggest one thing though:

Code: [Select]
:Text(-1,Y,X,"U    ;char your using
;it looks like thats what your doing (something similar) in the SS, as it makes the char flash
:Text(-1,oldY,oldX,"    ;space
:Text(-1,Y,X,"U
:Y->oldY:X->oldX  ;vars at your choice

Now when you move it will update your chars old position, and then your new. But making it not flash. Just a thought, I will go into detail if you wish (sorry if you already have this or something like it going on).

Hmm I have it where every time it cycles through the loop it displays the character, and whenever you move, it just removes your character, and at the beginning of the next loop, it displays it.. I'll look into coming up with a new way to do this, or use your way or something.
Title: Re: Side Project #2: DUNGEON
Post by: TIfanx1999 on May 05, 2009, 04:57:05 pm
Hey, this looks really nice! I always love these type of games.
Title: Re: Side Project #2: DUNGEON
Post by: trevmeister66 on May 05, 2009, 05:08:58 pm
Alright well I have now added in moving enemies:

(http://www.freeimagehosting.net/uploads/3c7f307de9.gif)

Watch til the end..heh pit of doom :)

Since it didn't take up too much space, and it really didn't slow it down too much, I'm gonna add in at least 1 more type of enemy, if not 2 or 3 more. I also added some more rooms, but haven't really added anything else except the Regenerate Power Up (in the screenie).
Title: Re: Side Project #2: DUNGEON
Post by: skuller972 on May 05, 2009, 07:00:51 pm
make the jump button second because that was really annoying me in zoith because i never could jump diagonally without trying like 3 times and by then i was dead
other than that, zoith was great

youre game looks better though, but not as good as metroid pi, which was like metroid pure + zoith + magnificence
Title: Re: Side Project #2: DUNGEON
Post by: trevmeister66 on May 05, 2009, 11:07:57 pm
make the jump button second because that was really annoying me in zoith because i never could jump diagonally without trying like 3 times and by then i was dead
other than that, zoith was great

youre game looks better though, but not as good as metroid pi, which was like metroid pure + zoith + magnificence
Heh yeah I know it's not anywhere near as good as Metroid Pi. HF is a genius at Basic.
Title: Re: Side Project #2: DUNGEON
Post by: DJ Omnimaga on May 05, 2009, 11:54:45 pm
wow so great looking and fast
Title: Re: Side Project #2: DUNGEON
Post by: simplethinker on May 07, 2009, 05:13:14 pm
Lookin good trev ;)
Title: Re: Side Project #2: DUNGEON
Post by: Eeems on May 07, 2009, 05:30:57 pm
What calc are you using to play it, because it seems to be loading the screens quite quickly compared to the best I can do with a TI-83+
Title: Re: Side Project #2: DUNGEON
Post by: trevmeister66 on May 07, 2009, 06:05:19 pm
Its an 84+SE ROM
Title: Re: Side Project #2: DUNGEON
Post by: Eeems on May 07, 2009, 06:07:45 pm
ah that's why, what code are you using to display the map? I've been playing around with dual-layer sprite maps but I can't get them to load quickly.
Title: Re: Side Project #2: DUNGEON
Post by: trevmeister66 on May 07, 2009, 06:13:22 pm
Hmm hold on a sec, I'll post the code.

Code: [Select]
2->A
Repeat A=10
Text(-1,8A-16,0,sub(Str1,14A-12,12
StorePic 1
Text(-1,8A-16,0,sub(Str2,14A-12,12
RecallPic 1
A+1->A
End

I have A set to 2 instead of 1 because I have a blank border around my map, which makes it MUCH easier/faster to do movement between screens, so I have to start at the 2nd "row" of the string instead of the first.
Title: Re: Side Project #2: DUNGEON
Post by: Eeems on May 07, 2009, 06:36:32 pm
so you use a string as a map, hmm, this is what I did, it's kind of slow
Code: [Select]
:ClrDraw
:For(A,0,60,7)
:For(B,0,94,5)
:If [B](A/7+1,B/5+1
:Then
:Text(-1,A,B,"O
:StorePic 2
:Text(-1,A,B,"X
:RecallPic 2
:End
:End
:End
Title: Re: Side Project #2: DUNGEON
Post by: trevmeister66 on May 07, 2009, 07:16:10 pm
Yeah using a matrix is WAY slower than strings, although It's a little easier to do hit detection (although still slower). I just have each "room" stored in a part of a program and just call that program and run the drawing routine.
Title: Re: Side Project #2: DUNGEON
Post by: DJ Omnimaga on May 07, 2009, 09:29:03 pm
I always found collision detection to be slower with strings than matrices, because with matrices all you got to do is put every solid tiles at the top or bottom, event tiles in the middle and then you only have to check if the tile number is below or above a certain number or between a certain number and another. With strings you need to check for every possible characters you can walk on so the more non-solid tiles you got, the slower your walking engine will be. This is the reason why in Illusiat 13 there are only two possible tiles you can walk on
Title: Re: Side Project #2: DUNGEON
Post by: trevmeister66 on May 07, 2009, 09:32:28 pm
I always found collision detection to be slower with strings than matrices, because with matrices all you got to do is put every solid tiles at the top or bottom, event tiles in the middle and then you only have to check if the tile number is below or above a certain number or between a certain number and another. With strings you need to check for every possible characters you can walk on so the more non-solid tiles you got, the slower your walking engine will be. This is the reason why in Illusiat 13 there are only two possible tiles you can walk on
Yeah that's true, but I don't know. Strings are WAY WAY smaller than matrices, especially for what I'm doing, that the slighter delay in hit detection doesn't really bother me.
Title: Re: Side Project #2: DUNGEON
Post by: DJ Omnimaga on May 07, 2009, 10:10:45 pm
true. Had Illusiat used matrices it would alerady hit about 130 KB right now I think
Title: Re: Side Project #2: DUNGEON
Post by: trevmeister66 on May 07, 2009, 10:38:18 pm
true. Had Illusiat used matrices it would alerady hit about 130 KB right now I think
Exactly. Just storing the matrix data in programs is big, let alone having the matrix in RAM when using it.
Title: Re: Side Project #2: DUNGEON
Post by: simplethinker on May 08, 2009, 03:25:25 pm
With strings you need to check for every possible characters you can walk on so the more non-solid tiles you got, the slower your walking engine will be.
Couldn't you just use inString( on a string of all your tiles (which can be easily ordered) and use the resulting number as if you had read it from a matrix?

Yeah that's true, but I don't know. Strings are WAY WAY smaller than matrices, especially for what I'm doing, that the slighter delay in hit detection doesn't really bother me.
It might not be as slight as you think.  I just tested access times (16*8*14=1792 reads) for a screen-sized matrix (8 rows x 16 columns) and string (128 elements), and accessing the string took 75% more time than for the matrix :o (4 trials of each; 15 seconds for the matrix, and 26 seconds for the string).

The biggest problem with matrices is that storing the matrices needs approximately double the memory than that for strings, and they take up about nine times as much RAM.  Plus, at the instant you store the matrix an extra copy is put in Ans, so matrices require 18x more RAM than strings.
Title: Re: Side Project #2: DUNGEON
Post by: Eeems on May 08, 2009, 04:41:24 pm
hmm, interesting stuff, I just played around with your code trevmeister66
and I was able to cut four bytes from it and display the same amount.
Code: [Select]
For(A,2,9)
Text(-1,8A-16,0,sub(Str1,14A-12,12
StorePic 1
Text(-1,8A-16,0,sub(Str2,14A-12,12
RecallPic1
End
I also was testing it out and it loads at about teh same speed, but it might be a little faster, I can't really tell.
EDIT: oh yeah I modified it some more and made it 15*8 and I also made it so it doesn't waste memory by making the maps have extra characters that aren't displayed.
Code: [Select]
For(A,1,8)
Text(-1,8A-8,0,sub(Str1,15A-14,15
StorePic 1
Text(-1,8A-8,0,sub(Str2,15A-14,15
RecallPic 1
End
this also cut's two more bytes. and that excludes the bytes saved on the maps.
EDIT2: ok, I also added a little bit of game play to it, but I'm having some trouble detecting tiles above your character... how did you do detection?
Title: Re: Side Project #2: DUNGEON
Post by: trevmeister66 on May 08, 2009, 07:00:50 pm
hmm, interesting stuff, I just played around with your code trevmeister66
and I was able to cut four bytes from it and display the same amount.
Code: [Select]
For(A,2,9)
Text(-1,8A-16,0,sub(Str1,14A-12,12
StorePic 1
Text(-1,8A-16,0,sub(Str2,14A-12,12
RecallPic1
End
I also was testing it out and it loads at about teh same speed, but it might be a little faster, I can't really tell.
EDIT: oh yeah I modified it some more and made it 15*8 and I also made it so it doesn't waste memory by making the maps have extra characters that aren't displayed.
Code: [Select]
For(A,1,8)
Text(-1,8A-8,0,sub(Str1,15A-14,15
StorePic 1
Text(-1,8A-8,0,sub(Str2,15A-14,15
RecallPic 1
End
this also cut's two more bytes. and that excludes the bytes saved on the maps.
EDIT2: ok, I also added a little bit of game play to it, but I'm having some trouble detecting tiles above your character... how did you do detection?

lol that's why I had it at 2,9 instead of 1,8... I had a border around the entire string, which made it ALOT easier to check if you left the map.
Title: Re: Side Project #2: DUNGEON
Post by: Eeems on May 08, 2009, 07:14:20 pm
ah, well I could do the boarder thing but still make it so the maps don't need to be very large, but what about detecting a tile above your character? how did you do that?
Title: Re: Side Project #2: DUNGEON
Post by: trevmeister66 on May 09, 2009, 12:15:00 am
Here's my string:

(14 spaces for top border and bottom border)
"              "
" XXXXXXXXXXXX "
" X                  X "
" X                  X "
" X                  X "
" X                  X "
" X                  X "
" X                  X "
" XXXXXXXXXXXX "
"              "

Normally this string would all be one string, but I made it like this to show you how it works. You do all your hit detection and movement like you normally do, but then you just check to see if your character went onto the border, and if it did, then you change screens depending on whichever side you went on (top, bottom, etc..)

Title: Re: Side Project #2: DUNGEON
Post by: DJ Omnimaga on May 09, 2009, 12:31:11 am
@simplethinker, isn't inString( slow, though? I remember testing it and it wasn't too fast from what I remember, compared to what i am doing atm
Title: Re: Side Project #2: DUNGEON
Post by: Eeems on May 09, 2009, 12:43:05 am
I figured it out, and I also figured out how to detect the way it is, I'll post my code in a bit.
Code: [Select]
:For(A,1,8)
:Text(‾1,8A-8,0,sub(Str1,15A-14,15
:StorePic 2
:Text(‾1,8A-8,0,sub(Str2,15A-14,15
:RecallPic 2
:End
:2→B:3→A
:DelVar J
:While 1
:A→C
:B→D
:Text(‾1,8A-8,6B-6,"Ω
:DelVar K
:getKey→K
:If K:Then
:B+(K=26)-(K=24→B
:If B≠D
:Then
:If ""=sub(Str1,15A-14+B-1,1
:D→B
:End
:End
:If ""≠sub(Str1,15(A+1)-14+B-1,1
:Then
:A+1→A
:If J:A-1→A
:Else
:J+L1(1)(K=21→J
:End
:If J:Then
:A-1→A
:J-1→J
:End
:If A≠C or B≠D
:Then
:Text(‾1,8A-8,6B-6,"Ω
:Text(‾1,8C-8,6D-6,"
:End:End
it runs pretty quickly on the 83+. this version also includes spikes and stuff.
Title: Re: Side Project #2: DUNGEON
Post by: simplethinker on May 09, 2009, 12:59:42 am
@simplethinker, isn't inString( slow, though? I remember testing it and it wasn't too fast from what I remember, compared to what i am doing atm
That's a good point.  From my tests inString( is taking 25% more time than using =.
Title: Re: Side Project #2: DUNGEON
Post by: DJ Omnimaga on May 09, 2009, 01:01:15 am
This is why I eventually opted for limited walking area tiles in Illusiat. Not that I really need that much, anyway, though. For event triggers tiles, I can simply make an animation of the character walking on the tile if it's a switch, anyway
Title: Re: Side Project #2: DUNGEON
Post by: Eeems on May 09, 2009, 01:01:26 am
unless of course you are trying for a very large string right?
Title: Re: Side Project #2: DUNGEON
Post by: DJ Omnimaga on May 09, 2009, 01:04:45 am
This doesn't matter. I only have two walk-on-able character to check in Illusiat (" " and "=", the latet being stairs) and when I hit a wall it's only when the event tiles are checked for, to speed up walking around
Title: Re: Side Project #2: DUNGEON
Post by: trevmeister66 on May 09, 2009, 01:01:08 pm
I use inString( for what I'm doing, and it's decently fast, and if you had a lot of tiles that could be walked on, then it would be even more efficient, although I guess it's not really efficient when you only have 1 tile you can walk on...hmm I might need to change my code now.
Title: Re: Side Project #2: DUNGEON
Post by: Eeems on May 09, 2009, 01:55:35 pm
I don't use Instring( yet because I am only testing for one right now, but I may add more ones later.
(http://i692.photobucket.com/albums/vv286/Eeems_Nate/Platform1.gif)
I wonder which one of ours is faster right now? (I'm using a TI-83+ ROM)
oh yeah, those "..." tiles are monkey bars which my character is climbing across
Title: Re: Side Project #2: DUNGEON
Post by: trevmeister66 on May 09, 2009, 02:08:50 pm
yours is probably faster now because I have a bunch of other stuff going on at the same time (well not a 'bunch', but you know what I mean).

Heh seeing your ss makes me want to finish this...time to get back to map designing..bleh
Title: Re: Side Project #2: DUNGEON
Post by: trevmeister66 on May 09, 2009, 02:10:59 pm
I figured it out, and I also figured out how to detect the way it is, I'll post my code in a bit.
Code: [Select]
:For(A,1,8)
:Text(‾1,8A-8,0,sub(Str1,15A-14,15
:StorePic 2
:Text(‾1,8A-8,0,sub(Str2,15A-14,15
:RecallPic 2
:End
:2→B:3→A
:DelVar J
:While 1
:A→C
:B→D
:Text(‾1,8A-8,6B-6,"Ω
:DelVar K
:getKey→K
:If K:Then
:B+(K=26)-(K=24→B
:If B≠D
:Then
:If ""=sub(Str1,15A-14+B-1,1
:D→B
:End
:End
:If ""≠sub(Str1,15(A+1)-14+B-1,1
:Then
:A+1→A
:If J:A-1→A
:Else
:J+L1(1)(K=21→J
:End
:If J:Then
:A-1→A
:J-1→J
:End
:If A≠C or B≠D
:Then
:Text(‾1,8A-8,6B-6,"Ω
:Text(‾1,8C-8,6D-6,"
:End:End
it runs pretty quickly on the 83+. this version also includes spikes and stuff.
whoa just saw this. I'll post my code for you in a sec.

Code: [Select]
While Q>0 // Q=Health

G-(G>0->G  // This is my 'if you jumped' variable
H+not(G->H  // This is my gravity variable.

If E=1 // If there's an enemy in the room
Then
prgmZ4
End

If not(G) and not(fPart(H/2)) and not(inString(Str0,sub(Str2,T+14,1  // more gravity stuff
Then
Text(-1,8D-16,6C-12,"
T+14->T // Location in string
D+1->D // Player (Y) variable
If D>9 // If you go below the map
Then
M+1->M
2->D
14+C->T
prgmZ1
End
Text(->1,8D-16,6C-12,"Ê
End

getKey->K

If K=25 // if you jump
Then
If (inString(Str0,sub(Str2,T+14,1 // makes sure you're on a tile and not in the air
Then
4+2(1=L(1->G // Sets your jump to '4' or '6'
End
End

If G>0 and not(fPart(G/2)) and not(inString(Str0,sub(Str2,T-14,1 // if your 'jump' is still activated and nothing is above you
Then
Text(-1,8D-16,6C-12,"
D-1->D
T-14->T
If D<2  // if you went above the map
Then
9->D
M-1->M
14D-14+C->T
prgmZ1
End
Text(-1,8D-16,6C-12,"Ê
End

If (D=I and C=J) or sub(Str2,T,1)!=" " // if you hit an enemy or walked onto something
Then
prgmZ3
End

If (K=24 or K=26) and not(inString(Str0,sub(Str2,T-(K=24)+(K=26),1 // if left or right was pressed AND nothing is in the way
Then
Text(-1,8D-16,6C-12,"
C-(K=24)+(K=26->C
T-(K=24)+(K=26->T
If C<2 or C>13 // If you went outside the map
Then
L+(C>13)-(C<2->L
13(C<2)+2(C>13->C
14D-14+CüT
prgmZ1
End
Text(-1,8D-16,6C-12,"Ê
If (D=I and C=J) or sub(Str2,T,1)!=" "
Then
prgmZ3
End
End

If max(K={24,25,26  // Just here to fix a bug that I had found, you don't need to worry about it
Then
If "x"=sub(Str2,T-(K=26)+(K=24)+14(K=25),1
Then
Text(ú1,8(D+(K=25))-16,6(C+(K=24)-(K=26))-12,"!
StorePic 1
Text(ú1,8(D+(K=25))-16,6(C+(K=24)-(K=26))-12,"x
RecallPic 1
End
End

End
The 'not(fPart(H/2' and 'not(fPart(G/2' are both put in to slow down the game.. essentially they're only run when those variables are even, which happens every OTHER time the loop is run.
Title: Re: Side Project #2: DUNGEON
Post by: Eeems on May 09, 2009, 02:33:38 pm
thanks, I'll take a look, and maybe I'll find some optimizations :P
I haven't added in moving enemies, but I still haven't optimized my code, so mine is slower then it could be.
Title: Re: Side Project #2: DUNGEON
Post by: trevmeister66 on May 09, 2009, 02:35:06 pm
yeah I saw a bunch of things you could make faster. I have one question about your code though, why are you using C and D as well as A and B for your characters location?
Title: Re: Side Project #2: DUNGEON
Post by: Eeems on May 09, 2009, 03:22:56 pm
A and B are the current location, C and D are the ones I'm using for saving my location in case I need to revert it back
Title: Re: Side Project #2: DUNGEON
Post by: trevmeister66 on May 09, 2009, 03:28:27 pm
Why not just keep C and D as your location, since you use A for displaying the map? Would save quite a few bytes.
Title: Re: Side Project #2: DUNGEON
Post by: Eeems on May 09, 2009, 03:53:22 pm
because I need to be able to revert back a few times, read this:
Code: [Select]
:For(A,2,9) ;
:Text(‾1,8A-2(8),0,sub(Str1,15A-(14+15),15 ;this is my
:StorePic 2 ;dual text
:Text(‾1,8A-2(8),0,sub(Str2,15A-(14+15),15 ;sprite engine
:RecallPic 2 ;
:End
:L1(4→B:L1(5→A ;store initial starting point
:DelVar J ;delete jump variable
:Text(‾1,8,90,L1(2 ;display health
:While A≠1 and A≠10 and B≠1 and B≠15 and L1(2 ;check to make sure that you have health and are not on edge of map
:A→C ;store Y
:B→D ;store x
:Text(‾1,8A-8,6B-6,"Ω ;display character
:If L1(3 ;if you are on a spike
:Then
:2→L1(3
:Text(‾1,8A-8,6B-6,"* ;replace spike sprite
:End
:DelVar K ;I have no idea why I put it here...I'll get rid of it
:getKey→K ;store key press
:If K:Then ;if keypress
:B+(K=26)-(K=24→B ;movement
:If B≠D ;tests to see if you moved
:Then
:If ""=sub(Str1,15A-14+B-1,1 ;tests to make sure you are moving onto a blank spot
:D→B ;if not, revert x
:End
:End
:If ""≠sub(Str1,15(A+1)-14+B-1,1 ;if you are not above a tile
:Then
:A+1→A ;gravity happens
:If J:A-1→A ;unless you are jumping
:Else
:J+L1(1)(K=21→J
:End
:If J:Then ;if you are jumping
:If ""≠sub(Str1,15(A-1)-14+B-1,1 ;test to make sure there is a blank above you
:Then
:A-1→A ;if not, you stay still
:End
:J-1→J ;minus one to jump time
:End
:If A≠C or B≠D ;if you have moved
:Then
:Text(‾1,8A-8,6B-6,"Ω ;move character
:Text(‾1,8C-8,6D-6," ;clear last spot you were on
:If 2=L1(3 ;if you were on a spike
:Then
:Text(‾1,8C-8,6D-6,"* ;reset spike sprite
:0→L1(3 ;clear spike flag
:End
:End
:If Instring("Δ*~",sub(Str1,15A-14+B-1,1 ;If you are on something that does something to you
:then
:If "Δ"=sub(Str1,15A-14+B-1,1 ;if on a health pack
:Then
:L1(2)+3→L1(2 ;add health!
:If 9<L1(2 ;but keep it below 10
:9→L1(2
:sub(Str1,15A-14+B,length(Str1)-15A-14+B→Str3 ;get rid of health from map
:sub(Str1,1,15A-14+B-2→Str1 ;still get rid of it
:Str1+" "+Str3→Str1 ;piece together map
:Text(‾1,8,90,L1(2
:Pause "HEALTH +3 ;tell the player what happened
:End
:If "~"=sub(Str1,15A-14+B-1,1 ;this is actually a small 0, but there is no equvalent on computers
:Then
:Pause "JUMP BOOST ;tell them that they are one step closer to flying
:sub(Str1,15A-14+B,length(Str1)-15A-14+B→Str3 ;delete boost
:sub(Str1,1,15A-14+B-2→Str1 ;delete I say!
:Str1+" "+Str3→Str1 ;now replace
:L1(1)+1→L1(1 ;actually give them the upgrade
:End
:If "*"=sub(Str1,15A-14+B-1,1 ;if you are on a spike
:Then
:L1(2)-1→L1(2 ;lower health
:Text(‾1,8,90,L1(2 ;update health in corner
:1→L1(3 ;set spike flag
:End
:End
:If "..."=sub(Str1,15(C-1)-14+D-1,1 ;if on monkey bars
:Then
:If A>C ;and gravity is making you fall
:Then
:A-1→A ;don't!
:Text(‾1,8(A+1)-8,6B-6," ;clear the sprite that is falling
:End
:End
:End
:A→L1(4 ;store new y
:B→L1(5 ;store new x
Title: Re: Side Project #2: DUNGEON
Post by: trevmeister66 on May 09, 2009, 05:07:46 pm
Hmm I would recommend not using list's for variables that are going to change a lot. Lists are pretty slow and can really slow down your game. Just use a variable for it.

Title: Re: Side Project #2: DUNGEON
Post by: Eeems on May 09, 2009, 05:16:07 pm
ok, I was going to use the list so that anybody could use this engine, but maybe I'll just load everything into the list afterwords, and from the list before
Title: Re: Side Project #2: DUNGEON
Post by: trevmeister66 on May 09, 2009, 05:19:00 pm
Here's how fast my game is now:
(http://www.freeimagehosting.net/uploads/5ad3aaa914.gif)

Here's how fast it would be if I didn't slow it down:
(http://www.freeimagehosting.net/uploads/5e83d166ec.gif)

It's too fast to be playable if I go without making it slower
Title: Re: Side Project #2: DUNGEON
Post by: Eeems on May 09, 2009, 05:28:17 pm
of course that's on the TI-84+ SE. mines on the TI-83+ and it's just a tad slow, but fast enough to be fun If I made levels and such
Title: Re: Side Project #2: DUNGEON
Post by: trevmeister66 on May 09, 2009, 05:30:25 pm
Hmm can I see all your code so I can run it with my ROM/mess with the code a little to see if I can optimize some things?
Title: Re: Side Project #2: DUNGEON
Post by: Eeems on May 09, 2009, 05:37:11 pm
sure, how 'bout I upload the code and programs
wait for the edit
EDIT: ok, here is the programs so far, in a bit, I'll get you the code for prgmB (it's the game handler)
EDIT2:
Code: [Select]
:ClrDraw:ClrHome
:{2,9,0,2,2→L1
:Lbl 1
:"map data→Str1
:"map data→Str2
:prgmBB
:If not(L1(2
:Then
:ClrHome:ClrDraw:Output(1,4,"YOU HAVE DIED
:Return
:End
:"map data→Str1
:"map data→Str2
:{L1(1),L1(2),0,2,7,2→L1
:prgmBB
:If not(L1(2
:Then
:ClrHome
:Output(1,4,"YOU HAVE DIED
:Return
:End
:If L1(5)=15 and 7=L1(4
:Then
:ClrHome
:Output(1,4,"YOU HAVE WON
:Return
:End
:{L1(1),L1(2),0,14,7→L1
:Goto 1
Title: Re: Side Project #2: DUNGEON
Post by: trevmeister66 on May 09, 2009, 05:44:13 pm
Hmm that is pretty good. I would just make it so you don't fall down when you're on the monkey bars.

Also, it forces you to go to the next room when you get to the edge instead of when you go passed the edge.. that's the main difference between yours and mine
Title: Re: Side Project #2: DUNGEON
Post by: Eeems on May 09, 2009, 05:47:47 pm
yeah I know, but that's easy to fix, and I was going to get around to fixing the monkeybars
Title: Re: Side Project #2: DUNGEON
Post by: Eeems on May 09, 2009, 08:50:25 pm
well I got them fixed, here it is:
Code: [Select]
:For(A,2,9)
:Text(-1,8A-2(8),0,sub(Str1,15A-(14+15),15
:StorePic 2
:Text(-1,8A-2(8),0,sub(Str2,15A-(14+15),15
:RecallPic 2
:End
:L1(3→B:L1(4→A
:L1(1→G
:L1(2→H
:DelVar M
:DelVar JText(-1,0,90,H
:While A≠0 and A≠10 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
:D→B
:End
:End
:If not(J) and ""≠sub(Str1,15(A+1)-14+B-1,1) and ""≠sub(Str1,15(A-1)-14+B-1,1
:Then
:A+1→A
:Else
:J+G(K=21→J
:End
:If J:Then
:If ""≠sub(Str1,15(A-1)-14+B-1,1
:Then
:A-1→A
:End
:J-1→J
:End
:If (A≠C or B≠D) and B
:Then
:Text(-1,8A-8,6B-6,"Ω
:Text(-1,8C-8,6D-6,"
:If ""=sub(Str1,15C-14+B-1,1
:Text(-1,8C-8,6D-6,"
:If 2=M
:Then
:Text(-1,8C-8,6D-6,"Î
:DelVar M
:End
:End
:If inString("Î*Δ",sub(Str1,15A-14+B-1,1
:Then
: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-14+B-2→Str1
:Str1+" "+Str3→Str1
:Text(-1,0,90,H
:Text(-1,8,90,"+
:3→E
:End
: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→Str1
:Str1+" "+Str3→Str1
:3→G
:End
:If "Î"=sub(Str1,15A-14+B-1,1
:Then
:Text(-1,0,90,H
:H-1→H
:1→M
:End
:End
:End
:If B=16
:Text(-1,8A-8,6B-6,"
:G→L1(1
:H→L1(2
:A→L1(3
:B→L1(4
again ~ is that little square 0
Title: Re: Side Project #2: DUNGEON
Post by: simplethinker on May 09, 2009, 09:05:20 pm
You might be able to get a pretty good speed boost if you hard-code in the Text( commands to draw the map instead of looping over and having to use StorePic/RecallPic so many times.  i.e.
Code: [Select]
:Text(-1,0,0,sub(Str1...
:Text(-1,8,0,sub(Str1...
...
:StorePic 2
:Text(-1,0,0,sub(Str2...
:Text(-1,8,0,sub(Str2...
...
:RecallPic 2
It would add to the program size, but you would be eliminating 16 calculations of 8A-16 and 15A-29; seven StorePics and RecallPics; and the overhead for running a For( loop.  Plus, StorePic and RecallPic are pretty darn slow and StorePic automatically displays the screen so you could be getting some flicker.
Title: Re: Side Project #2: DUNGEON
Post by: trevmeister66 on May 09, 2009, 09:20:37 pm
You might be able to get a pretty good speed boost if you hard-code in the Text( commands to draw the map instead of looping over and having to use StorePic/RecallPic so many times.  i.e.
Code: [Select]
:Text(-1,0,0,sub(Str1...
:Text(-1,8,0,sub(Str1...
...
:StorePic 2
:Text(-1,0,0,sub(Str2...
:Text(-1,8,0,sub(Str2...
...
:RecallPic 2
It would add to the program size, but you would be eliminating 16 calculations of 8A-16 and 15A-29; seven StorePics and RecallPics; and the overhead for running a For( loop.  Plus, StorePic and RecallPic are pretty darn slow and StorePic automatically displays the screen so you could be getting some flicker.
Hmm that's a good idea. I think I'm gonna go with that, or at least try it out
Title: Re: Side Project #2: DUNGEON
Post by: Eeems on May 09, 2009, 09:46:52 pm
the flickers not that bad, but it is a little slow. hmm, I wonder how big it will be. maybe I'll make it so that you can choose which one you want to use, the big one or the slower one
Title: Re: Side Project #2: DUNGEON
Post by: trevmeister66 on May 09, 2009, 09:48:16 pm
the flickers not that bad, but it is a little slow. hmm, I wonder how big it will be. maybe I'll make it so that you can choose which one you want to use, the big one or the slower one
Its actually not that big. It's only about 16 or so lines, and it is faster. I'll post a screenie soon comparing both methods

Title: Re: Side Project #2: DUNGEON
Post by: Eeems on May 09, 2009, 09:52:51 pm
sounds good, I'm going to test it out too
Title: Re: Side Project #2: DUNGEON
Post by: trevmeister66 on May 09, 2009, 09:53:48 pm
Original map engine:
(http://www.freeimagehosting.net/uploads/5ad3aaa914.gif)

New map engine:
(http://www.freeimagehosting.net/uploads/06243011dd.gif)

(there's a syntax error because those rooms haven't been designed yet)

EDIT: WOOT 300th POST!!!
Title: Re: Side Project #2: DUNGEON
Post by: noahbaby94 on May 09, 2009, 09:54:54 pm
Nice looking.
Title: Re: Side Project #2: DUNGEON
Post by: Eeems on May 09, 2009, 09:57:14 pm
much faster! hmm, I just noticed that your character slows down a lot when he is in the air...
Title: Re: Side Project #2: DUNGEON
Post by: simplethinker on May 09, 2009, 09:59:31 pm
Its actually not that big. It's only about 16 or so lines, and it is faster. I'll post a screenie soon comparing both methods
How big is the new code?  I just calculated it and it looks like ~336 bytes.  If that's too large, you could use two loops.  One to loop through the first layer, and the other to loop through the second layer.  This would still cut out the extra seven StorePics and RecallPics and be much smaller.
Title: Re: Side Project #2: DUNGEON
Post by: Eeems on May 09, 2009, 10:01:24 pm
you could just use two store and recall pics
Title: Re: Side Project #2: DUNGEON
Post by: trevmeister66 on May 09, 2009, 10:07:35 pm
much faster! hmm, I just noticed that your character slows down a lot when he is in the air...
That's because my comp makes Wabbitemu run slow sometimes, and it just appears that way. It's still the same speed as it's always been for moving.
Its actually not that big. It's only about 16 or so lines, and it is faster. I'll post a screenie soon comparing both methods
How big is the new code?  I just calculated it and it looks like ~336 bytes.  If that's too large, you could use two loops.  One to loop through the first layer, and the other to loop through the second layer.  This would still cut out the extra seven StorePics and RecallPics and be much smaller.
I just tried the For( loop, and it was a tad slower, and since size isn't a problem for me (I store all my map data, which is split in half, in the archive and use Iambians XCOPY to copy whichever half im in into RAM), I'm gonna stick with the hard coded idea.
Title: Re: Side Project #2: DUNGEON
Post by: Eeems on May 09, 2009, 10:10:19 pm
I'm going to test it yet, but I don't know
Title: Re: Side Project #2: DUNGEON
Post by: trevmeister66 on May 09, 2009, 10:14:50 pm
The For( loop is slower because you have to calculate an equation (8A-8 or whatever) every time through, whereas when it's hard coded, the numbers are preset, so it just doesn't do any work except display the text. It's not much slower, but I could tell it was.
Title: Re: Side Project #2: DUNGEON
Post by: Eeems on May 09, 2009, 10:17:11 pm
so far it seems faster
Title: Re: Side Project #2: DUNGEON
Post by: simplethinker on May 09, 2009, 10:19:03 pm
The For( loop is slower because you have to calculate an equation (8A-8 or whatever) every time through,
You're neglecting the overhead of running the For( loop itself:  it has to increment the index variable and the interpreter is searching for an End statement as well.

[edit] This topic is growing pretty fast.  Every time I look there's like two or more posts.
Title: Re: Side Project #2: DUNGEON
Post by: Eeems on May 09, 2009, 10:26:32 pm
lol, I think the For( loop looks a bit more aesthetically appealing. then the way I did, and it's not that much faster
Title: Re: Side Project #2: DUNGEON
Post by: trevmeister66 on May 09, 2009, 10:35:52 pm
The For( loop is slower because you have to calculate an equation (8A-8 or whatever) every time through,
You're neglecting the overhead of running the For( loop itself:  it has to increment the index variable and the interpreter is searching for an End statement as well.

[edit] This topic is growing pretty fast.  Every time I look there's like two or more posts.
Heh yeah it is a pretty hot topic right now.

lol, I think the For( loop looks a bit more aesthetically appealing. then the way I did, and it's not that much faster
are you going to make this little test project you've done into a full blown game?
Title: Re: Side Project #2: DUNGEON
Post by: Eeems on May 09, 2009, 10:39:19 pm
probably, I haven't really made any games. and this one is fun so far...I might just make it into a platform engine though
Title: Re: Side Project #2: DUNGEON
Post by: trevmeister66 on May 09, 2009, 10:49:42 pm
Yeah it is kind of fun making a game like this. Designing the maps is fun but also extremely boring. But if you do make it into a game, I'd like to play it; I've always been interested in these kind of games for the calc, but I never could find many on ticalc.
Title: Re: Side Project #2: DUNGEON
Post by: Eeems on May 09, 2009, 10:50:59 pm
yeah, they don't make that many platformers... I should probably make a map making program so it's easier for me.
Title: Re: Side Project #2: DUNGEON
Post by: trevmeister66 on May 09, 2009, 10:58:32 pm
Yeah that's a good idea, especially if you're going to make it into just an engine, then you could release both together.
Title: Re: Side Project #2: DUNGEON
Post by: Eeems on May 09, 2009, 10:59:12 pm
^^, that was what I was thinking
EDIT: well I'm going to start on that now
Title: Re: Side Project #2: DUNGEON
Post by: trevmeister66 on May 11, 2009, 09:10:28 am
Hmm looks like we lost a bit of posts. oh well.

As for progress, I have 75% of the maps designed, and 50% implemented. I have 3 of the 5 power ups implemented, as well as 2 of the 5 items. Hopefully I can finish designing the maps today or tomorrow and finish adding all of them into the game by the end of the week. Then i'll just have to add in the rest of the power ups and items, and it'll be testing time.
Title: Re: Side Project #2: DUNGEON
Post by: Eeems on May 11, 2009, 10:41:51 am
nice! I can't wait to test it. I have currently added a sword enemies and some magic. the sword will kill enemies, the enemies will move about and damage you (this slows down the game a bunch though) and the magic will suck health from the enemies (cool animation too). I'm in the middle of fixing the sword animation and planning some more items/powerups. I also found a good mapeditor that I'm using. when I get home I'll post the code so anybody who wants to can optimize it for me
Title: Re: Side Project #2: DUNGEON
Post by: trevmeister66 on May 11, 2009, 11:58:45 am
nice! I can't wait to test it. I have currently added a sword enemies and some magic. the sword will kill enemies, the enemies will move about and damage you (this slows down the game a bunch though) and the magic will suck health from the enemies (cool animation too). I'm in the middle of fixing the sword animation and planning some more items/powerups. I also found a good mapeditor that I'm using. when I get home I'll post the code so anybody who wants to can optimize it for me
Nice ideas. I was thinking about adding in weapons that would help kill enemies, but I went against it because I thought it would slow it down too much. Can't wait to see how it works for you though.

Also, I'd be glad to help you optimize.
Title: Re: Side Project #2: DUNGEON
Post by: Eeems on May 11, 2009, 02:54:16 pm
kk, thanks!. the weapons only slow it down if you use them (it plays out the animation while everything pauses) it will call the subroutine if you press the attack button. It looks pretty cool, but I might get rid of the enemies, they really slow down the game.
Title: Re: Side Project #2: DUNGEON
Post by: Eeems on May 11, 2009, 06:14:07 pm
ok, I got home now, let me upload some screenies
the first one shows the sword and the second the sword and the magic (which is epic by the way) this is all running from a TI-83+ ROM on wabbitemu, but it is running faster then the actual calc by about 1/3 ( but keep in mind that is is a 83+ not a 84+ SE so it is still pretty quick)
heheh, this is much funner on an emulator
Title: Re: Side Project #2: DUNGEON
Post by: DJ Omnimaga on May 11, 2009, 06:49:48 pm
mhmm this must be quite amazing to play on SE. I also like the tiles used
Title: Re: Side Project #2: DUNGEON
Post by: Eeems on May 11, 2009, 07:03:08 pm
thanks Omni!
as per request I am posting my code for optimization
Code: [Select]
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,6(B+1)-6,"-
:Text(‾1,8(A-1)-8,6(B+1)-6,"/
:Text(‾1,8A-8,6(B+1)-6,sub(Str1,S+1,1
:StorePic 2
:Text(‾1,8A-8,6(B+1)-6,sub(Str2,S+1,1
:RecallPic 2
:Text(‾1,8(A-1)-8,6B-6,"!
:Text(‾1,8(A-1)-8,6(B+1)-6,sub(Str1,S-14,1
:StorePic 2
:Text(‾1,8(A-1)-8,6(B+1)-6,sub(Str2,S-14,1
:RecallPic 2
:Text(‾1,8(A-1)-8,6(B-1)-6,"
:Text(‾1,8(A-1)-8,6B-6,sub(Str1,S-15,1
:StorePic 2
:Text(‾1,8(A-1)-8,6B-6,sub(Str2,S-15,1
:RecallPic 2
:Text(‾1,8A-8,6(B-1)-6,"-
:Text(‾1,8(A-1)-8,6(B-1)-6,sub(Str1,S-16,1
:StorePic 2
:Text(‾1,8(A-1)-8,6(B-1)-6,sub(Str2,S-16,1
:RecallPic 2
:Text(‾1,8A-8,6(B-1)-6,sub(Str1,15A-16+B,1
:StorePic 2
:Text(‾1,8A-8,6(B-1)-6,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
as before the chars are a little bit wierd, if you want to know exactly which one it is just ask

EDIT: here are the files in case you want to test them out:
Title: Re: Side Project #2: DUNGEON
Post by: DJ Omnimaga on May 11, 2009, 09:34:06 pm
this is actually quite nice and runs quite well on SE. I like how the sword animation was used ^^

I got ERR:DOMAIN when falling in holes, though
Title: Re: Side Project #2: DUNGEON
Post by: Eeems on May 11, 2009, 09:34:52 pm
I know why that happens, I had tried something but forgot to fix it, it will be gone in the next version
Title: Re: Side Project #2: DUNGEON
Post by: trevmeister66 on May 11, 2009, 10:07:48 pm
Hmm I'll take a look at your code and see what I can do to optimize it.

Also, you should think about starting your own topic for this game. That way you can have/edit everything you want to whatever way you want to. Also, that won't get our two projects mixed up ;)
Title: Re: Side Project #2: DUNGEON
Post by: Eeems on May 11, 2009, 11:04:15 pm
kk, I'll do that
Title: Re: Side Project #2: DUNGEON
Post by: DJ Omnimaga on May 11, 2009, 11:31:11 pm
I was wondering at one point if it became a team project or something lol XD
Title: Re: Side Project #2: DUNGEON
Post by: kalan_vod on May 18, 2009, 06:27:42 pm
You can optimize it for size by using a for loop, but it would probably a little slower (still fast)..
Title: Re: Side Project #2: DUNGEON
Post by: Eeems on May 18, 2009, 10:01:42 pm
how would I use a for loop? and I've switched topics to another one
Title: Re: Side Project #2: DUNGEON
Post by: simplethinker on May 19, 2009, 12:50:01 am
how would I use a for loop? and I've switched topics to another one
I believe he meant a For( loop for displaying the ASCII layers (which you previously switched from).
Title: Re: Side Project #2: DUNGEON
Post by: Eeems on May 19, 2009, 11:00:33 am
ah, yes I see. well it's not that much to hard code it, and it increases the speed.
Title: Re: Side Project #2: DUNGEON
Post by: DJ Omnimaga on May 19, 2009, 04:11:00 pm
On a off topic note, do you mind if I add Reverse Snake and Num2str to the staff archives when I get some time?
Title: Re: Side Project #2: DUNGEON
Post by: trevmeister66 on May 19, 2009, 05:28:42 pm
On a off topic note, do you mind if I add Reverse Snake and Num2str to the staff archives when I get some time?
Yeah sure, although the link for Reverse Snake is messed up since they deleted it when i added a new version of it, but i can get you either one and/or both if you want, and Num2Str should be ready.
Title: Re: Side Project #2: DUNGEON
Post by: DJ Omnimaga on May 19, 2009, 05:31:54 pm
Oh ok, you can upload it in a post here and I'll try to add it. I would like screenshots of Reverse Snake, though, if the game is not compatible with emulators. (for utilities, though, I don't add screenshots)
Title: Re: Side Project #2: DUNGEON
Post by: trevmeister66 on May 19, 2009, 05:35:12 pm
Oh ok, you can upload it in a post here and I'll try to add it. I would like screenshots of Reverse Snake, though, if the game is not compatible with emulators. (for utilities, though, I don't add screenshots)
Yeah I put in Screen Shots with the game when I uploaded it, but they didn't add it :/ I'll get it up soon
Title: Re: Side Project #2: DUNGEON
Post by: trevmeister66 on May 19, 2009, 05:53:36 pm
Here's Num2Str and Reverse Snake v1.5:

Here's a link for the screenie, and I uploaded the screenie as well (didn't know which way you wanted it).

http://i40.tinypic.com/1gm5l.jpg
Title: Re: Side Project #2: DUNGEON
Post by: Galandros on May 26, 2009, 04:43:53 pm
replying about optimization ask...

B≠0 could be B?

instead of:
:For(θ,1,10):End
it is smaller
rand(X
where X is a number...

Or better:

: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

I would try to do something like:
:For(θ,10,40
:Text(‾1,8T-8,6B-6,sub("Ooo∙",int(θ/10),1
:End

This applies to other places I think (supposing place of draw is the same...)

Use math rules man:
6(B+1)-6=6B+6-6=6B
it appears in different parts and different ways. Other:
15(A-1)-15+B=15A-15-15+B=15A-30+B
Search...

""=string. I am not sure but could crash some "old" models (Ti-83 or even TI-83+ first OS versions)?

length(Str1) is used often... Why not store a number variable and use it from there? Or have you already used all variables?

In UTI, there are some programmers that could dissect better your code ;)

Cool side projects. Even I am doing some TI-BASIC games for my surprise. One small game on the go and other after that.
I will need to practise all that String stuff :P
Title: Re: Side Project #2: DUNGEON
Post by: Eeems on May 26, 2009, 06:46:32 pm
that's kind of old and I would get disqualified if I posted code to get looked at....thanks though, I'm resisting the urge to look at the optimizations well I also started a new topic if you want to take a look at this, and I know that UTI would be great, I've seen weergoose's (sp?) optimizations, they are crazy
Title: Re: Side Project #2: DUNGEON
Post by: Galandros on May 27, 2009, 08:52:45 am
that's kind of old and I would get disqualified if I posted code to get looked at....thanks though, I'm resisting the urge to look at the optimizations well I also started a new topic if you want to take a look at this, and I know that UTI would be great, I've seen weergoose's (sp?) optimizations, they are crazy
New topic? Where? Searching...

I am getting used to weregoose's skills. They are great but with some imagination and some knowledge of math and others, you will evently start doing some cool tricks. ;)
But optimizing old code is quite fun (or not when you are blinded by it...)
Title: Re: Side Project #2: DUNGEON
Post by: Eeems on May 27, 2009, 11:26:45 am
the new topic is here (http://ourl.ca/3345)
but yeah I get what you mean by that
Title: Re: Side Project #2: DUNGEON
Post by: trevmeister66 on March 05, 2010, 04:02:20 pm
Not trying to necro post or antyhing (heh), but I'm re-staring this project. I still have all the code and what not associated with this, but the only thing is, I don't have the hard copy paper maps that I had made when I was working on this project, so I will have to go through all my map code again and re-draw my maps.

This was going to be my contest entry oh so long ago, but now I just want to finish it. (will post screenies soon of current progress)
Title: Re: Side Project #2: DUNGEON
Post by: DJ Omnimaga on March 05, 2010, 04:09:20 pm
glad you're starting working on this again :)
Title: Re: Side Project #2: DUNGEON
Post by: ztrumpet on March 05, 2010, 04:14:43 pm
Awesome!  I can't wait to see progress! :)
Title: Re: Side Project #2: DUNGEON
Post by: Eeems on March 05, 2010, 04:45:54 pm
YAY! can't wait for more progress!
Title: Re: Side Project #2: DUNGEON
Post by: trevmeister66 on March 12, 2010, 06:34:49 pm
Well I found my hard copy notes and map data, so it'll be much easier to make some progress now that I have all of that. Now to just finish making the map.
Title: Re: Side Project #2: DUNGEON
Post by: DJ Omnimaga on March 12, 2010, 06:46:33 pm
Cool :)