Mini 3D FPS in an Applet Update 9

this was intended to be a simple walkthrought sample to help someone that ask me to start something with 3DzzD… and I made a little too much, this have also give me a good idea on time constraints… (related to the 4 hours contest proposal), so the source code are available and are very messy as I have to go to work and wanted to bring out something before… (I will clean & optimise later in the week)

http://demo.dzzd.net/FPSSample/

Update 3
http://demo.dzzd.net/FPSSample3/

Update 4
http://demo.dzzd.net/FPSSample4/

Update 5
http://demo.dzzd.net/FPSSample5/

Update 7
http://demo.dzzd.net/FPSSample7/

Update 8
http://demo.dzzd.net/FPSSample8/

Update 9
http://demo.dzzd.net/FPSSample9/

EDIT2:
H and S key to switch hardware/Software rendering

Update 1:
slower control for mouse view + bigger landing area

Update 2:
better graphics and a little sound more

Update 3:
better control smoothness (no more fps dependant)
better 3d model for alien
auto-respawn after 5 seconds

Update 4:
new model

Update 5:
better impacts
try a “dead zone” at screen center : camera dont move when mouse inside

Update 7:
code review
sounds
first enemy unit

Update 9:
Added FPS like mouse control
Improve spiders AI/logic

That’s amazingly cool. Well done.

Looks cool, though does seem a little hard to start off.

It’s unplayable IMHO. I’m always dead after a few seconds (plus F5 doesn’t work for me). If i’m lucky, i’m seeing an alien in the sky, but it’s impossible to aim and shoot at it. The controls are way too sluggish.

[quote]It’s unplayable IMHO. I’m always dead after a few seconds (plus F5 doesn’t work for me). If i’m lucky, i’m seeing an alien in the sky, but it’s impossible to aim and shoot at it. The controls are way too sluggish.
[/quote]
could you provide the console output please ? for now, I think about two reasons that could explain why it is unplayable, maybe your fps grow too high/too low or the applet eat too much cpu and mouse/keyboard dont work properly.

It is not that hard to control at 30fps when keyboard and mouse works, so does you really dislike the control or did you think that there is a problem (fps/cpu) when running the applet on your computer ?

It starts up fine, the controls are horrible[1], and I die after a couple of seconds of not seeing anything, and not being able to even figure out how to move. F5 doesn’t work unless I first click outside the applet area, so I guess there’s no way of restarting the game from within the game. I never saw any aliens.
Other than that, it reminds me a lot of your 3dzzd tech demos, which are VERY impressive technically.

[1] I know there’s really no good way of doing good mouse look without grabbing the cursor, but having the view constantly move around is very annoying and hard to control.

[quote]F5 doesn’t work unless I first click outside the applet area
[/quote]
F5 refresh browser that’s it :), no time to do a proper reload this night, on further updates.

[quote]It starts up fine, the controls are horrible[1], and I die after a couple of seconds of not seeing anything
[/quote]
Now, I really like to move gun differently from user, first it was because as you said there is no way to do a propere FPS like control, but now I really love this kind of control, truely.

No problem:


Init : Thread[thread applet-FPSSample.class,4,http://demo.dzzd.net/FPSSample/-threadGroup]
Start : Thread[thread applet-FPSSample.class,4,http://demo.dzzd.net/FPSSample/-threadGroup]
Load image http://demo.dzzd.net/FPSSample/FPSSample/LOAD.GIF
Load 3ds http://demo.dzzd.net/FPSSample/FPSSample/FPSSample.3DS
Start : Thread[Thread-18,4,http://demo.dzzd.net/FPSSample/-threadGroup]
0
4073
3920
3920
4019
3967
3920
4019
4019
Destroy : Thread[thread applet-FPSSample.class,4,http://demo.dzzd.net/FPSSample/-threadGroup]
Stop : Thread[Thread-18,4,http://demo.dzzd.net/FPSSample/-threadGroup]

I ran it on a Core2Duo @ 3Ghz, so slowness shouldn’t be an issue. It’s just that the controls don’t feel direct enough. It’s more like sliding on ice and aiming at something is like trying to hit something on that ice while sliding around at full speed with no brakes…i hope you get the idea… :wink:

I guess it’s possible to get used to it. I’d like a “dead zone” in the middle though, where the view is totally still. Like, for example, as long as the mouse is within a 32 pixel radius of the center of the screen.

ok, not have enought time to implement all those suggestions but enought to reduce the control speed and make the landing area bigger

update 2:
better graphics + one sound more :slight_smile:

EDIT:
oups one class file was not up to date …

Nice work, it worked well for me.

Pretty fun, although a little difficult to begin with. However, if you scan the sky frantically while waiting for the next alien to appear, you stand a better chance of surviving a little longer, I find.

If you were planning to develop it further, I would say that a few more damage particles would be nice, since it takes several hits (3?) to kill an alien, it would be helpful to see that you are indeed hitting it (and damaging it) when you shoot at it.

Anyway, overall, it looks great.

Ben.

Update 3:

http://demo.dzzd.net/FPSSample3/

  • better alien 3d model
  • alien fall vertically, move slower and only require two bullets to be killed
  • auto-respawn after 5 second (pseudo one…)
  • better user controls, control have been made independant of frame rate (thank to thijs)

I did not release this sample source code as I did not finish review of it and it is still dirty,messy, unreadable, bad practice and more…

Hardware mode is available by pressing H key

[quote]I ran it on a Core2Duo @ 3Ghz, so slowness shouldn’t be an issue. It’s just that the controls don’t feel direct enough. It’s more like sliding on ice and aiming at something is like trying to hit something on that ice while sliding around at full speed with no brakes…i hope you get the idea…
[/quote]
I see, is that better now ?

[quote]I guess it’s possible to get used to it. I’d like a “dead zone” in the middle though, where the view is totally still. Like, for example, as long as the mouse is within a 32 pixel radius of the center of the screen.
[/quote]
good idea about a dead zone, maybe with a non-linear it will be even better, like speed=kmousepos² rathen than kmousepos, maybe…

[quote]Pretty fun, although a little difficult to begin with. However, if you scan the sky frantically while waiting for the next alien to appear, you stand a better chance of surviving a little longer, I find.
[/quote]
hehe, it will help less now, aliens are now falling vertically

[quote]If you were planning to develop it further, I would say that a few more damage particles would be nice, since it takes several hits (3?) to kill an alien, it would be helpful to see that you are indeed hitting it (and damaging it) when you shoot at it.
[/quote]
yep, absolutly right, still need huge improvments

EDIT:
reviewed graphics (textures) +lighting

Yes, much better.

Just a small update: add some background music.

Very good example but there is a problem with the focus. I can use the mouse but rarely the keyboard :frowning:

damn even on hardware mode ? (focus is lost when switching, you should click on applet after each switch hard/soft)

nothing related to your problem but I have made some few improvments :

  • 3d engine mipmap level have been reduced => look smoother and less blink
  • edge antialias activated (vertical one)

Yes.

When I can’t use the keyboard anymore even after clicking, I jump and it works anew.

It runs very well on both of my machines (celeron M 1.5, E8400), although the control is a little bit hard. I didn’t notice any difference between softeware and hardwere
modes, or could it be that i was running at the software mode all the time? I did receive the warning window after pressing “H”.