PDA

View Full Version : Prototype Darkness-themed shooter: First impressions?



justkevin
October 14th, 2010, 02:58 PM
I've been working on this for a while and am hoping for some feedback:

http://lab.wx3.com/darkness/

It's a top-down shooter: the player explores a dark underground complex while monsters attack (think "Aliens"). Right now it's pretty simple, but the basic functionality is in place to give you a feel:


Movement
Physics
Lighting model
Monsters with basic AI (but no attack, they can't hurt you)
One "gun" weapon (some kind of plasma rifle)
One "thrown" weapon (grenades)

My idea for the general game play beyond what you can see here is to have the player explore a number of map levels collecting resources and energy, both of which are required to purchase new equipment. The player will also gradually lose energy from his weapons and lighting, so needs to keep moving.

Questions:


What are your first impressions?
What types of gameplay mechanics do you think would work well in this environment?
What kind of framerate do you get while moving? What kind of machine are you on? (The lighting system is cpu intensive)


Thanks for your time!

TheCanadian
October 14th, 2010, 03:42 PM
Wow that's cool! I get somewhere between 50 and 70 FPS on a Core 2 Duo 2.66 GHz

justkevin
October 16th, 2010, 02:07 PM
Thanks! I'll post an update when it's further along.

If anyone else takes a look and can give feedback, I'd appreciate it!

neilmmm
October 16th, 2010, 04:33 PM
hey that looks good

the lighting effect is great


fantastic bullets ... is that a slight blur on them? and the the sharpnel style effect is very cool

great dark villains too ... reminded me of the ghosts in gauntlet ... occasionally you could see them generating into thin air ... perhaps you should look at that

fps 50 plus whilst moving

Valaran
October 16th, 2010, 05:43 PM
Im sorry I didnt take time to reply earlier (As I did check it out). Is this a revamp of your old engine for that space rpg shooter? Looks just as capable regardless! Im looking forward to seeing more weapons and such. I think the grenade is kind of hard to control, but this is just my biased opinion.

The FPS varies from 120 to 200 on my i7 920. Im also very interested in how you achieved the raycasting (if that is indeed what it is?).

It looks very good and smooth nevertheless. Good luck finishing it and keep up the good work!

sHTiF
October 16th, 2010, 06:30 PM
Nice work it kind of reminds me of an old test project for my Genome2D engine. Anyway the FPS is around 55-65 on my Q6600 2.4GHz. Seems like the lightning rerendering is a killer, there sure is a room for optimalization there.

But you definitely inspired me to post a new demo for the Genome2D which i kind of neglected, keep up the good work i am a fan of top down shooters so there never will be one too many ;)

One think i don't like is that the graphics is kind of small, or maybe its just my opinion but on 1920x1200 resolution i need to be really close to see the details.

Gathan
October 16th, 2010, 10:44 PM
The only suggestion I can think of right now is to give the amount of throwing power you give the grenades, perhaps controlled by the distance the mouse is from the player or by how long the player holds down the space bar.
Besides needing a bit more control with the grenades, looks pretty good.

OMG
October 17th, 2010, 11:09 AM
wow the lighting system is great XD
50-160 fps on a core 2 duo 2.3 ghz
just a little suggestion, maybe the grenade should explode where the mouse is
also, it feels like the lighting effect takes too much importance in the game (gameplay wise), but that's just me

Voetsjoeba
October 17th, 2010, 12:07 PM
Hey, do you think you could add a switch to move with the ZQSD-keys for the Azerty people? :beam:

Other than that, looks pretty good. Lighting effects work well. I get about 70-90 fps also, Core 2 Duo 2.66GHz as well.

rumblesushi
October 17th, 2010, 02:17 PM
Nice work, significantly better than your space game.

The dynamic lighting/AO is good, it's rare to see dynamic lighting in 2D games actually. I think it would look better if it was a single torchlight effect though, rather than a walking omni light.

Runs at about 40fps on a Core 2 Duo, you should be able to get it running at 60 on an average Core 2 Duo, even with the lighting.

justkevin
October 17th, 2010, 02:38 PM
Thanks for all the feedback and encouragement!

