Java-Gaming.org Hi !
Featured games (83)
games approved by the League of Dukes
Games in Showcase (539)
Games in Android Showcase (133)
games submitted by our members
Games in WIP (603)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: 1 ... 8 9 [10] 11 12 ... 17
  ignore  |  Print  
  [Slick2d] Retro-Pixel Castles > Now on Steam! <  (Read 65892 times)
0 Members and 1 Guest are viewing this topic.
Offline CogWheelz
« Reply #270 - Posted 2014-08-03 20:51:33 »

I really got into your game and made a few things with the editor.
https://www.dropbox.com/s/aow30nc5w7zbgy4/Map%20Data.zip
Offline Rayvolution

« JGO Spiffy Duke »


Medals: 262
Projects: 2
Exp: 1 year


Resident Crazyman


« Reply #271 - Posted 2014-08-03 22:45:21 »

I really got into your game and made a few things with the editor.
https://www.dropbox.com/s/aow30nc5w7zbgy4/Map%20Data.zip

That's a nice little detailed area you got there. Grin

- Raymond "Rayvolution" Doerr.
Retro-Pixel Castles - Survival Sim/Builder/Roguelike!
LIVE-STREAMING DEVELOPMENT: http://www.twitch.tv/SG_Rayvolution
Offline Rayvolution

« JGO Spiffy Duke »


Medals: 262
Projects: 2
Exp: 1 year


Resident Crazyman


« Reply #272 - Posted 2014-08-06 01:48:32 »

The last few days have been well spent working on the new farming and hunger mechanics. As with everything in RPC, farming had a ton of AI work that needed to be done, as well as some behaviors for hunger and starvation!

   In this update, I've added:
- Hunger, they now go home when they need to eat. If they have no home, they scavenge for scraps around or outside of town! Be careful, if you don't get your farms going before your villagers start to starve they may eat all the nearby food, dooming you in the long run!
- New farm building added, can now plant nearby crops and make them a renewable resource to keep your village running strong.
- The farmers will distribute food to all the homes nearby, and tend to the crops automatically. No player intervention required once you have a functional farm going!
- Happiness now is directly affected by hunger, now your villagers happiness will drop when they're hungry, so keep them fed!
- Villagers who's hunger hits zero will slowly starve to death.

   Future farming plans:
- Many various farm building sizes, some small and quick to build, some large and resource intensive to build.
- Food storage building (Like the lumber storage, just for food of course.)
- More plant types! Currently we only have carrots, but that will change eventually.
- Animals/meats, these will be added someday after the core mechanics are all in place. Probably sometime during alpha.
- Farming flowers, for use in future decorative builds.


   Quiet Village Farming


   A little bit of overkill late night farming.


   Some carrots all by themselves.


   A few early development shots from a few days ago.



- Raymond "Rayvolution" Doerr.
Retro-Pixel Castles - Survival Sim/Builder/Roguelike!
LIVE-STREAMING DEVELOPMENT: http://www.twitch.tv/SG_Rayvolution
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Online BurntPizza

« JGO Bitwise Duke »


Medals: 291
Exp: 5 years



« Reply #273 - Posted 2014-08-06 01:52:01 »

For a while I wasn't really sure how large the scope of this project was, but by now I'm definitely buying it as soon as it's out.
Offline lcass
« Reply #274 - Posted 2014-08-07 10:38:08 »

Ray , I need to thank you . Seeing how well this has turned out has given me some inspiration and excitement over my project again. Great work I know this will go well. Its a genius concept put together perfectly.
Offline ClaasJG

Junior Devvie


Medals: 9
Exp: 3 years



« Reply #275 - Posted 2014-08-07 12:00:47 »

[...]
- Hunger, they now go home when they need to eat. If they have no home, they scavenge for scraps around or outside of town! Be careful, if you don't get your farms going before your villagers start to starve they may eat all the nearby food, dooming you in the long run!
[...]

