GLBasic forum

Main forum => Announcements => Topic started by: BdR on 2013-Feb-26

Title: working on a Space Invaders game
Post by: BdR on 2013-Feb-26
(note: I know I shouldn't use flat colors, I'll create properly textured models later)

work-in-progress/alpha version download -> 3dinvaders.zip (http://members.home.nl/bas.de.reuver/tmpfiles/3dinvaders.zip)

(http://i53.tinypic.com/34q8l1c.png)

I wanted to do a 3D game, but I figured it's best to start simple. So at the moment I'm working on a Space Invaders game using 3D models instead of bitmaps. :) It has several levels and power-ups. Still lots of stuff to add like score display, player destroy, level intro etc.

I don't normally do this, I usually don't post about a game until it's "ready". But hopefully it will be just a little extra motivation to finish this game and maybe also get some feedback. :good:
Title: Re: working on a Space Invaders game
Post by: siatek on 2013-Feb-26
+1

im really like flat shading its looking like AMIGA or Sega Genesis x32 style :)

good job :)
Title: Re: working on a Space Invaders game
Post by: erico on 2013-Feb-26
A wire frame visual would come cool too.
The main ship reminds me of SILPHEED:
http://www.lcurtisboyle.com/nitros9/silpheed.html

Looking good. I am interested in 3d too, just not done anything about it yet. :)
Title: Re: working on a Space Invaders game
Post by: Ian Price on 2013-Feb-26
That looks great. Sometimes flat shaded polys look far better than poorly textured models. Take a look at Virtua Racing - that looks awesome. Then take a look at every 3D F1 style racing game ever since - they all look crap in comparison, despite near-photo-realism.
Title: Re: working on a Space Invaders game
Post by: erico on 2013-Feb-26
Same reason I can only play ELITE frontier, not the newer PC frontier II crap hehe, I love flat polygons. :good:
Title: Re: working on a Space Invaders game
Post by: mentalthink on 2013-Feb-27
Very Cool!!

I love the flat polys too, I rebember when I look the first textured polys... if you are near... what *love* it this.. ?¿,
Title: Re: working on a Space Invaders game
Post by: Wampus on 2013-Feb-27
Looks fun. Great idea for a first venture into 3D gaming.
Title: Re: working on a Space Invaders game
Post by: erico on 2013-Feb-27
oh heck, don´t call me grandpa, but the very first 3d program I used was videoscape 3d, back on the amiga, it could do about flat polygons.
I love it. and...you had to code your objects.
http://pcmuseum.ca/details.asp?id=37761&type=Software
edit: ^now you know why I love lightwave so much :P

Back on subject, let us know how it is going, a video maybe?
Title: Re: working on a Space Invaders game
Post by: matchy on 2013-Feb-27
Great! Put some galaxy backdrop and sunlight shadow and done! I can't wait to play it.  :whistle:
Title: Re: working on a Space Invaders game
Post by: Sokurah on 2013-Feb-27
I have to agree with Ian and others - I love the flatshaded look too.  :good:

If you plan on putting in textures, then also please consider letting the player chose between that and flatshaded mode. ;)
Title: Re: working on a Space Invaders game
Post by: r0ber7 on 2013-Feb-27
Nice! I especially like the red-white umbrella starship. :-D
Textures can add realism, but they can also kill the feel of the game. One thing I've learned is, don't try to be like the big game companies. I think, you could go for textures, but I suspect it would take much more time to get it "right".

I'm afraid of programming in 3D so I'm going to run away now.
Title: Re: working on a Space Invaders game
Post by: BdR on 2013-Feb-27
I also like the flat shaded look, just like in Starfox for SNES. 8) I think I'll use a texture that is mostly just prime colors, with minor actual texture only some "techno" stripes or something. I suspect from reading on the forums here (http://www.glbasic.com/forum/index.php?topic=8895.msg75993#msg75993) that the Android & iPhone hardware work better with textures than with flat shaded colors. Is this correct? Because I want to release this game on the appstore and Google-play.