Regarding grenades: I'm currently working on grenade targeting. I experimented with having grenade range being tied to how long you hold down the space bar, but they were still tough to control. I think I'm going to go with grenades going basically as far as the distance to the crosshairs (so exploding on the crosshairs if you don't hit anything).

Regarding lighting: This has been tough and involved numerous rewrites trying to find something that looked good, worked "correctly" and didn't take more than 10ms per frame. It is shadow casting (as opposed to light casting) where shadows knock holes in light bitmaps, which are eventually baked into the alpha channel of a black bitmap. A "cheat" that cut the CPU usage by almost a factor of 4 is that all lighting is done at 1/4 scale then scaled up.

@neilmmm: The bullets are pre-rendered bitmaps with a lighting effect, so they look soft and glowy. I also noticed the Gauntlet similarity. I think part of that is the shape is a lot like the ghost, combined with the movement (tile based pathfinding). I'm going to try to get their movement to be less obviously tile based.

@Valaran: The engine is pretty much from scratch but I did incorporate things I learned from the Starcom game.

@sHTif: The tiles are 32x32 pixels, I was thinking about bumping them up to maybe 40x40. There's a limit to how big I can make the visible area due to the cost of the lighting render.

@Voetsjoeba: The key values aren't hard coded so it should be fairly simple to add custom key mapping, I just need to create the UI to do it.

justkevin
October 17th, 2010, 02:45 PM
Nice work, significantly better than your space game.

Thanks, hopefully if the final game is as popular, I'll be happy!


The dynamic lighting/AO is good, it's rare to see dynamic lighting in 2D games actually. I think it would look better if it was a single torchlight effect though, rather than a walking omni light.

How do you mean? Like if the light were a beam as opposed to a circle?


Runs at about 40fps on a Core 2 Duo, you should be able to get it running at 60 on an average Core 2 Duo, even with the lighting.

Any suggestions on performance tips are appreciated! Right now lighting averages about 70% of the cpu cycles, with most of that being copying of bitmaps. The player's own light by itself is almost 40% of the cpu usage.

Gathan
October 17th, 2010, 04:58 PM
I noticed that performance seems to degrade the longer its playing, after a couple of minutes some areas give me around 9 fps.
Might wanna do some profiling and make sure that every things been garbage collected as it should.

rumblesushi
October 17th, 2010, 07:09 PM
Thanks, hopefully if the final game is as popular, I'll be happy!



How do you mean? Like if the light were a beam as opposed to a circle?



Any suggestions on performance tips are appreciated! Right now lighting averages about 70% of the cpu cycles, with most of that being copying of bitmaps. The player's own light by itself is almost 40% of the cpu usage.

Essentially yes Kevin, if the light were a sort of cone rather than beam, I think it would look more atmospheric and "right". The lighting is very impressive, but it does look slightly odd, being a walking omni light, light eminating from all directions etc. Is it supposed to look like he's holding a lamp or?

So the actual light rendering is not a post process at all? Could you give some more details on the lighting process? I'm not an expert on lighting at all, I've implemented some basic gouraud shading in this demo - http://rumblesushi.com/dreamcast.html and that's about it. But I am good with performance, so if you give me some more info I might be able to give some advice.

I quite like the sound of your somewhat hacky lighting actually, especially that it's processed at lower res then upscaled :D I'm sure you can get it running faster though.

TheCanadian
October 17th, 2010, 11:16 PM
You're an expert in humility too ;)

html5 rocks

rumblesushi
October 18th, 2010, 10:34 AM
Flash > HTML5.

Plus, how does speaking frankly on HTML5 have anything to do with humility?

bluemagica
October 18th, 2010, 10:47 AM
that looks awesome really. I don't know if you are already doing it, but in a tiled environment rays can be checked only at the horizontal and vertical boundaries of the tiles instead of checking every few pixels....this can significantly improve performance. Also while casting rays for shadows for a point on the shape of the edge, you can calculate using that point and it's two neighbors on the edge vector giving a pretty realistic effect.

itbkris
October 19th, 2010, 02:15 PM
I really like what you've got here. I was getting over 100 frames per second consistently. One thing i might suggest is making it more difficult to see the walls of the map without being near them.

justkevin
October 19th, 2010, 06:02 PM
Essentially yes Kevin, if the light were a sort of cone rather than beam, I think it would look more atmospheric and "right". The lighting is very impressive, but it does look slightly odd, being a walking omni light, light eminating from all directions etc. Is it supposed to look like he's holding a lamp or?

So the actual light rendering is not a post process at all? Could you give some more details on the lighting process? I'm not an expert on lighting at all, I've implemented some basic gouraud shading in this demo - http://rumblesushi.com/dreamcast.html and that's about it. But I am good with performance, so if you give me some more info I might be able to give some advice.

I quite like the sound of your somewhat hacky lighting actually, especially that it's processed at lower res then upscaled :D I'm sure you can get it running faster though.

My idea was that is was kind of a light mounted on your suit. I may try playing with a combo directional/omni light, although I'm concerned that since the player can turn on a dime (because of mouse looking) it might cause tearing. But it might be worth experimenting on.

The lighting works like this:

The view figures out which lights are potentially relevant.
Every light creates a bitmap where red values equals brightness.
Lights that can cast shadows (small or quick lights like your projectiles don't) check the map for nearby shadow casters. A ShadowCaster erases its shadow from the light. A shadowed light needs to redraw itself only if: its brightness changes, it moves, or a shadow changes (currently not possible).
Finally the lights are copied into the alpha channel of a solid black bitmap.

Yesterday I discovered a significant flaw in the performance-- the player's own light was being drawn full size instead of half sized, so I've fixed that.

justkevin
October 19th, 2010, 11:48 PM
There's a newer version here:

http://lab.wx3.com/darkness/Darkness.html

The main change in this version is I've switched to a larger tile size. You can see less of the map at once, but I think it feels like you're closer to the action.

Other changes:
Some new tile textures.
Performance improvement.
For this test, you don't have grenades. Instead you have non-damaging flares.

From a game play perspective, in addition to letting you see into areas, flares will (eventually) damage and deter monsters.

Let me know what you think, particularly on the scale change.

Valaran
October 19th, 2010, 11:59 PM
Mmm, not sure if its just me, but the movement seems kind of.. stutterish? The FPS remains the same, but the movement feels less smooth than the previous version.

The upscale didnt really change anything for me really, the small version would had worked just aswell. But thats just me. Aside from that, I really like the flare idea.

pradap
October 20th, 2010, 06:25 AM
Regarding lighting: This has been tough and involved numerous rewrites trying to find something that looked good, worked "correctly" and didn't take more than 10ms per frame. It is shadow casting (as opposed to light casting) where shadows knock holes in light bitmaps, which are eventually baked into the alpha channel of a black bitmap. A "cheat" that cut the CPU usage by almost a factor of 4 is that all lighting is done at 1/4 scale then scaled up.The bullets are pre-rendered bitmaps with a lighting effect, so they look soft and glowy. I also noticed the Gauntlet similarity. I think part of that is the shape is a lot like the ghost, combined with the movement (tile based pathfinding). I'm going to try to get their movement to be less obviously tile based.
The engine is pretty much from scratch but I did incorporate things I learned from the Starcom game.The tiles are 32x32 pixels, I was thinking about bumping them up to maybe 40x40. There's a limit to how big I can make the visible area due to the cost of the lighting render:toad::hangover:

justkevin
October 23rd, 2010, 04:43 PM
Essentially yes Kevin, if the light were a sort of cone rather than beam, I think it would look more atmospheric and "right". The lighting is very impressive, but it does look slightly odd, being a walking omni light, light eminating from all directions etc. Is it supposed to look like he's holding a lamp or?

I just tried the light as a more directional flashlight. It actually looks pretty cool, and improves the atmosphere, but at the expense of playability: it's too distracting, especially when you're trying to track a monster close to you:

http://lab.wx3.com/darkness/flashlight/

I think this is a scenario where realism and atmosphere take a backseat to gameplay.

hat do other people think?

TheCanadian
October 24th, 2010, 04:44 AM
I really like the flash light. I think it would make more sense if you couldn't see through walls period.

rumblesushi
October 24th, 2010, 12:23 PM
Honestly I think the flashlight looks a lot better, just as I expected.

I don't find it distracting either. I don't really play 2D games these days, so a kind of walking omni light like your other examples might be commonplace, but I know that in 3D games, you don't get walking omni lights with characters, only flashlights, so that certainly seems more right to me.

I think it looks cooler, improves the atmosphere, and I also think it adds to the playability. Why? Gives you a sense of direction, it's very easy to ascertain which direction you're facing, especially with such a small character.

By the way good job on the performance front. This flashlight demo now runs at a solid 60fps even on a Core 1 Duo. 50% faster than before.

I like the sound of your technique, and your logic seems fine. Obviously it's hard for me to know if it can run even faster without seeing the code, the raw mechanics of the function.

Cheers,
RumbleSushi

TOdorus
October 26th, 2010, 05:27 PM
I think this is a scenario where realism and atmosphere take a backseat to gameplay.

That stupified me a bit. Ever played S.T.A.L.K.E.R? :)

I already got startled a few times playing that demo, as a zombie snuck up on me. Now imagine adding sound. Hearing but not seeing the bastard. You have to track him, while your adrenaline level rises. How is that not atmosphere and gameplay intertwined? It would be really nice if the especially nasty enemies have signature sounds. You'd be scared ****less.

The whole idea of adding lighting effects like this, is not to add light/information, but to add darkness/take away information. The player has to make do with the limited information it's provided with. With respect to gamedesign, an omnilight would be quite a contradictionary design choice.

I'd think about the tradeoffs of using light. Using light could attract the zombies, so while you can see the zombies better, there'll probably be more of them. Or light could slow the zombies down, if you'd using fast zombies in your game.

icleric
October 27th, 2010, 09:59 AM
The lightening system is amazine, I got around 80-100 FPS on a core 2 duo 2.4 MBP.

I like the firing too and the grenades and the explosion animations, didn't really like the monsters though, I guess they should be bigger/thicker.

Good work, can't wait to see the final release!