• Register

Retro-Pixel Castles is a brutal village/town simulator with RPG and roguelike elements. Some Key Features: You CAN'T win! Yeah, that's right. Not being able to win is a feature! Survival. In Castles, you'll find yourself in a harsh and unforgiving environment, constantly trying to find new ways to keep your little villagers alive for just a few more days. Build a village... A major part of the game is village management, and trying to discover new ways to keep yourself alive as long as possible. Huge, hand crafted maps! Each map is 512x512 tiles wide, leaving tons of space to play on. Built-in map editor. Included in the game engine itself is a very robust, feature filled map editor. The game will be released completely DRM free, and all content created for the game will come with your initial purchase. There will be absolutely no paid DLC and tons of free content patches! (See www.retropixelcastles.com for more details!)

Post news Report RSS ..by popular demand, dynamic hard shadows!

After the feedback from some of the RPC fans here and around the web about how they were disappointed that the new hard shadows were no longer dynamic, I decided to rearrange my coding priorities and put dynamic hard shadows on the top of the list!

Posted by on

After the feedback from some of the RPC fans here and around the web about how they were disappointed that the new hard shadows were no longer dynamic, I decided to rearrange my coding priorities and put dynamic hard shadows on the top of the list!

..so, by popular demand, I bring you; dynamic soft shadows!

Thanks for the input! I'm really happy with the results. :)

Go shadows go!


Shadow angles at various times of day.

Dynamic shadows demo. Dynamic shadows demo.

Dynamic shadows demo.

Comments
doppl3r
doppl3r

This looks excellent!

Reply Good karma Bad karma+3 votes
Rayvolution Author
Rayvolution

They look a lot better in the game too, it's hard to capture the full effect in a short gif. :)

Reply Good karma+3 votes
ManuelCP
ManuelCP

:D

Reply Good karma Bad karma+3 votes
Alitron
Alitron

Are the shadows generated during runtime and on point?

Reply Good karma Bad karma+1 vote
Rayvolution Author
Rayvolution

What I did was made a grayscale heightmap of the object I want to cast a shadow, then internal to the shadow .class/code I have a shadow builder that reads the map and splits up the various parts of the shadow (based on color on the grayscale) into separate images (kinda like slices of the building).

Then, I took those images and rendered them to a FBO, and re-rendered it out by +- a fraction of a number (float), for as many times as that slice required in whatever direction they were being told to go. For example, if slice 10 was rendering, it would render itself 10 times each time moving out in whatever direction it was told to based on the time of day. Where as slice 5 would only "move out" 5 times. Slice 15, 15 times, and so forth. So what happens is the higher number slices (or the slices generated from the brighter colors on the height map) would push out longer distances.

You would think doing it this way would be slow, since there are much faster methods for generating shadows (Like raycasting for example). But, because the resolution of these shadows are very low, I can take the performance hit to obtain extremely accurate shadows and the game still runs at a solid 60FPS on most machines.

Here's a link to the Lumber Mill's heightmap if you're curious:
Sixtygig.com

Reply Good karma+1 vote
Post a comment
Sign in or join with:

Only registered members can share their thoughts. So come on! Join the community today (totally free - or sign in with your social account on the right) and join in the conversation.

Follow Report Profile
Icon
Retro-Pixel Castles
Platforms
Windows, Mac, Linux
Creator
Rayvolution
Engine
Custom
Contact
Send Message
Release date
Game watch
Follow
Purchase
News
Browse
News
New
Post news
Report
Report
Share
Related Games
Retro-Pixel Castles
Retro-Pixel Castles Real Time Strategy