Btw the umbrella bonus UFO looks the same as in my old Cash Invaders msdos game. :) I'll post another update this weekend maybe.
Title: Re: working on a Space Invaders game
Post by: erico on 2013-Feb-27
Great, yep it is said you should use textures.
So you can go with a pure color texture, results will be the same.

But I agree with the "techno" stripes and so on.
Like minecraft, has pixel art for textures.

You are not using transparencies right?
Title: Re: working on a Space Invaders game
Post by: Schranz0r on 2013-Feb-27
Ahhh crap, love that idea!

How about a option to "zoom in " into the spaceship to play it from the 1st person...
So you can toggle in and out ingame?!
Title: Re: working on a Space Invaders game
Post by: BdR on 2013-Feb-28
You are not using transparencies right?
Nope, I don't use transparencies. Do you ask this because those are performence killers too maybe?

And yes, I will add 1st person perspective but only as easteregg.. ;)
Title: Re: working on a Space Invaders game
Post by: erico on 2013-Feb-28
You are not using transparencies right?
Nope, I don't use transparencies. Do you ask this because those are performence killers too maybe?

No, I guess they are not, but I saw in another thread you wanted 3d explosions. That is the reason.
While I was thinking about it, I got to a´what would the art style be' situation, and transparencies make a lot of differences, either on or off.

3d explosions with transparencies are ´more or less´ an easy thing.
If no-transparecies, then it gets harder, these are what came to my mind: (beware the dreaded text wall! :puke:)

My first thoughts about such was doing something similar to FRONTIER on the amiga, quite a nice inspiration but they are vectors instead of 3d(ye the balls).
My better second thought was about doing a voxel explosion but with polygons.

Mind polygonised voxels do have a resolution limit depending on number of cubes and your final screen size and art style, they also animate on a 2d fashion, so the may ´jump´ if not having enough frames/objects.
Textures can help easy that up, so as smoothing polygons like fluids.

Because of Ian Price´s  Aquaventura game, where when you collect a diamond you see a nice blinking animation made with well positioned pixels, I got a hype to research pixel special effects for my own game.(super thanks Ian :booze:)

While at that, I learned some interesting 2d stuff, and I applied a couple to my game.
An interesting thing on one effect, was that it was actually based on a 3d projection (the one jpg appended).
Like I had to draw splines on photoshop but had to consider a 3d space while doing 2d (is it understandable?).

At the same time, I have been marveled by the 2d art in KOF XIII, and I always suspected that there was some 3d going on there as a sketch (an atempt to de-construct things I like), specially for cloths and shadows. A couple days ago I saw a doc about it, and while the director stated they did it all on 2d, at some point he sneezes that everything was first done in 3d to get perspective right and bla bla... gotcha! :P

So these 6 things got together in my mind in no particular order:
1- Ians ability do draw 2d anim fx in a cool way.
2- De-constructing kof XIII art technique.
3- how to 3d explode things without transparencies.
4- Voxel to 3d conversion program made by Scott_AW.
5- my own game effect sprites after researching that subject.
6- your game.

Oh well, not to drive this off topic answer to much,
I´m now interested in doing an experiment explosion in 3d by voxels to cubes.

I´m appending my current 2d explosion(in jpg) I´m using on my game so you get an idea (the elipse/circle one).
The ray is easy to 3d draw, the smoke ellipses are a bit harder to do on sliced images editing.
Animating them without a prime visualization is even harder.

If the results come up any good, I send you the 3d cubes/voxel version and if you like it, you are free to use it (if Scott_AW is ok with it too :) as I´m thinking of using his tool instead of standard 3d packages)   

EDIT: I will see to do a 32x32 voxel/obj instead...gotta keep the flat low poly going ;) 
EDIT2: actually I will try lower for the same reason/style.
 
