2015-11-19 02:54:58

hi. doing my space invaders games, and learnt from a few different tutorials. now. just expanding the game, tried searching how to add more waves or swarm waves of enemies. but i cannot not seem to find any code examples. still searching. can any one point me in the right direction, and point me to the pages, so i can then learn how to do this. do not want you to do it for me, want to learn for my self. any one from australia, new zealand or asia, as a same or similar time zone. i need an answer today, if possible. have till december 31 to hand up the project, and then have completed my certificate iv programming from http://www.upskilled.edu.au

2015-11-19 06:34:46

Just expanding the game, tried searching how to add more waves or swarm waves of enemies.

Do you mean that when you complete the first wave, it continues on to another wave or waves? One way would be to load each wave into its own list, then update the currently active list during each cycle and remove any defeated enemies from the list. When the wave is empty swap over to the next one, either that or refill the list with more enemies for the next "wave".

-BrushTone v1.3.3: Accessible Paint Tool
-AudiMesh3D v1.0.0: Accessible 3D Model Viewer

2015-11-19 08:46:49

hi. can you give me a quick example, so then i can then understand it better. and also. how to get recorded audio, or any text to speech engines, free, don't have a credit card. so. any ideas, any code how to get it to speak out the various things on screen. learnt from a few tutorials. so, learning. and maybe you could take a look at the completed game, and give me some pointers, how to do it better. also, any free ftp servers, for playing over the net.
and also multiplayer.

2015-11-19 09:56:18 (edited by magurp244 2015-11-21 08:31:17)

I don't have much experience with java specifically so i'm uncertain how helpful any advice I give may be, though i've written two offline versions of space invaders in C and Python, respectively. I can provide a crude sudo-code example in python, if that may help. First for switching multiple waves:

wave = {'wave1':[],'wave2':[]}

#load waves with enemies
for a in xrange(0,32,1):
    wave['wave1'].append(enemy(x,y))
    wave['wave2'].append(enemy(x,y))

#current wave toggle
current = ['wave1','wave2']

def update(self):
#update current waves position/state, removing dead enemies from the list.
    for a in wave[current[0]]:
        a.update(x,y)
#if no more enemies are in the current wave, switch to next wave.
    if len(wave[current]) == 0 and len(current) > 0:
        current.pop(0)
#if no more waves remain, end game.
    else:
        print 'No more waves, victory!'

       

Then another example if just refilling the wave after its empty:

#load wave with enemies.
wave = []
for a in xrange(0,32,1):
    wave.append(enemy(x,y))

def update(self):
#update current waves position/state, removing dead enemies from list.
    for a in wave:
        a.update(x,y)
#when no enemies remain, refill wave list.
    if len(wave) == 0:
        for a in xrange(0 ,32,1):
            wave.append(enemy(x,y))

I did find an open sourced java TTS module, FreeTTS, while researching another project you could use. For playing sounds you could also check out some resources here, and here.

Network multiplayer complicates things, and from what i've learned of it so far its something you'll want to include from the very beginning, and that it can easily be just as complicated as the rest of the game. If you expect to pick it up in less than a month, then you have your work cut out for you.  This link on network multiplayer seems to have examples in java, also this java forum section on network multiplayer may prove useful, they likely have links to other resources and network libraries you could use.

Edit: Hm, just rechecked the multiplayer tutorial link and it seems like the examples are actually in Flash. Bleh. It still may be useful, but here is a link to some actual java network examples.

-BrushTone v1.3.3: Accessible Paint Tool
-AudiMesh3D v1.0.0: Accessible 3D Model Viewer

2015-11-20 03:13:50

hi. okay, copied that and will try my best to convert it to javascript code.
and also did find an answer for a free tts, me speak.js. so will go and grab that, read up how to install that, and then find a tutorial how to use it.
marvin.