android
  #1  
Old 12-11-2010, 03:50 PM
visionary m visionary m is offline
Junior Member
 
Join Date: Dec 2010
Posts: 17
Cool Missile command

After a few day of intensive programming, in between intensive studying for my finals, i present to you... MISSILE COMMAND. In my version of this classic game the three turrets at the bottom of the screen each take a turn shooting. If the turret has been hit, then it is rendered nonfunctional. if all six of your cities are destroyed , or if all three of your turrets are destroyed, the game is over. You shoot your missiles by tapping the screen, although you can not shoot below a certain point on the screen. I made it this way so that you can not blow up your own cities or turrets.


Find a bug? Tell me about it, and I will look into it.
Feedback is appreciated, and for coders, if you would like to tell me better ways to do things, i would love to hear from you.

note: while playing the game i realized it may be too easy, so i made it a little harder.
Attached Images
File Type: png mc.png (37.6 KB, 357 views)
File Type: png mc2.png (79.4 KB, 227 views)
Attached Files
File Type: zip MISSILE COMMAND.zip (49.9 KB, 465 views)

Last edited by visionary m; 12-16-2010 at 06:02 PM. Reason: fix the lingering circles farther in the game.
Reply With Quote

Advertisement [Remove Advertisement]

  #2  
Old 12-11-2010, 04:54 PM
Habhome's Avatar
Habhome Habhome is offline
Moderator
 
Join Date: Jan 2010
Location: Sweden
Posts: 1,079
Default

Hey! I've had a thought of maybe.. some time... in the unforseeable future.. make this game =P Though.. with my track record of not working on Neko Apprentice I guess it's out of the question anyway.

Will try this out some day when I get the time, and also check out the code to see if I can find anything to learn or teach =P
__________________
"If you are good enough at English to apologize, then there is no need to." - A good friend of mine
Discovered something about the X-Fi2 you think others may not know? Post it here so others can learn about it!
Have a question about X-Fi2 apps? Consult the FAQ before creating a thread about it.
Like my work? Tell your friends. Don't like it? Tell me so I can improve. ^.^
Reply With Quote

  #3  
Old 12-11-2010, 06:06 PM
jbob182's Avatar
jbob182 jbob182 is offline
X-Fi2 Development Moderator
 
Join Date: Feb 2010
Location: The U.S.A.
Posts: 554
Default

Hey! i was in the middle of making this game !, ill test out yours, well looks like i need to find a new game to make .
Reply With Quote

  #4  
Old 12-11-2010, 07:15 PM
Habhome's Avatar
Habhome Habhome is offline
Moderator
 
Join Date: Jan 2010
Location: Sweden
Posts: 1,079
Default

Hehe, seems a lot of us had this idea, you got it done first. Doesn't prevent anyone from having a crack at it though to give their personal touch to the game ^^
Nice to see some fresh Dev blood here, as most have fallen off the grid, and I myself don't have much time to spare.
__________________
"If you are good enough at English to apologize, then there is no need to." - A good friend of mine
Discovered something about the X-Fi2 you think others may not know? Post it here so others can learn about it!
Have a question about X-Fi2 apps? Consult the FAQ before creating a thread about it.
Like my work? Tell your friends. Don't like it? Tell me so I can improve. ^.^
Reply With Quote

  #5  
Old 12-11-2010, 07:32 PM
jbob182's Avatar
jbob182 jbob182 is offline
X-Fi2 Development Moderator
 
Join Date: Feb 2010
Location: The U.S.A.
Posts: 554
Default

Right now i am busy learning how to read a binary file from the zen along with some very intersting features in lua i have never known about,
http://www.amazon.com/Programming-Lu...2117520&sr=8-1
is a very good lua book.
Any way this is a very nice missle command you have here, i like how you handle the explosion, the pixals going out and in
Reply With Quote

  #6  
Old 12-11-2010, 11:51 PM
visionary m visionary m is offline
Junior Member
 
Join Date: Dec 2010
Posts: 17
Default

i have been interested in that book for a while, i looked at a few bookstores, but i couldn't find it. i think that you should keep going on missile command jbob, i want to see how you do it, anyway it will probably be better than mine in the end. are you planning on making separate levels, with limited ammo, or what.
Reply With Quote

  #7  
Old 12-12-2010, 08:25 AM
jbob182's Avatar
jbob182 jbob182 is offline
X-Fi2 Development Moderator
 
Join Date: Feb 2010
Location: The U.S.A.
Posts: 554
Default

I am quite surprised on how good yours it i might have to take your explosion code lol

so ya i am basically trying to replicate this:http://www.classicgamesarcade.com/ga...e-command.html

might add the music(wavecrave, lol that has been dead for ever)

basicallily i am trying a new style of programming on this project so i am going a little slower, here is what i got , just testing functianlity right now.

As for the book it is a MUST i learned so much usfull stuff about Coroutines. Man they are SO usefull especially the Coroutines.yeild()
Attached Files
File Type: zip 1MissleCommand.zip (2.0 KB, 21 views)
Reply With Quote

  #8  
Old 12-12-2010, 09:27 AM
Brett_val's Avatar
Brett_val Brett_val is offline
Senior Member
 
Join Date: Jan 2010
Location: The Netherlands
Posts: 636
Default