http://en.wikipedia.org/wiki/1972_Andes_flight_disaster#Anthropophagy
I guess those poor guys wouldn't starve halfway between home and lumber storage doing work. Well, I don't know how those villages are organized political, but maybe a king had to flee. Well, would be funny in my opinion Cheesy

ClaaJG

My english has to be tweaked. Please show me my mistakes.
Offline Rayvolution

« JGO Spiffy Duke »


Medals: 262
Projects: 2
Exp: 1 year


Resident Crazyman


« Reply #276 - Posted 2014-08-07 15:48:20 »

Ray , I need to thank you . Seeing how well this has turned out has given me some inspiration and excitement over my project again. Great work I know this will go well. Its a genius concept put together perfectly.

Thanks! Cheesy I hope you do well in your project. Smiley


http://en.wikipedia.org/wiki/1972_Andes_flight_disaster#Anthropophagy
I guess those poor guys wouldn't starve halfway between home and lumber storage doing work. Well, I don't know how those villages are organized political, but maybe a king had to flee. Well, would be funny in my opinion Cheesy

ClaaJG

heh, as the AI is setup now, sometimes they actually do start to starve to death before they make it to a food source. But that's your problem if you made the food hard to access though! Currently, there's two tiers of "being hungry" in the AI:

- The first happens when hunger drops below 20; If they have a home and their home has food, they will stop working and head home to eat. At 20, they should have plenty of time to make it home before starving (in my tests, they usually have a hunger of 14-15 by the time they get home.)

- The second is the starvation mode, that happens when your hunger drops below 10. Usually this only happens if the villager is homeless (no stable food source) or when their home has no food at all. When they get below 10, they refuse to work, and wander aimlessly looking for food. They will pick up any food item on the ground, or harvest naturally-spawned food on the ground. Alternatively, if they're below 10, starving, and then food is finally brought to their home they'll immediately stop searching for food and head home to eat.

..and finally, once their hunger hits 0, they start to lose hit points slowly, and will eventually die.

- Raymond "Rayvolution" Doerr.
Retro-Pixel Castles - Survival Sim/Builder/Roguelike!
LIVE-STREAMING DEVELOPMENT: http://www.twitch.tv/SG_Rayvolution
Online BurntPizza

« JGO Bitwise Duke »


Medals: 291
Exp: 5 years



« Reply #277 - Posted 2014-08-07 16:29:52 »

Nice. Just make sure that it's easy for the player to realize their behavior is due to effects like hunger and stuff, because it can be frustrating when you're playing a game and all of a sudden your factories shut down and you start losing the war effort and you can't figure out why... then before you know it you're being carted off to the guillotine. Duh! The people are hungry!
Offline Rayvolution

« JGO Spiffy Duke »


Medals: 262
Projects: 2
Exp: 1 year


Resident Crazyman


« Reply #278 - Posted 2014-08-07 16:31:22 »

Nice. Just make sure that it's easy for the player to realize their behavior is due to effects like hunger and stuff, because it can be frustrating when you're playing a game and all of a sudden your factories shut down and you start losing the war effort and you can't figure out why... then before you know it you're being carted off to the guillotine. Duh! The people are hungry!

oh, I will. I was going to add floaty "status" icons above their head when something is wrong. Possibly a drumstick if they're hungry, or a "Z" if they're sleepy, something along those lines.

- Raymond "Rayvolution" Doerr.
Retro-Pixel Castles - Survival Sim/Builder/Roguelike!
LIVE-STREAMING DEVELOPMENT: http://www.twitch.tv/SG_Rayvolution
Offline Rayvolution

« JGO Spiffy Duke »


Medals: 262
Projects: 2
Exp: 1 year


Resident Crazyman


« Reply #279 - Posted 2014-08-10 16:53:06 »

I've been mostly working on the GUI in the play mode over the past few days, really polishing it up and adding in all the missing buttons. The great thing about GUI work is it really makes the game shine, although the drawback is the inordinate amount of time it takes to code/draw! But, it's all worth it in the end.

