Not logged inGosu Forums
Forum www.libgosu.org Help Search Register Login
Up Topic Gosu / Gosu Showcase / Throckmorton (coop twin-stick dungeon crawler)
- - By Spooner Date 2012-06-30 01:06 Edited 2012-07-23 17:19
Well, I couldn't think of a name for this new prototype, so it is all about scones for the time being. It WILL change at some point.

GoS is intended as a 1-4-player coop game (yeah, well, it is a long way from being networked!), shown from a top-down perspective, moving with the keyboard and aiming with the mouse. These are completely all placeholder graphics, since I wanted to get knee-deep into coding, and get some working gameplay, before I messed around with assets.

Trying to use some decent lighting effects, but it is hard work in Ruby getting anything less than "blocky". Still, I'm happy with the effect based on my limitations!

* Github project
* Wiki (Includes description of what is currently implemented as well as a todo list)
* TigSource DevLog
Parent - - By jlnr (dev) Date 2012-06-30 09:11
The lighting reminds me of -> http://www.libgosu.org/cgi-bin/mwf/topic_show.pl?tid=708

I wish I had an idea for reducing the block size, I think both games would benefit a lot :)
Parent - By Spooner Date 2012-06-30 10:59
My game requires larger lighting cells because I also take into account line of sight, both in where the light is cast and whether you can _see_ the lit area. This would be impossible in Chase's game, because you have large lit areas during the day (too many LoS calculations) though it might be possible at night, but probably not because of the relatively open areas and multiple light sources that you'd be able to see at distance.

I had an epiphany, late last night, which was to update the lighting at 10fps, rather than 60fps. This saved a significant amount of fps and it didn't make the display worse; if anything it made the changes in brightness less distracting.

And yes, I'm wishing I could use opengl/glew on windows to get shader support, then I could do away with the chunky cells and have pixel-perfect lighting :) I hates windows :P Wish that at least one opengl gem worked!
Parent - - By Spooner Date 2012-07-05 19:57
Oh yes, I would like to have smaller light cells, but I don't really see it as a possibility. As it is, the lighting alone halves the FPS (150 to 70) and it is only updated 10 times a second because doing it at full FPS was crippling. I have some really unoptimised code in there, so I expect I could improve that a fair bit, but I can't see any potential for reducing the cell size (without using C or getting opengl working consistently, of course).
Parent - - By Maverick Date 2012-07-06 04:43
I have an idea for a solution (haven't tested it though). Instead of using one point as the final light color of the tile, allow each tile to have four points (top-left, top-right, bottom-right, and bottom-left). Use neighboring tile points to average them out. Then using Gosu's re-coloring, apply the color. This, in my mind, might be a solution to 1) spread the light out enough to blend smoothly and 2) be a quick solution to such blending.
Parent - - By Spooner Date 2012-07-06 08:49
Well, I have magically found a full-operational opengl gem for Ruby (That is, 1.9.3 compatible and Windows binary gem published). Apparently it is a branch of the old ruby-opengl gem, but that has been actually worked on this decade :D I was implementing a Ruby/Texplay solution only because I couldn't rely on reliably working shaders, which would allow for pixel-perfect ray tracing of light sources.

gem install opengl --pre

However, thanks for your sensible suggestion. I could certainly consider this option if I don't manage to get things working correctly with shaders. Not sure that splitting each tile into 4 cells like that would make enough of a difference really; I think I'd want to split tiles into 16 cells, so at least the lighting and background would be consistent (1:1 lighting cells and pixels). That might be too slow in pure Ruby though!

And while you are there, we should talk about music (though I'm not 100% sure of the setting of this game, beyond "underground caverns")
Parent - - By Maverick Date 2012-07-06 17:59
By using the four-points you could average out the neighboring tile's edges. In my mind, achieving a smoother blend (using DrawQuad as the shadow/light on top of the actual tile?). Haven't tested it like I said but I will soon (for my own games of course!)

Music. Yes. Let's talk. Speaking of caves. I made a little track a while back by the name of "Cave Dwellers".
Parent - By Spooner Date 2012-07-06 19:49
Drawing quads is not really optimal, since you end up darkening the whole screen, then using additive quads to lighten it again. This is fast, but colour information can be lost, so I'm less keen on it. What I'm doing is clearing a full-screen filter with semi-dark, then clearing the pixels you can see with white, then multiplying that onto the scene. This gives the best effect, in my opinion, but you'd need to render one quad per tile to get it to work in the way I wanted it. Admittedly, you could use the corner-colouring of quads to make the overall effect smooth, but I think it would look a bit odd, but that might be more than good enough!
Parent - - By Spooner Date 2012-07-05 10:46
Did quite a bit, but gameplay hasn't moved on a huge amount:

* Level terrain graphics are now created using Simplex noise and is entirely based on a seed number (so levels will be entirely re-creatable). I was forced to make the terrain a lot more blocky so that I could render the necessary images in a reasonable time (Trying to keep level creation < 1s). I actually quite like it like this, since it means that the shadows are very pixellated, the terrain is quite pixellated and the sprites are a bit pixellated. Each time you play, the terrain will be created using a default seed, so it will be the same at the moment (however, objects and enemies are still placed completely randomly at the moment).
* Fullscreen mode: ruby bin\game_of_scones --fullscreen
* Drew some actual sprites. Didn't spend a huge amount of time on them, so don't consider them final, but they make everything look like what they are supposed to be, so that is fine for now :P
* Added a minimap.
* Did a chunk of work on making the game multi-player, but not got far enough for this to actually work yet :D

Example screen

NOTE: If you want to run from the github project, then you'll need to also need to manually compile and install the noise-generator gem from https://github.com/Spooner/ruby-perlin (just needs the standard devkit; there are no additional requirements). I haven't finalised what I want to do with the gem at the moment, since I've sort of barged into someone's existing project :)
Parent - - By jlnr (dev) Date 2012-07-05 11:10
I like it. My problem with most twin-stick shooters is that they look like geometry lessons on drugs. Waiting until the gem is a proper gem (it isn't right now, as I understand it?).
Parent - - By Spooner Date 2012-07-05 11:46
No, I'll sort that out, finally, in the next day or two and push the gem out. It works fine as a gem right now, just not pushed :)

Not sure what you mean by geometry lessons on drugs? You mean the squareness of the maps or the way it looks with all the projectiles shooting around?

At the moment, all the enemies just home in on you, which is the "dumb" twin-stick style, which will definitely be replaced before too long! The archers at least are able to try to maintain optimum firing range though. Oh and with proper physics, enemies don't all just stack up, which is a boon!
Parent - By jlnr (dev) Date 2012-07-06 14:56
To clarify, I am happy that your game does not look like Geometry Wars. I think all the twin-stick shooters I've played on mobile were visual clones of it. :(
- By Spooner Date 2012-07-23 15:39
Right, since I'm using shaders for all my magic (including map-generation and lighting), I don't need to be beholden to the limits of tiles any more. It does mean, however, that I have to completely rethink my physics and pathfinding systems :/ Note that lighting is disabled because the Ashton lighting system is currently a bit glitchy.

Up Topic Gosu / Gosu Showcase / Throckmorton (coop twin-stick dungeon crawler)

Powered by mwForum 2.29.7 © 1999-2015 Markus Wichitill