Re: adding multiple enemies space invaders html and _javascript_ game
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 fo rum section on network multiplayer may prove useful, they likely have links to other resources and network libraries you could use.
_______________________________________________ Audiogames-reflector mailing list Audiogames-reflector@sabahattin-gucukoglu.com https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector