Omnimaga

Calculator Community => Other Calc-Related Projects and Ideas => TI 68K => Topic started by: bfr on June 15, 2006, 11:46:00 am

Title: InSaNiTy!
Post by: bfr on June 15, 2006, 11:46:00 am
Well, I posted almost all of my calculator projects here; I might as well post this one.  

Insanity is a game where grayscale objects of different sizes come towards you from the right side of the screen, and you must dodge them, or else you get pushed back.  If you get pushed off the screen, then you lose.  It isn't exactly going so well, as you can tell by the following screenshot:

user posted image

Well, I guess it's going OK.....

(don't worry, I'll add a title)

It's in C and it's for 68k calcs (how many people have a 68k calc here besides me...1?  2?).  This uses ExtGraph, a C library by the http://tict.ticalc.org/.  This isn't the kind of library where you download the library and the main program.  This library is included within Insanity as a C header (.h) and archive (.a) file.  When I finish this, I want to release Insanity ReMiX, which is like Insanity, except with a few twists that I'll have to think up (I already have one idea...).
Title: InSaNiTy!
Post by: DJ Omnimaga on June 15, 2006, 12:50:00 pm
hmm interesting, will the object move like in Dodge for the TI-86? (it was featured in a POTY i think)
Title: InSaNiTy!
Post by: bfr on June 15, 2006, 12:52:00 pm
I have a TI-86 but I'm not sure if I ever downloaded Dodge....

It moves straight across from the right side of the screen to the left side of the screen.  But that give me an idea, I could have the objects moving in squiggles and stuff from right to left in Insanity ReMiX.
Title: InSaNiTy!
Post by: g28401 on June 15, 2006, 01:30:00 pm
hehe, looks good...
Title: InSaNiTy!
Post by: DJ Omnimaga on June 15, 2006, 01:33:00 pm
aaah cool, this is dodge btw

user posted image
http://www.ticalc.org/archives/files/fileinfo/89/8989.html
Title: InSaNiTy!
Post by: bfr on June 15, 2006, 01:36:00 pm
Wow, that looks awesome.  No, it won't be like dodge.  It's more similar to a fall-down that goes from right to left.
Title: InSaNiTy!
Post by: DJ Omnimaga on June 15, 2006, 01:37:00 pm
aaaah cool

(off-topic) anyone know there is a fall up game?
Title: InSaNiTy!
Post by: katmaster on June 15, 2006, 04:59:00 pm
Yeah it's coolz. Pretty much fall down with reverse gravity... but still cool.
Title: InSaNiTy!
Post by: bfr on September 23, 2006, 06:11:00 am
It's been quite a while since the last time I posted here o.oblink.gif

I've decided to port this to the TI-83+ in assembly; most of you are TI-83+ users anyway.  The TI-83+ version will be slightly reduced version of the 68k C version, although it should still be fun, and it will depend on Ion.  MirageOS can run Ion programs, right (I don't know that much about the TI-83+ series - I just got my TI-84+ Silver Edition about a month ago)?

I also made some progress on the 68k C version, and the things that the guy is supposed to dodge actually are displayed now  :Ptongue.gif .  The problem now is erasing them now  :Dbiggrin.gif (They always get erased except when they are first displayed).
Title: InSaNiTy!
Post by: DJ Omnimaga on September 23, 2006, 04:02:00 pm
cool to hear, yes mirage can run Ion programs
Title: InSaNiTy!
Post by: bfr on November 23, 2006, 05:46:00 am
Here's a screenshot of Insanity for the TI-83+:

user posted image

I kind of changed the way the TI-83+ version works.  Right now, the user must go to the weird objects flying towards them instead of dodging them.  It's pretty much finished, except it's buggy, it's running abnormally slow (I want it to be an insanely fast-paced game ;)wink.gif ) and I need to implement multiple speeds.

EDIT:  Insanity TI-83+ 1.0 Alpha 1:  http://www.box.net/public/ke9t6gjknc

Also, this is an alpha version, so it might crash your calculator or something. It shouldn't though, but just in case, I would archive/backup any important programs you have.
Title: InSaNiTy!
Post by: DJ Omnimaga on November 23, 2006, 02:03:00 pm
wow sound nice, but it seems to glitch a bit, or is it Opera browser fault? I mean sprites leave stuff behind them when they move o.oblink.gif