Another feature I've finally added is villager names, there are now over 4,000 first names, and 10,000 last names for the game to pick from when a villager is generated. That's over 40 million combinations! Some of them with hilarious outcomes.

Next up will probably be building mechanics, so our little villagers can actually build objects. We're getting closer and closer to actually calling RPC a "game" every day!

A new villager drop-down pane. You can now see all of your villagers in a simple, easy to view list.


The new bottom Pop Out information pane, that displays statistics for villagers or objects you click on:


..and the whole thing, all together, and also featuring some of the other small changes:

- Raymond "Rayvolution" Doerr.
Retro-Pixel Castles - Survival Sim/Builder/Roguelike!
LIVE-STREAMING DEVELOPMENT: http://www.twitch.tv/SG_Rayvolution
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline Rayvolution

« JGO Spiffy Duke »


Medals: 262
Projects: 2
Exp: 1 year


Resident Crazyman


« Reply #280 - Posted 2014-08-14 16:10:58 »

I've changed gears a bit and decided it was time to overhaul the shadow engine. The game is reaching a point I can start adding several new buildings, terrains, topography and resources, so I decided before I started in on that I should get my new shadow engine concept working since it involves hand drawing shadows for everything in the game. It just makes sense to do it before I have dozens of building and sub-building types in the game. Smiley

So, here it is! The new shadows. The new hard shadows really give the buildings, walls and terrain a bit more pop. It's a lot easier to see the depth ques (Very important for a true top down game!) and personally, I think it gives the game a nice clean and crisp look to it. Enjoy!
 
In-Game shot, featuring the walls and some of the buildings at various stages while the Lumberjacks and Farmers do their work.

   
Inside the map editor, a small mock up of some walls, rocks and trees.

   
A tiny village at the edge of the map.

- Raymond "Rayvolution" Doerr.
Retro-Pixel Castles - Survival Sim/Builder/Roguelike!
LIVE-STREAMING DEVELOPMENT: http://www.twitch.tv/SG_Rayvolution
Offline Longarmx
« Reply #281 - Posted 2014-08-14 17:26:13 »

Do the shadows move as the sun moves across the sky?

Offline seismic

Senior Devvie


Medals: 4
Projects: 1



« Reply #282 - Posted 2014-08-14 17:40:48 »

Looks nice. Can you talk about the shadows a bit more? Is it now shader based or what's the "trick"? Cheesy
Offline Rayvolution

« JGO Spiffy Duke »


Medals: 262
Projects: 2
Exp: 1 year


Resident Crazyman


« Reply #283 - Posted 2014-08-14 19:09:59 »

Do the shadows move as the sun moves across the sky?
Looks nice. Can you talk about the shadows a bit more? Is it now shader based or what's the "trick"? Cheesy

Actually, the new system is just a semi-complex system that detects tiles on the map and renders the correct shadow in it's place to a big FBO, then lowers the alpha level and outputs the FBO to the screen. So in a nutshell, I'm hand drawing the shadows and rendering them to an FBO. Without some kind of height map, there's really no way to get the detail needed to make the shadows realistic looking without just drawing them.

Sadly, they no longer move. It took me a while to settle with what I have now, but I opt'ed for more accurate looking shadows than having moving ones. If I were to make them move I'd of lost a ton of detail during transformation (I'd probably draw them facing down, then warp the bottom left and right corners). But doing that wouldn't allow of nearly as much detail in the end because I pretty much would only have detail on the bottom and top of the shadow, the sides would end up a little strange looking. If I went that route I'd probably re-rewrite the system and just do a proper raycasting system. But I don't think that look would be good for RPC. Tongue

But, they will darken and fade based on time of day. The code is already in place, but I plan on redoing some of my clock code, so I haven't enabled that part yet.

I do have some ideas for a "height map" system though, but I may try that later down the road. If my height map system idea would work. I could get the hard shadows *and* the accuracy I need, and still have them move based on the time of day.. the problem comes from trying to figure out how to render said system extremely quickly, because of all the objects that will cast shadows eventually.

- Raymond "Rayvolution" Doerr.
Retro-Pixel Castles - Survival Sim/Builder/Roguelike!
LIVE-STREAMING DEVELOPMENT: http://www.twitch.tv/SG_Rayvolution
Offline ags1

JGO Wizard


Medals: 75
Projects: 3
Exp: 5 years


Make code not war!


« Reply #284 - Posted 2014-08-14 19:41:32 »

That's a pity.... Those shadows gotta move :-(

Offline Rayvolution

« JGO Spiffy Duke »


Medals: 262
Projects: 2
Exp: 1 year


Resident Crazyman


« Reply #285 - Posted 2014-08-14 20:12:31 »

That's a pity.... Those shadows gotta move :-(

I've been pondering ways to use a height map, I might give it a try. The coding side really isn't that complicated for my idea to work, it's really just a matter of figuring out how to do it quickly. But, many people have been concerned with the shadows no longer moving, maybe I'll push my priorities up a bit and see if I can make it happen.

- Raymond "Rayvolution" Doerr.
Retro-Pixel Castles - Survival Sim/Builder/Roguelike!
LIVE-STREAMING DEVELOPMENT: http://www.twitch.tv/SG_Rayvolution
Online BurntPizza

« JGO Bitwise Duke »


Medals: 291
Exp: 5 years



« Reply #286 - Posted 2014-08-14 20:16:32 »

This looks applicable: http://www.mattgreer.org/articles/dynamic-lighting-and-shadows/
Offline Rayvolution

« JGO Spiffy Duke »


Medals: 262
Projects: 2
Exp: 1 year


Resident Crazyman


« Reply #287 - Posted 2014-08-14 20:28:19 »


Gah, that's very, very, similar to the idea I had in my head. Although his way is actually more complicated than my way needs to be. But the core idea is the same. I was going to use a gray scale height map of the tile, and based on what shade it was (lighter = higher) would tell the code how far out to draw each of the "shadow pixels" in whatever direction the sun is facing. His way seems to pretty much do that. Although his math seems a bit more complicated than it needs to be IMO. but he is accounting for a lot more than I need to, mainly a orthogonal environment.

Still though, bookmarked! Thanks. Wink

With the comments from everyone disappointed that my new shadow system is no longer dynamic, I think I'll go ahead and put forth the time to make it happen sooner than later.

- Raymond "Rayvolution" Doerr.
Retro-Pixel Castles - Survival Sim/Builder/Roguelike!
LIVE-STREAMING DEVELOPMENT: http://www.twitch.tv/SG_Rayvolution
Offline Rayvolution

« JGO Spiffy Duke »


Medals: 262
Projects: 2
Exp: 1 year


Resident Crazyman


« Reply #288 - Posted 2014-08-14 22:58:57 »

..and then suddenly...







..Still in the early phases, but so far so good.

- Raymond "Rayvolution" Doerr.
Retro-Pixel Castles - Survival Sim/Builder/Roguelike!
LIVE-STREAMING DEVELOPMENT: http://www.twitch.tv/SG_Rayvolution
Offline Rayvolution

« JGO Spiffy Duke »


Medals: 262
Projects: 2
Exp: 1 year


Resident Crazyman


« Reply #289 - Posted 2014-08-15 00:15:34 »

and the triple-reply award goes to Rayvolution, to show off the first working version of dynamic hard shadows!

Click to Play


Click to Play

- Raymond "Rayvolution" Doerr.
Retro-Pixel Castles - Survival Sim/Builder/Roguelike!
LIVE-STREAMING DEVELOPMENT: http://www.twitch.tv/SG_Rayvolution
Online BurntPizza

« JGO Bitwise Duke »


Medals: 291
Exp: 5 years



« Reply #290 - Posted 2014-08-15 00:20:59 »

Nice. Did you do something similar to that article or was it something simpler like heightmap and raycasting?
Offline Rayvolution

« JGO Spiffy Duke »


Medals: 262
Projects: 2
Exp: 1 year


Resident Crazyman


« Reply #291 - Posted 2014-08-15 00:33:43 »

Nice. Did you do something similar to that article or was it something simpler like heightmap and raycasting?

I went with my original plan I had before seeing the thread. Tongue

What I did was made a grayscale heightmap of the object I want to cast a shadow, then internal to the shadow class 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 +1, 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 1 pixel 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.

Considering how many times I am rendering and re-rendering slices in a single FBO, I expected it to murder my frame rate, but to my surprise even calling the entire shadow rendering method 4 times per cycle (only normally gets called once) I am still running at 60FPS so far. But, I haven't finished drawing all the shadows. There's a chance it may run a bit too slow once all the shadows are put back in. We'll see I guess.

- Raymond "Rayvolution" Doerr.
Retro-Pixel Castles - Survival Sim/Builder/Roguelike!
LIVE-STREAMING DEVELOPMENT: http://www.twitch.tv/SG_Rayvolution
Online BurntPizza

« JGO Bitwise Duke »


Medals: 291
Exp: 5 years



« Reply #292 - Posted 2014-08-15 00:35:39 »

That's clever at least in it's simplicity, if not efficiency. Whatever works though.
Offline Rayvolution

« JGO Spiffy Duke »


Medals: 262
Projects: 2
Exp: 1 year


Resident Crazyman


« Reply #293 - Posted 2014-08-15 00:42:53 »

That's clever at least in it's simplicity, if not efficiency. Whatever works though.

We'll see if it's really efficient enough once I get all the shadows done. I hope it is, because these results look a lot more natural/realistic than raycasting usually does in 2D games. Smiley

- Raymond "Rayvolution" Doerr.
Retro-Pixel Castles - Survival Sim/Builder/Roguelike!
LIVE-STREAMING DEVELOPMENT: http://www.twitch.tv/SG_Rayvolution
Online BurntPizza

« JGO Bitwise Duke »


Medals: 291
Exp: 5 years



« Reply #294 - Posted 2014-08-15 00:46:27 »

"It’s a bold strategy Cotton. Let’s see if it pays off for him."
Offline nerb
« Reply #295 - Posted 2014-08-15 02:18:25 »

Then, I took those images and rendered them to a FBO, and re-rendered it out by +1, 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 1 pixel 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.

Considering how many times I am rendering and re-rendering slices in a single FBO, I expected it to murder my frame rate, but to my surprise even calling the entire shadow rendering method 4 times per cycle (only normally gets called once) I am still running at 60FPS so far. But, I haven't finished drawing all the shadows. There's a chance it may run a bit too slow once all the shadows are put back in. We'll see I guess.

Ray, I'd be lying if I said I fully understand what you are doing here, so I may be jumping the gun. However instead of re-rendering each slice by the number of pixels it is required to project itself, couldn't you scale the slice by the required amount in the required direction? As such you will only have to render it once (assuming the slice is an individual texture).

I envision that it would be something like:
1) Create a 2d vector in the direction of the sunlight, with the magnitude of the vector related to the time of day.
2) Scale the shadow slice by this vector multiplied by the height of slice.
3) Render.

Does that fit the situation or have I missed the mark?
Offline Rayvolution

« JGO Spiffy Duke »


Medals: 262
Projects: 2
Exp: 1 year


Resident Crazyman


« Reply #296 - Posted 2014-08-15 03:09:14 »

Then, I took those images and rendered them to a FBO, and re-rendered it out by +1, 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 1 pixel 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.

Considering how many times I am rendering and re-rendering slices in a single FBO, I expected it to murder my frame rate, but to my surprise even calling the entire shadow rendering method 4 times per cycle (only normally gets called once) I am still running at 60FPS so far. But, I haven't finished drawing all the shadows. There's a chance it may run a bit too slow once all the shadows are put back in. We'll see I guess.

Ray, I'd be lying if I said I fully understand what you are doing here, so I may be jumping the gun. However instead of re-rendering each slice by the number of pixels it is required to project itself, couldn't you scale the slice by the required amount in the required direction? As such you will only have to render it once (assuming the slice is an individual texture).

I envision that it would be something like:
1) Create a 2d vector in the direction of the sunlight, with the magnitude of the vector related to the time of day.
2) Scale the shadow slice by this vector multiplied by the height of slice.
3) Render.

Does that fit the situation or have I missed the mark?

That sounds similar to something I was going to attempt actually.

The actual problem though is what it'll look like. Since I'm dealing with pixel-art, LWJGL and Slick really suck at using image translations in scaled graphics and keeping them "pixel perfect". Even when you properly scale your graphics, they still allow you to render things "between" the scaled pixels, including transformed images. For whatever reason that just seems to be how LWJGL/Slick do things. So the transformed shadows would end up not looking pixelated like the rest of the scene. That's why I opt'ed for this way.