Title: Re: working on a Space Invaders game
Post by: Kitty Hello on 2013-Feb-28
Looks great. If you want to stay with the coloured polygons, don't use colours, but use a colour texture for speed reasons.
Title: Re: working on a Space Invaders game
Post by: erico on 2013-Feb-28
Great! Put some galaxy backdrop and sunlight shadow and done! I can't wait to play it.  :whistle:
I´m never going to see Matchy as an invisible man! :S :D
Love his criticism to the most! There must be a twist to the general-all-ever-done formula.

Even if this is your first attempt on 3d, it dosen´t stop you on increasing/adding to it ;)

...I guess we are here not only about techs, but game play, art, music, interface, etc...
Title: Re: working on a Space Invaders game
Post by: Marmor on 2013-Feb-28
(note: I know I shouldn't use flat colors, I'll create properly textured models later)  :blink:

I like this Look ! 
Title: Re: working on a Space Invaders game
Post by: erico on 2013-Mar-04
Ok, finally got around to give a shot on the explosion...
...could not make it voxel, drawing sliced voxels without visualization + diagonal circles proved impossible to me  :'(

So I gave a go on standard 3d package. Appended are the results and here goes a screen shot.
Mind I did the DDD files but didn´t test them.

Main reason was that it requires some 3d code to make it happen properly.
It goes like this:

You have the ray.ddd
You can rotate it during the animation, increase and decrease size a bit to make it shake and so on.

You have the B_anim.ddd
Which is one ring of clouds, 5 frames.
You can duplicate it in code to have a double smoke like the appended jpg.
You can hold each frame for a couple frames while animating the size.

So, at the end, you can costumise or randomise the explosion.

I´m not sure the xyz object direction got correct on my obj/DDD exporting.

They should have proper UVmap and I´m sending pure color textures too.
Hope it is of any good! I had fun doing it, sad I could not do on voxels.
I´m also not sure I did it with the least poly count.

Let me know if it is useful at all. :-[
Title: Re: working on a Space Invaders game
Post by: BdR on 2013-Mar-05
That looks pretty cool, erico. 8) That's exactly how I want to make my explosions. I though about a Metal Slug-like explosion, except a little simpler so some different sized low-poly spheres that grow and shrink.

(http://i254.photobucket.com/albums/hh114/inphact/000.gif)

However, I ran into something; when I create a 3D animated model with Convert3D it removes all colors so you are forced to work with textures. It seems the convert tool doesn't support colors. Would be nice if it could import .obj+mtl files or .ddd files as keyframes. I already posted a bug report (http://www.glbasic.com/forum/index.php?topic=8910.0).
Title: Re: working on a Space Invaders game
Post by: erico on 2013-Mar-05
Oh I see.

Hey nice explosion there! Metal slug is a piece of art when it comes to pixel art and animations!

But that one has a lot of frames, you might want to animate the objects inside GLB instead of trying for "each object one frame" solution.
That way, you may be able to decompose that explosion into a set of separate objects.
Then you should be able to avoid the bug you reported.

The one I did up there was decomposed into 3 objects: the ray, one smoke ring (that you duplicate inside GLB).

Hope it helps! :good: 
Title: Re: working on a Space Invaders game
Post by: BdR on 2013-Mar-11
Just uploaded a preview version for Windows, see openingpost :)

Currently the explosion is one single yellow ball model. Which is drawn 6 times that move position using code (with SIN and COS) and scale with X_SCALING. I don't know what would be faster and less CPU; doing the animation in code with X_MOVEMENT and SIN/COS and X_SCALE, or using a pre-animated .DDD file with pre-calculated keyframes.
Title: Re: working on a Space Invaders game
Post by: mentalthink on 2013-Mar-11
WOW!!! it's really adictive the game...
About the explosions... you can try put 2D explosions in the place of the 3D world... I use Time Line Fx Editor, and you have a lot of explosions in 2D for Spaceships and this things... if you need help commnet me and I send you a couple of explosions.

About the game it's very very nice... very quickly... I thing I fing a bug... wehn the enemies arribes to the bottom of the screen the enemies continue from left to Rigth - and rigth the left, but you can kill it, but he can kill you...

Very nice I play for a while... extrange in me...