Sign in to follow this  
  • entries
    162
  • comments
    262
  • views
    166985

Night Scene

Sign in to follow this  
OrangyTang

437 views

I quite like using the same few sprites for these graphics tests - it gives a certain continuity and shows how much you can get from the same source art. [grin] This time thought I've actually drawn a moon specially for this scene (gasp!)

Other than creating the test scene it's pretty much the same as before. Variables for the light position/intensity have moved into uniforms so they're changable from code, but I'm not worrying too much about the few constants and arbitrary scale factors yet as without a proper game behind it I don't know which needs to be tweekable and which can remain hardcoded.



Other than being fun and quite interesting, these graphics tests are also helping me design my new graphics renderer. My requirements for a 2d renderer are quite different from a regular 2d 'engine', or indeed a fancy 3d renderer. Most 2d OpenGL renderers attempt to emulate old-school blitting APIs, and so while they're fast and easy to use they don't really take full advantage of the graphics card. 3d renderers on the other hand tend to favor an explicit feature set which is very tweekable.

I'm after something different - I've got a whole bunch of games all running off the same codebase, and I like to do something different with each ones. Doing this like a traditional 3d engine would result in a massive, complicated renderer with all sorts of effects built in - but each game is only using a one or two effects each, so theres a lot of unwanted complexity and baggage.

What I'd like is a collection of parts which I can quickly snap together to create a custom renderer really quickly. They've got to work well with each other, but they've also got to make adding small custom chunks of code easy so that new effects can be added. In return I'm willing to sacrifice a certain amount of performance - more specifically, I'm not going to worry too much about CPU usage or raw geometry throughput. CPU doesn't matter too much because 2d games always tend to have plenty of cycles to spare. Geometry throughput doesn't matter too much because I'm always fill-limited (practically everything in a 2d game has to be blended in some way and it all adds up).

I'm still juggling ideas in my head, and I suspect I will be for at least another couple of weeks before things start to solidify. In particular I've got to figure out where to draw the line between geometry state and effect state, and whether I'm going to make multi-pass drawing built-in and handled for you or whether you'll have to manage it explicityly yourself (which is going to be a classic ease-of-use vs. customability trade off I think).
Sign in to follow this  


5 Comments


Recommended Comments

That looks really nice. I was wondering how well the backlit affect would look in an actual scene, but the clouds and the tree look good with that effect.

However I've been wondering lately as I tinker around with my (woefully incomplete) 2D engine exactly how many fancy effects I need. One of the things that 2D does very well is to present a simple abstract representation of the current game state, one which people can intuitively get a grasp of with low-level visual processing. That's why twitch games such as Tetris and shmups work so well in 2D and not in 3D; a good player will understand the game state at subconscious level.

The problem I see if that this only works if you design your 2D game to be easily parsed by low-level vision techniques - making important elements stand out and be instinctively recognised. I fear that if you put too much gee-whiz graphical effects into the background of the game it will distract from the foreground, the bit that the player's subconscious needs to understand.

Not sure how much sense that makes. It's something I'd like to experiment with myself once my 2D engine reaches the point where I can easily set up tests.

Share this comment


Link to comment
Making important elements stand out can be tricky - I've played lots of platformers and shooters where you couldn't easily tell if a bit of wall was just background decoration or something solid you could interact with.

You can of course use funky effects to make it more obvious - the new Worms game on the PSP has fancy 3d backgrounds behind the traditional worms landscape, but they blur the background. It's really effective - you get a good looking background but the cheap depth of field clearly shows whats important and what isn't.

I'm also going to pick on Stompy here (sorry!), the latest entry looks great IMHO, but because the backgrounds all use the same colours as the foreground I can't tell which is which. What I like to do is use a different set of colours for the background - either darker or colder than the foreground seems to work quite nicely.

Share this comment


Link to comment
Yes - approriate colouring schemes is something I've been playing around with recently with some mock-ups for game ideas for 2D platformers. I'm leaning toward avoiding sharp differences in contrast and general pastel colours for the background, with thick cartoony borders and bright saturated colours for the foreground.

But one thing I can't emulate my Inkscape mock-ups is the effect of animation - I'm not sure if having an overly animated background would be too distracting for the player. Most of the 2D games I play don't do much animation in the background, but given that my collection of 2D games are pretty old that's also due to the hardware constraints at the time.

It's something I'd have to experiment with once I get to that stage, but I was wondering given you've been playing around with advanced effects for 2D whether you'd noticed any background effects to be distracting when animated.

Share this comment


Link to comment
Quote:
Original post by Trapper Zoid
Yes - approriate colouring schemes is something I've been playing around with recently with some mock-ups for game ideas for 2D platformers. I'm leaning toward avoiding sharp differences in contrast and general pastel colours for the background, with thick cartoony borders and bright saturated colours for the foreground.

That sounds cool. [grin]

I did find that the clouds were too distracting when I had them moving across the screen. However I changed it to a much slower pace and it's much better. Just fast enough to give the impression of movement without remaining static all the time.

Share this comment


Link to comment
That looks amazing! Be sure to post some code as to generate both maps per sprite. I'm mighty interested in this technique.

One small note: perhaps letting more light scatter through clouds would yield more realistic results, I dunno. I do believe you already changed the alpha a bit for the clouds and the player sprite, so that's probably no biggie :-).

Anyway, keep it up!

Share this comment


Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now