Not logged inGosu Forums
Forum back to Help Search Register Login
Up Topic Gosu / Gosu Showcase / Nebular Demo - Feedback Please.
- - By moriarty Date 2013-01-07 04:22
I spent the weekend creating the following demo/game. I'm currently using Ruby 1.9.3, Gosu, and Chingu.

I would enjoy creating a  2d space/trader/combat like

Any ideas or experiences making something similar would be much appreciated.


Parent - - By Spooner Date 2013-01-07 23:40
FPS seems quite low. I'd recommend only updating the caption bar once per second or using a Font#draw at the top of the screen. I am amazed how expensive the bar update is!

350 objects seems a lot for Chingu to manage. For dense particle effects, I'd highly recommend looking at my Ashton gem rather than manage your particles in Ruby, which is crazy-slow - just use the latest version on github rather than the old --pre release (yeah, I know I really need to sort that out). Obviously the bullets themselves would need to be objects, but the various trails are better as dumb particles.

You might want to look at Chipmunk for managing your physics and collision detection; again, something that is relatively slow in Chingu (but fine for simple games without a lot of simultaneous objects to collide).

Not sure how you are managing the radar (closed source is evil :D), but if you are drawing sprites, pixel editing with TexPlay or an Ashton::Texture would probably manage it faster for you (assuming you are happy with coloured pixels rather than full sprites).

Other than that, don't see any reason why you can't expand it into a game as you reference, or something like SPAZ. Good luck!
Parent - - By moriarty Date 2013-01-09 10:16
Thanks Spooner.

I do need to find a more efficient way to manage particles. I'm looking into Ashton right now.

The radar is just some draw rects. I could cache the radar and update it periodically.

I really need to profile the loop to work out what optimisations I need to prioritise.
Parent - By Spooner Date 2013-01-09 10:26
Yeah, caching the radar would make sense (with Ashton::Texture#render) as would directly writing pixels in TexPlay (Gosu::Image#set_pixel x, y, color: whatever)
Parent - - By jlnr (dev) Date 2013-01-08 10:48
I think a game like this depends a lot on immersing the player into the environment (space), maybe this helps -

Parallaxing the nebula would look good IMHO, and you could add lighting to the ships. E.g. a coloured light source might make an impression on ships passing by as in this wallpaper (red light source):
Parent - - By moriarty Date 2013-01-09 10:20
Thanks jlnr.

Parallaxing the nebula is a great idea.

I'll look into the light source idea.

I believe I could do it for a 3d game but I'm not so sure  with 2d. Would I need some sort of light/height map for my sprites?
Parent - - By jlnr (dev) Date 2013-01-09 11:41
There are many ways to do it. For example, you could add a second, mostly transparent image to each spaceship that only contains white areas where the starship is reflective. Then usually you draw this image with a colour modifier of transparent white (0x00_ffffff) but as you get closer to light sources, you slowly increase the opacity of the image and adjust its RGB values. Or you can even give each corner of the overlay image a different colour modifier if you draw it with Image#draw_as_rect.

Or you could use Ashton and shaders to colour the starships. I'm sure there are many creative ways of doing it with shaders alone ... :)

Or you could even use a 3D model indeed and draw it using a gl block.
Parent - By Spooner Date 2013-01-09 23:31 Edited 2013-01-09 23:37
Yeah, you could additively draw a semi-transparent disc with Ashton's stencil shader, so you only draw the glow directly over the ship underneath (it would look bad if you also lit up the background).

EDIT: But I'd worry about gameplay and overall fun a long time before worrying about spiffy lighting effects.
Parent - - By BlueScope Date 2013-01-09 12:25
Other than the scrollable parallax jlnr already mentioned, I'd say make the ships a bit more plastic. Now going 3D for this might be overshooting it, but you might be able to get away pretty beautifully with a 3-frame animation for leaning in a certain direction, or something along the lines of the space graphics in this article, which is also just a fraction of the work a real 3D engine would take. Either way will inject life into your game, and while not necessarily making it more juicy, it will make it seem 'more flawless' - yay for term invention :D

Then, the trail - as impressive as it is - seems off. Maybe it's too long, or the gradient curve isn't right, but it just seems like it'd need to be less apparent than it currently is... well, to me - anyone else? ^^"

Also, from a graphic designer's point of view, I have to add that personally, the saturation seems way too high. Maybe it's personal preferrence only, but if I play a space game, I want everything but 'suns' to be cold, color-wise distant and pale. That would also help with some highlights such as lighting on the ship that could be more saturated in contrast.
Either way, use your own judgement by all means - just giving input :)
Parent - - By jlnr (dev) Date 2013-01-10 06:45
I have tried to fake a little 3D in 2D in a one-off space shooter, including stacking 2D graphics with a direction:

You can actually see it on the screenshot, the two ships are both composed from the same two 2D Gosu::Images with a little offset and rotation. It looks 3D-ish in action.
Parent - By BlueScope Date 2013-01-11 11:44
That's also a very cool solution! :D It's really interesting what just 2 images with a grain of imagination are capable of.
Parent - By moriarty Date 2013-01-12 09:09
Thanks for the feedback BlueScope. I couldn't agree more.

I'm more of a "plumber" than a "painter" so the aesthetics are always difficult for me.
Up Topic Gosu / Gosu Showcase / Nebular Demo - Feedback Please.

Powered by mwForum 2.29.7 © 1999-2015 Markus Wichitill