I’ve just got this project to the point where it looks interesting, so I decided to post a demo. There’s no game play as yet, but feel free to explore the colony. The atmosphere is benign so you won’t need a hazard suit.
It’s really trippy with the line of sight stuff
Looks really nice!
One note:
The corners of rooms often flickers a bit when you move towards/away from them
Looks pretty good! I assume the corner flickering is so you can see where you’re going? It’s a bit jarring, perhaps just make them 10% opaque instead?
The line of sight is fairly buggy still, it’s pretty much only about a dozen lines of code. It will probably take a lot of tweaking to get it looking right. I will possibly change it to a geometry based system with straight lines instead of per-tile visibility at some point, but for now it functions well enough to carry on with developing the more important parts of the game.
It looks really cool, nice work!
I would recommend adding support for multiple directions though, if this is going to be an action game, you should add some multi-directional movement. Right now it feels kinda limited. (Are you using [icode]while(Keyboard.next()){/…Is key down stuffs/}[/icode]?)
EDIT: Did you make those textures? Are they what the game is going to look like? They look really slick, but change the dirt texture to something really washed out. Like a grayish-dirt, or even gravel would work in this case.
For anyone who’s already played, I’ve just updated the jar with a better version of line of sight, no more glitchy walls, and when youre standing behind a wall it becomes transparent so you can see whats behind it.
The player will be able to move in 8 directions, didn’t get to doing that yet. The textures are parts of images from google, but I messed around with them a lot to turn them into usable tiles. I think the dirt texture is from mars. I had to remove some bigger rocks from it already to make it less repetitive looking but I will gradually replace all the art as I go, once I develop a particular design aesthetic for the architecture.
Keep in mind that most of the code so far is just various things hacked together to prototype concepts for the game.
Line of sight is indeed very trippy haha : I suggest, like CptSpike said, make it a bit opaque, but only for places that you’ve been before, and maybe use some gradient so it looks smooth.
Another thing is, if you want to make smooth movement and fade-ins/fade-outs/smooth transitions, try looking at TweenEngine, it made my life a lot easier and will probably make yours too ;D
(Starcraft 1 fog of war)
Thanks for the comments. I’ve decided to alter the line of sight to be geometry based rather than per-tile since its just not smooth enough. Hopefully that won’t be too difficult, and will also provide me with lighting. Then i can get back to the main task of designing the sand box like rpg game play.
Exactly what im trying to accomplish with my game haha xD For geometry based, try looking at Box2DLights and its source (thats what i used in my game)
I’ve been tweaking the line of sight a little bit (no demo on that yet). It might help if I make the visible walls be drawn on the screen (probably as wall tiles), but any other suggestions would be welcome. I wasn’t planning on doing this so I havn’t had enough time to actually think about the bigger picture of it XD
Updated OP download link.
Next thing is to work on some lighting, I’m not quite happy with being able to see areas which aren’t in your line of sight and which might have no light… If it is a stormy dark night, or you are in an area where the lights are broken, the parts you can’t see shouldn’t be brighter than the parts that are within your line of sight.
Any ideas how to tackle that? When I just black out everything not in your line of sight completely, as in the previous post, it has a weird 3d look to it as if you are standing among extremely tall buildings.
You could blur the shadows.
I’m not sure how you render things at the moment, but you could draw the shadows to an FBO, and then blur it when rendering onto the main framebuffer.
Updated Download Link.
I’ve re-written the code that generates the model used by the ray caster, it now allows you to see the walls which are within your line of sight. I’ve also gone back to completely obscuring everything which is blocked by walls, using a dark texture to reduce the sky scraper effect. I’m really happy with the effect of that as it allows you to explore and find unexpected things and places as equally as to miss things if you are running past something too fast.
(the screenshot is taken in the same area of the map as the previous one, for comparison)
I’m sure this would be rather tedious to code, but I think what would really sell the effect is if just the edge of the wall closer to you was visible (rather than the full tile, if I’m understanding how it works currently). Additionally, the edge of the wall could fade into the texture of the ray. Just a few ambitious ideas
That may actually be very simple! It generates a bit mask for every tile every frame according to view angle, so if I use that for selecting which wall sprite to draw I would only need to fade the original tile set. Hopefully that would reduce the effect of walls flicking on and off as you move around them too.
Today I learned how to use shaders.
PeYg6tCu9uI
Looks great, keep up the good job!
I’ve turned my game into a rave party.
w03-oAEilyE
Great job on the lighting! It looks really amazing!
Love the lighting! What are you using to make this? LibGDX?