Omnimaga

Calculator Community => Other Calc-Related Projects and Ideas => TI 68K => Topic started by: Halifax on February 16, 2007, 08:27:00 pm

Title: Galactic 68K
Post by: Halifax on February 16, 2007, 08:27:00 pm
All things happening with Galactic 68K will be in here.
Title: Galactic 68K
Post by: bfr on February 17, 2007, 09:15:00 am
Wow, I didn't even notice this thread before.

Anyway, Galactic 68K alpha 1 is released.  Here is the download link:  http://bfr.tifreakware.net/galactic.zip

There are five bug-free (from what I've tested) levels so far.  More levels, including a final boss, need to be finished, and I'll probably add more backgrounds and sprites, but note that sophisicated backgrounds make the game slower.  As the levels go on, the AI will become more intelligent. (...in case it doesn't look that intelligent now.  It actually isn't too bad, but at the moment, it doesn't try to dodge bullets.  That will come in later levels.)

I don't have a readme yet, so here are the controls:

2ND = shoot, arrow keys=move (pretty typical)

In some menus and things, when the program is waiting for a key press, 2ND won't work (this is often due to using ngetchx() which doesn't support the 2ND key alone), so you should just press ENTER (or another key).

EDIT:  There are now eight levels, except I haven't released this new version yet
Title: Galactic 68K
Post by: trevmeister66 on February 17, 2007, 03:06:00 pm
i don't have my 89 calc with me right now, so:
Does it only take one hit to kill the enemy or does it have health?
Title: Galactic 68K
Post by: bfr on February 17, 2007, 04:54:00 pm
No. Enemies have different amount of lives, depending on the level - typically two or three lives.  
Title: Galactic 68K
Post by: bfr on February 17, 2007, 05:50:00 pm
Here is Galactic 68K 1.0:

http://bfr.tifreakware.net/galactic.zip

This contains ten action-packed levels fightings against increasingly difficult AI ships, with a shop that appears every so often, and a final eleventh level containing a powerful boss.  Enjoy!

Title: Galactic 68K
Post by: trevmeister66 on February 17, 2007, 06:46:00 pm
grr, i wish i had my calc  :grr:mad.gif
Title: Galactic 68K
Post by: bfr on February 18, 2007, 05:10:00 am
 :police:police.gif

Well, it's actually good that you didn't have your calculator at that moment.  After playing it excessively, I eventually realized that it sucked up a bunch of my calculator's memory - I allocated a whole bunch of memory (four times the size of the TI-89's 160x100 LCD), and only freed half of it.  I'll try to get a new version up soon.  
Title: Galactic 68K
Post by: trevmeister66 on February 18, 2007, 06:03:00 am
o, i see. Hope you get it fixed soon (i get my calc back tomorrow :)smile.gif)
Title: Galactic 68K
Post by: bfr on February 18, 2007, 04:43:00 pm
I fixed it.  :)smile.gif

I would have finished it earlier today, but I had to go to my sister's swim meet and then to my cousin's house.  

It can still be downloaded at http://bfr.tifreakware.net/galactic.zip

Enjoy!  :)smile.gif
Title: Galactic 68K
Post by: graywolf on February 18, 2007, 06:04:00 pm
Time to send this to my friend who will send this to me at school... I can't wait to try it! :)smile.gif
Title: Galactic 68K
Post by: lachprog on February 19, 2007, 07:41:00 am
Hi, i tried your game and it looks cool  :)smile.gif

QUOTE

In some menus and things, when the program is waiting for a key press, 2ND won't work (this is often due to using ngetchx() which doesn't support the 2ND key alone), so you should just press ENTER (or another key).


This can be fixed by using _keytest() or _keytest_optimized() instead of ngetchx() . If you want to do that you also need to redirect a couple of interupt handlers. (I can post some code if you're interested... )
Title: Galactic 68K
Post by: bfr on February 19, 2007, 10:37:00 am
Thanks for the suggestion :)smile.gif, but....

I did exactly what you said for Catch That Ship (and used a while() loop + keytest() thing instead of ngetchx()), but ngetchx() just seemed easier and more efficient.  I think I might change it, though.  

*bfr
Title: Galactic 68K
Post by: lachprog on February 19, 2007, 12:29:00 pm
QUOTE

 when the interrupts are redirected, ngetchx() can't be used...?


The reason  AFAIK:

There are several interrupts set up by the AMS, they are triggered repeatedly in a given time interval. One of those interrupts reads the keyboard and temporarly saves keypresses in memory. This is read by ngetchex(). So with interrupts disabled there will be no keyboard reading in AMS, and therefore routines like ngetchx() and other won't work.