sound nice tho, and btw Ion programs work on Mirage, Crunchy and DoorCS
Title: InSaNiTy!
Post by: bfr on November 23, 2006, 03:09:00 pm
No, that's part of the insanity in the program :lol:bounce2.gif .  I could remove it, but it would require a little bit of work and would slow the program down and increase its size.  If you and a few more people think that it's horrible this way, then I can change it, but it's not going to be one of my priorities.
Title: InSaNiTy!
Post by: DJ Omnimaga on November 23, 2006, 03:33:00 pm
aaah i see now x.x
Title: InSaNiTy!
Post by: bfr on April 05, 2007, 12:57:00 pm
*Revived*

I decided to work on it some more today.  I changed it slightly to make it faster, but it took away some of its uniqueness - instead of losing when the character is pushed off the screen, you lose when the character merely doesn't get to the flying block in time.  It works, except adjusting the speed in the menu doesn't actually change the speed.  Once I optimize this, a lot, then I might add back some more feaetures and add support for multiple speeds.  Download it here:  http://bfr.tifreakware.net/INSAN%2-%20TI-83%20Plus%20(Ion).8xp
Title: InSaNiTy!
Post by: Insanity on April 05, 2007, 01:27:00 pm
Ooh, I will try this just because of the coincidence of names. ^_^
Title: InSaNiTy!
Post by: Insanity on April 05, 2007, 01:32:00 pm
Bump!
I tried it.  Bugs galore.
Title: InSaNiTy!
Post by: bfr on April 05, 2007, 02:25:00 pm
Oh, and this version, note that you have to go to the blocks, not dodge them.  :Dbiggrin.gif

Also, do you think it is too slow?
Title: InSaNiTy!
Post by: Liazon on April 06, 2007, 05:56:00 am
unless anybody objects to the artifacts on the screen (i mean the stuff left behind from the sprites), I might suggest a fastcopy that clears the buffer at the same time?

c1-->
CODE
ec1;--- Copy the gbuf to the screen and clear graph buffer (fast)
;Input: nothing
;Output:graph buffer is copied to the screen and subsequently cleared
fastCopy:
 di
 ld a,$80
 out ($10),a
 ld hl,gbuf-12-(-54125+(12*64)+1)
 ld a,$20
 ld c,a
 inc hl
 dec hl
fastCopyAgain:
 ld b,64
 inc c
 ld de,-(12*64)+1
 out ($10),a
 add hl,de
 ld de,11
fastCopyLoop:
 add hl,de
 inc hl
 inc de
 ld a,(hl)
 ld (hl),0
Title: InSaNiTy!
Post by: bfr on April 06, 2007, 10:15:00 am
Excellent idea, Liazon!  Before I was using a separate routine to clear the screen, but I only did it every time a block reached the edge to make it faster, but now the screen gets to be cleared constantly to get rid of the junk left over when sprites move, AND it is faster (because I don't have to call the separate routine).  :)smile.gif

EDIT:  Liazon, are you sure that routine works?  The assembler won't assemble the "gbuf-12-(-54125+(12*64)+1)" part, but it does when I replace gbuf with plotsscreen.  But, when I do that, it seems to clear the buffer and then copy the cleared data to the screen.  o.oblink.gif  Which seems pretty pointless.  Any ideas?  I'm using Brass with Latenite, in case that helps.
Title: InSaNiTy!
Post by: Liazon on April 09, 2007, 09:50:00 am
Should be right since I did just copy it from the wikiti article on fastcopy.

the concept is pretty simple.  replace a inc hl for ld (hl),0 so that you can load 0 into the buffer area you're readinf from AFTER you've loaded it into a and before outing it.  Since you have 1 less inc hl and the row has 12 bytes, you need to ld de,11 so you can add 11 + inc hl = +12 within the loop.

maybe you can post more of your code and we can help out?
Title: InSaNiTy!
Post by: Netham45 on April 10, 2007, 02:33:00 am
Just to answer your question, I have an 89. :)smile.gif
Title: InSaNiTy!
Post by: Halifax on April 10, 2007, 10:18:00 am
Ok just so you know the routine Liazon posted does work no doubt about it. Possibly you are not writing to plotsscreen. So bfr go find your equate for plotsscreen and tell me what it is and then tell me the value of the buffer that you are writing to. All your routine should be writing to $9340 if you want to update plotsscreen.

Just to show proof that the routine works I have written a little sample. It writes 64 bytes to plotsscreen and then calls the routine that Liazon posted. Then it calls a getkey and after a key is pressed it calls ionfastcopy which updates plotsscreen showing that it is blank.

user posted image