Hmmm *Googles Coroutines.yeild()* .. that looks like multitasking??

But does it work on the X-Fi2? I was kinda suspecting not, since we were a bit limited here.. or at least I thought.
__________________
this is a link to my personal homepage which I haven't
Reply With Quote

  #9  
Old 12-12-2010, 11:35 AM
jbob182's Avatar
jbob182 jbob182 is offline
X-Fi2 Development Moderator
 
Join Date: Feb 2010
Location: The U.S.A.
Posts: 554
Default

http://en.wikipedia.org/wiki/User:Th...oroutine_table

i dont see why not, heres a quick example of a coroutinne(basicly a complex way of function)

this is just a simple example

Code:
counter = coroutine.create(function ()
                for i=1,10 do
                        print("counter",i)
                        coroutine.yield()
                end
        end)
       
        
Usage:

coroutine.resume(counter)
you should note that courtines have 4 states : suspended,running,dead, and normal

when you have a yeild it turns the courtine to suspended( i think) thous you can call upon it again

when i is above 10 the courtine will not run because it is dead

and the results will be:

when you call it i = i+1 and ends
Reply With Quote

  #10  
Old 12-12-2010, 01:49 PM
Habhome's Avatar
Habhome Habhome is offline
Moderator
 
Join Date: Jan 2010
Location: Sweden
Posts: 1,079
Default

This thread is specifically about Visionary m's missile command app, please create a new thread to discuss the new Lua findings.
__________________
"If you are good enough at English to apologize, then there is no need to." - A good friend of mine
Discovered something about the X-Fi2 you think others may not know? Post it here so others can learn about it!
Have a question about X-Fi2 apps? Consult the FAQ before creating a thread about it.
Like my work? Tell your friends. Don't like it? Tell me so I can improve. ^.^
Reply With Quote

  #11  
Old 12-13-2010, 07:02 AM
jbob182's Avatar
jbob182 jbob182 is offline
X-Fi2 Development Moderator
 
Join Date: Feb 2010
Location: The U.S.A.
Posts: 554
Default

After a bit of testing the game on my player i noticed it pauses sometimes when you shoot, not sure what is causing this right now.
Reply With Quote

  #12  
Old 12-13-2010, 07:23 AM
datallboy's Avatar
datallboy datallboy is offline
Member
 
Join Date: Feb 2010
Posts: 143
Default

awsome game! you should add that fade in effect to it like in the 1misslecommand.zip
__________________
I wUz he3R
Reply With Quote

  #13  
Old 12-13-2010, 03:38 PM
jbob182's Avatar
jbob182 jbob182 is offline
X-Fi2 Development Moderator
 
Join Date: Feb 2010
Location: The U.S.A.
Posts: 554
Default

Quote:
you should add that fade in effect to it like in the 1misslecommand.zip
Wow i made a fading effect? i dont see it, here is the problem why this can not be done

1. after some more testing inbetween studding for finals draw.line can not handle the converted format, i will see if i can not make a conversion that will allow something similiar.

Also this app will even pause on the sim? you might want to try to memoize(trading the memories ram for speed) (very possible/ huge saving scheme).

when you call functions that require much processing power when called like: loadstring(stringname)

it drasticlly slows down, or even to a point stops the app temporaily, i am not sure if this will help in your case or not but here is how it is done:


Code:
local results={}

function mem_loadstring (s)  -- or whatever the power consuming function is  or you could do: function memoize(called function)
    local res = results[s]
    if res == nil then  --if no saved results
        res = assert(loadstring(s))  --then create the results
        results[s] = res -- save the finding to a table
    end
    return res  -- return the recuired results 
end

Last edited by jbob182; 12-13-2010 at 03:43 PM.
Reply With Quote

  #14  
Old 12-14-2010, 10:10 PM
visionary m visionary m is offline
Junior Member
 
Join Date: Dec 2010
Posts: 17
Default

that sounds good, but would that really be helpful, since there is so much randomness in my program. with the lines all being determined by either random x values, or a touch from the user?
Reply With Quote

  #15  
Old 12-15-2010, 03:25 PM
jbob182's Avatar
jbob182 jbob182 is offline
X-Fi2 Development Moderator
 
Join Date: Feb 2010
Location: The U.S.A.
Posts: 554
Default

the one thing i thought that this could be used for ir explosions, create all the possible outcomes for colors, save it and just have the explosion set at 0,0 and just add whatever has been touched to the location or however, ill look through your code for and spots to speed up.
--------------------------------

I noticed you have 2 while loops, why?

you can just put gameloop() in a while true do

also here is a quick solution to the adk crash:

Code:
if highscore == nil then
    highscore=0
end
or something similiar

Last edited by jbob182; 12-15-2010 at 07:44 PM.
Reply With Quote

  #16  
Old 12-15-2010, 09:02 PM
visionary m visionary m is offline
Junior Member
 
Join Date: Dec 2010
Posts: 17
Default

yeah, you are right about the gameloop, i kind of just experimented a little to get something to work, I don't think i will change that now, but in the future i will do that. i guess that would work with the explosions wouldn't it. i really don't know if i want to mess with that right now though. thanks for the fix for the crash, i don't know why i didn't think of that.
Reply With Quote

Reply

Tags
arcade, classic, retro

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



All times are GMT -5. The time now is 09:40 AM.