QuoteBegin
-->
QUOTE

Also, in Catch That Ship, I kind of blindly redirected the interrupt handlers because before, I remembered somebody saying I had to for some reason. Just out of curiousity, does anybody (Lachprog) know the details of why this needs to be done?


I guess that too was because of keytest. keytest is using the function called _rowread, that requires that interrupt 1 and 5 is disabled. The reason is that _rowread interferes with some AMS keyboard reading functions using interrupts 1 and 5 (probably ngetchx() and other funcs...)

BTW, you will also get rid of the "BUSY" and "2nd" etc. indicator at the bottom of the screen if you redirect interrupts...


Title: Galactic 68K
Post by: bfr on February 19, 2007, 12:56:00 pm
Is GKeyFlush() one of those functions that uses interrupts 1 and 5?  Because I'm having problems....

Here's how I redirected the interrupts, btw:

(global variables):

INT_HANDLER save_int_1, save_int_5;

(in the _main function):

save_int_1=GetIntVec(AUTO_INT_1);
  save_int_5=GetIntVec(AUTO_INT_5);
  SetIntVec(AUTO_INT_1, DUMMY_HANDLER);
  SetIntVec(AUTO_INT_5, DUMMY_HANDLER);

And here's how I'm setting the interrupts back to the way they were:

SetIntVec(AUTO_INT_1, save_int_1);
SetIntVec(AUTO_INT_5, save_int_5);

EDIT:  Well, I guess I'll just stick with ngetchx() for now because it's not working....

EDIT AGAIN:  Something in the following code is causing the problem:

c1-->
CODE
ec1
if((dp = malloc(LCD_SIZE)) == NULL || (lp = malloc(LCD_SIZE)) == NULL || (lp2 = malloc(LCD_SIZE)) == NULL){
 
Title: Galactic 68K
Post by: Halifax on February 19, 2007, 02:26:00 pm
Happy Birthday BFR!
Title: Galactic 68K
Post by: bfr on February 19, 2007, 02:31:00 pm
o.oblink.gif

I entered in a fake birthday.  :Ptongue.gif

Anyway, to celebrate my fake birthday I guess, I finally get it to work!  

http://bfr.tifreakware.net
Title: Galactic 68K
Post by: Halifax on February 19, 2007, 02:53:00 pm
lol you submitted a fake birthday you fiend
Title: Galactic 68K
Post by: graywolf on February 19, 2007, 03:28:00 pm
I was about to say "Happy Birthday" too, but I guess not! :Ptongue.gif

Did you get the bug fixed?
Title: Galactic 68K
Post by: bfr on February 19, 2007, 03:56:00 pm
Yup.  :)smile.gif
Title: Galactic 68K
Post by: lachprog on February 20, 2007, 05:20:00 am
Your redirecting of interrupts and resetting of them seems ok.

I think the problem is that you initialize grayscale ( GrayOn() ) BEFORE you redirect the interrupts. You should redirect the interrupts first, then call GrayOn();

The reason is that the grayscale routines "attach" itself to interrupt 1 and/or 5, so when you redirect the interrupts AFTER calling GrayOn() you actually redirect the grayscale. (i just did a quick experiment on this in Super Mario 68K, and it crashed the game...)


QUOTE

Is GKeyFlush() one of those functions that uses interrupts 1 and 5?


I'm not exactly sure, i've never used any of those funcs actually, but i believe so... The tigcc doc says that it uses a keyboard queue, so i'm pretty sure it does...
Also, i just saw in the documentation that it might interfere with grayscale  :(sad.gif  ( by calling GKeyIn(), which calls idle(), which might interfere with grayscale )

BTW, GKeyFlush() shouldn't be neccessarry if you use keytest only...


Hope this is useful for you  :)smile.gif
Ant BTW, happy birthday, bfr!


I'm just curious, but what are you using lp2 for?


EDIT: By some reason my browser didn't show any of the posts from 19 Feb, 2007, 20:31 yesterday until now. Didn't know you had fixed the bug already...




Title: Galactic 68K
Post by: Liazon on February 20, 2007, 05:55:00 am
o.oblink.gif it's bfr's b-day! Happy B-day man!

*Liazon
Title: Galactic 68K
Post by: bfr on February 20, 2007, 11:53:00 am
QuoteBegin-Lachprog+20 Feb, 2007, 10:2-->
QUOTE (Lachprog @ 20 Feb, 2007, 10:20)
Your redirecting of interrupts and resetting of them seems ok.

I think the problem is that you initialize grayscale ( GrayOn() ) BEFORE you redirect the interrupts. You should redirect the interrupts first, then call GrayOn();

The reason is that the grayscale routines "attach" itself to interrupt 1 and/or 5, so when you redirect the interrupts AFTER calling GrayOn() you actually redirect the grayscale. (i just did a quick experiment on this in Super Mario 68K, and it crashed the game...)


QUOTE

Is GKeyFlush() one of those functions that uses interrupts 1 and 5?


I'm not exactly sure, i've never used any of those funcs actually, but i believe so... The tigcc doc says that it uses a keyboard queue, so i'm pretty sure it does...
Also, i just saw in the documentation that it might interfere with grayscale  :(sad.gif  ( by calling GKeyIn(), which calls idle(), which might interfere with grayscale )

BTW, GKeyFlush() shouldn't be neccessarry if you use keytest only...


Hope this is useful for you  :)smile.gif
Ant BTW, happy birthday, bfr!


I'm just curious, but what are you using lp2 for?


EDIT: By some reason my browser didn't show any of the posts from 19 Feb, 2007, 20:31 yesterday until now. Didn't know you had fixed the bug already...

Thanks, that was the problem - well, kind of (but Kevin Kofler already helped me solve it anyway).  I was already initializing grayscale before redirecting the interrupts, but Kevin Kofler told me yesterday that it is supposed to be the other way around; the interrupts are supposed to be redirected before grayscale is initialized, which seems odd, but it worked.  

And yeah, GKeyFlush() didn't seem to be doing anything...I'll eliminate it.  I also still think that Galactic is too easy at the moment, so I'm probably going to release another version this weekend that has maybe a few more levels, but the new ones, if they are added, will be hard, and many of the old ones will become harder, and the amount of money the the player starts with will be decreased by half.  I have yet to defeat the boss, but I can get to it pretty quickly.  Part of why I haven't been able to defeat the boss might be because of s mistake in my coding, so I'll try to double-check that.  <_<dry.gif

Also, remember everybody - there is already a working (but overly easy, in my opinions) version released at http://bfr.tifreakware.net/galactic.zip .

Oh, and one more thing - that isn't my real birthday; I entered in a fake birthday.  . :angel:ange.gif
Title: Galactic 68K
Post by: bfr on February 23, 2007, 11:41:00 am
OK.  I'm going to try to release a new awesome version of Galactic 68K.  But, while I was trying to improve it, I messed it up.  Hopefully I can get it fixed.  Here's a screenshot of it being messed up:

user posted image
Title: Galactic 68K
Post by: graywolf on February 23, 2007, 12:19:00 pm
Lol, that does not look like Galaxian.  <_<dry.gif  Looks more like ship sprites...
Title: Galactic 68K
Post by: bfr on February 23, 2007, 12:26:00 pm
It's not supposed to look like Galaxian; it's supposed to look like Galactic.  ;)wink.gif
Title: Galactic 68K
Post by: graywolf on February 23, 2007, 02:34:00 pm
Whoops! Sorry, that's what I meant.  :Ptongue.gif
Title: Galactic 68K
Post by: bfr on February 24, 2007, 05:53:00 am
Here's the problem that caused the calculator to freeze, the graphics to get messed up, and what just really distored the game:  I set one variable to 10 instead of 1.

Anyway, I added a few more levels, added scrolling backgrounds to a few more levels, and made the game slightly harder.  It can be downloaded http://bfr.tifreakware.net/galactic.zip.  Here are some screenshots: user posted imageuser posted image
Title: Galactic 68K
Post by: graywolf on February 24, 2007, 08:18:00 am
I like the backgrounds. How many ship sprites (and enemy) are there? And will there be a black background with scrolling stars (or white with scrolling stars like in the game Venus - 68k)?
Title: Galactic 68K
Post by: bfr on February 24, 2007, 09:24:00 am
There are five user ship sprites and six enemy ship sprites, including the boss.  There are also different sprites for different weapons/lasers.  The player starts off with a slight variation of the classic Galactic ship, and then, as the game goes on, gets to use other variations of the classic Galactic ship, gets to use some ships that are more different from the classic Galactic ship, and the player can also buy a new ship at the shop.

Yes, some level(s) have a black background with scrolling white stars.
Title: Galactic 68K
Post by: graywolf on February 24, 2007, 12:59:00 pm
Sounds cool!