Space Invaders Tutorial Game

@blahblahblah

Thanks for William Dennis (great chap!) I now have code context highlighted via a beautiful php script (with a few compatibility hacks from me ;))

Kev

[quote]Why, I hadn’t thought of that! Good idea…why don’t you? ;D
[/quote]
Heh. One is at about 90% (TinyRivers) and two others at about 50%. I’m doin my best finishing em asap (I really need skill demonstrations right now) :slight_smile:

[quote]Actually, though, I was just thinking that the skull could work quite well in quite a lot of games, could be worked into a player-death animation. Although I haven’t seen it animated yet, of course.
[/quote]
Yea well… it won’t match (style wise) into anything, wich is in my pipeline. But, y’know, I thought it’s a waste to let it rot :slight_smile:

Animated:

I finished reading through, tried to sort most of the grammar/speeeeeling out.

I’m going to add a “Further Reading” section but so far I can only think of:

  • <shameless_plug>My webstart guide</shameless_plug>
  • The Full Screen Exclusive Mode Tutorial
  • The GAGE library (Timer especially)

Anything else?

Kev

I messed up with the code and the game to practice a
bit, now the game is a kind of side scroller with
enemies coming from the upper part of the screen and
going down. I’v added stuff like enemies which shoot
back at you, dust particles (so we feel like moving),
ship moving in x and y with inertia,…

my version is available here:
http://membres.lycos.fr/nolagrulez/java/si%20monkeyget’s%20build.jar
(don’t forget to use up/down keys)

\o/ kevglass \o/

Ack, but you didnt webstart it?

Webstart aside, fair play, thats ace… :slight_smile: Nice job!

Kev

Just thought I would report that it works fine on OS X 10.3.3.
Very nice tutorial. You should link it from the Wiki (you know that thing that nobody uses :slight_smile: )

As he said, it shall be done! Ping!

Kev

Hello :slight_smile:

I have been studying the code for the tutorial using JBuilder X Foundation - when I run it, the following message appears “Can’t find ref: sprites/ship.gif”

The folder structure within the JB project directory is

f - SpaceInvader
— f - scr …contains the java source files
— f - classes …contains the compiled java class files
— f - sprites …contains the three gif files
— f - bak …contains the JB backup files

I have tried to learn about ClassLoader etc and I have a rough idea of what it is designed to do but I am not sure about how its functionality relates to this problem as I suspect it is something to do with the way the files are stored as indicated above

I understand that this isn’t a forum for JB problems, but could any of you explain to me why the code isn’t working in JB

Thank you

I was a little worried about this, hence the blag in the tutorial.

Your “classpath” needs to include your SpaceInvader directory. How you do this in JBuilder, god only knows… but I suspect they’ll be a configuration option on whereever you configure which class is executed…

Kev

PS. I might revisit this bit slightly.

Hey kev, very nice tutorial, as I mentioned in another thread.

Would it be OK to link it from javadesktop.org in the next tip of the week? (or in some other way)

Sure, thanks, that’d be cool. However, can you wait til it finds it way onto the JGF page (http://grexengine.com/sections/externalgames/). It might be a nice way to raise the profile of the page and all the Java Games listed there.

Kev

…and, thanks, to Kev’s tireless efforts, JGF is about to get a facelift :), so…

Hello Kevglass :slight_smile:

thanks for the advice re the classpath - it isnt clear how this is achieved in JB so I am asking how on the JB forum

one additional question: does “setIgnoreRepaint(true);” only affect the canvas? if the game included AWT/Swing components such as buttons, are they still redrawn automatically?

some thoughts for expanding the tutorial…

it would be interesting to see this game coded using the GAGE API

although it isnt part of space invaders, how to make sprites respond to mouse clicks

i would love to see you write a simple 2D RPG tutorial with maps, characters, keys, doors, levels, etc

:slight_smile:

[quote]i would love to see you write a simple 2D RPG tutorial with maps, characters, keys, doors, levels, etc
[/quote]
That type of game is quiet a bit more complex than a simple space invaders clone. Theres alot more design involved, alot more gfx, alot more interactions etc…

No problem. I was going to suggest to put a link to JGF page there anyway =)

We can add it to swingsightings, too, if you like. Most of the games are not exactly swing-related, but it wouldn’t hurt…

Jareson does include a similar game with the GAGE library. It’s called Shooter, check it out…

As nonous says, this would take afair bit of time and would end up being a game not a tutorial. The reason the space invaders tutorial is done is because it has a very limited scope.

Had a few requests to write a next tutorial using OpenGL to do the graphics.

Unless anyone thinks its not worth the time looks like there’s going to be a Space Invaders 102 : Acceleration with OpenGL.

Kev

Sounds good! Maybe some other ‘gurus’ will follow suit and make up some good tutes!

OTHER !!! Hey, don’t hit me with any of that Guru culture… I just have plenty of time on my hands :wink:

Kev