Omnimaga

Calculator Community => Casio Calculators => Topic started by: Spenceboy98 on April 20, 2013, 03:12:56 pm

Title: [LuaZM] pFighter
Post by: Spenceboy98 on April 20, 2013, 03:12:56 pm
Ported from adam Tree's nFighter to LuaZM(with permission). In this game, you have to destroy your enemy. There are bonus's too. You shoot them to collect them. B is bullets, S is score, and F is fuel. Try not to run out of bullets or fuel or it's GAME OVER.

You can use arrows or numpad to move. Use [5] or [SHIFT] to shoot. [x^2] to restart.

Here's the cemetech download: http://www.cemetech.net/programs/index.php?mode=file&id=888
(http://www.cemetech.net/img/ss/001252.gif)(http://www.cemetech.net/img/ss/001253.gif)
(http://www.cemetech.net/img/ss/001254.gif)(http://www.cemetech.net/img/ss/001255.gif)

Original: http://www.ticalc.org/archives/files/fileinfo/437/43729.html
I will upload it to Omni archives soon.
Title: Re: [LuaZM] pFighter
Post by: flyingfisch on April 20, 2013, 06:10:55 pm
wowow, looks great! Downloading it right now. :)
Title: Re: [LuaZM] pFighter
Post by: Spenceboy98 on April 20, 2013, 06:31:23 pm
wowow, looks great! Downloading it right now. :)

Thanks! It wasn't too hard to port(commented out the code to draw arcs). I had to center everything. I hope you enjoy it!
Title: Re: [LuaZM] pFighter
Post by: flyingfisch on April 20, 2013, 07:17:23 pm
Very fun, very nicely made. I would suggest using local vars instead of global though.
Title: Re: [LuaZM] pFighter
Post by: DJ Omnimaga on April 21, 2013, 01:23:48 am
This was a fun game a while back. Glad it was ported and I like the static effect.

You should add a color mode, since, after all, the PRIZM is a color calc :P
Title: Re: [LuaZM] pFighter
Post by: Spenceboy98 on April 21, 2013, 08:15:05 am
This was a fun game a while back. Glad it was ported and I like the static effect.

You should add a color mode, since, after all, the PRIZM is a color calc :P

I could try. I will when I get home from church today.


As for the global variables, I don't think I'll change those(I don't really know how, plus I'd probably end up screwing it up :P).
Title: Re: [LuaZM] pFighter
Post by: flyingfisch on April 21, 2013, 04:27:13 pm
As for the global variables, I don't think I'll change those(I don't really know how, plus I'd probably end up screwing it up :P).

When you declare the variables, just tag local on them. Like this:

Code: [Select]
local var = blah
local var2
Title: Re: [LuaZM] pFighter
Post by: Dapianokid on April 21, 2013, 05:23:21 pm
no is for CX...?
Title: Re: Re: [LuaZM] pFighter
Post by: TheNlightenedOne on April 21, 2013, 05:25:18 pm
Um, it's for Prizm.
Title: Re: [LuaZM] pFighter
Post by: Spenceboy98 on April 21, 2013, 07:19:54 pm
As for the global variables, I don't think I'll change those(I don't really know how, plus I'd probably end up screwing it up :P).

When you declare the variables, just tag local on them. Like this:

Code: [Select]
local var = blah
local var2

What difference will it make?
Title: Re: [LuaZM] pFighter
Post by: flyingfisch on April 21, 2013, 09:07:09 pm
As for the global variables, I don't think I'll change those(I don't really know how, plus I'd probably end up screwing it up :P).

When you declare the variables, just tag local on them. Like this:

Code: [Select]
local var = blah
local var2

What difference will it make?

Well, for one thing, it will make running the program twice in a row not give Error: Not enough memory. ;)

Plus it could increase speed.
Title: Re: [LuaZM] pFighter
Post by: Spenceboy98 on April 21, 2013, 09:29:38 pm
As for the global variables, I don't think I'll change those(I don't really know how, plus I'd probably end up screwing it up :P).

When you declare the variables, just tag local on them. Like this:

Code: [Select]
local var = blah
local var2

What difference will it make?

Well, for one thing, it will make running the program twice in a row not give Error: Not enough memory. ;)

Plus it could increase speed.

Would I do this with all the variables(ALL)?

Also, now more colorful:
(http://www.cemetech.net/img/ss/001258.gif)(http://www.cemetech.net/img/ss/001259.gif)
(http://www.cemetech.net/img/ss/001260.gif)(http://www.cemetech.net/img/ss/001261.gif)

Same download link as in first post.
Title: Re: [LuaZM] pFighter
Post by: DJ Omnimaga on April 22, 2013, 12:04:11 am
Wow I like it even more now :D. The addition of colors makes it more retro arcade style, like Defender.
Title: Re: [LuaZM] pFighter
Post by: flyingfisch on April 22, 2013, 10:17:49 am
As for the global variables, I don't think I'll change those(I don't really know how, plus I'd probably end up screwing it up :P).

When you declare the variables, just tag local on them. Like this:

Code: [Select]
local var = blah
local var2

What difference will it make?

Well, for one thing, it will make running the program twice in a row not give Error: Not enough memory. ;)

Plus it could increase speed.

Would I do this with all the variables(ALL)?

Yes...

Doesn't the program declare all variables at the beginning anyway?