Here's an example: (I used rotate, but the effect is the same either way)
The dark black shadow is the fake shadow, showing how it would look if I distorted the slice, the left is the current one.

- Raymond "Rayvolution" Doerr.
Retro-Pixel Castles - Survival Sim/Builder/Roguelike!
LIVE-STREAMING DEVELOPMENT: http://www.twitch.tv/SG_Rayvolution
Offline Longarmx
« Reply #297 - Posted 2014-08-15 03:39:31 »

Are you forcing your images to be GL_NEAREST?

Offline Rayvolution

« JGO Spiffy Duke »


Medals: 262
Projects: 2
Exp: 1 year


Resident Crazyman


« Reply #298 - Posted 2014-08-15 04:13:04 »

Are you forcing your images to be GL_NEAREST?

Of course Tongue

- Raymond "Rayvolution" Doerr.
Retro-Pixel Castles - Survival Sim/Builder/Roguelike!
LIVE-STREAMING DEVELOPMENT: http://www.twitch.tv/SG_Rayvolution
Offline Longarmx
« Reply #299 - Posted 2014-08-15 04:15:45 »

Then you should be able to scale your images so that they stay pixelated, unless Slick does something behind the scenes. (Or I just don't understand your problem completely Wink)

Either way, very good work!

Pages: 1 ... 8 9 [10] 11 12 ... 17
  ignore  |  Print  
 
 

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

Mr.CodeIt (10 views)
2014-12-23 03:34:11

rwatson462 (38 views)
2014-12-15 09:26:44

Mr.CodeIt (31 views)
2014-12-14 19:50:38

BurntPizza (62 views)
2014-12-09 22:41:13

BurntPizza (99 views)
2014-12-08 04:46:31

JscottyBieshaar (60 views)
2014-12-05 12:39:02

SHC (74 views)
2014-12-03 16:27:13

CopyableCougar4 (77 views)
2014-11-29 21:32:03

toopeicgaming1999 (138 views)
2014-11-26 15:22:04

toopeicgaming1999 (127 views)
2014-11-26 15:20:36
Resources for WIP games
by kpars
2014-12-18 10:26:14

Understanding relations between setOrigin, setScale and setPosition in libGdx
by mbabuskov
2014-10-09 22:35:00

Definite guide to supporting multiple device resolutions on Android (2014)
by mbabuskov
2014-10-02 22:36:02

List of Learning Resources
by Longor1996
2014-08-16 10:40:00

List of Learning Resources
by SilverTiger
2014-08-05 19:33:27

Resources for WIP games
by CogWheelz
2014-08-01 16:20:17

Resources for WIP games
by CogWheelz
2014-08-01 16:19:50

List of Learning Resources
by SilverTiger
2014-07-31 16:29:50
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!