Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length

 
Advanced search

1390791 Posts in 66796 Topics- by 59536 Members - Latest Member: boruok

April 16, 2021, 10:18:27 AM

Need hosting? Check out Digital Ocean
(more details in this thread)
TIGSource ForumsCommunityDevLogs♜ Kingdom ♜
Pages: 1 2 3 [4] 5 6 7
Print
Author Topic: ♜ Kingdom ♜  (Read 63152 times)
noio
Level 1
*



View Profile WWW
« Reply #60 on: May 27, 2015, 07:06:10 AM »

Working on a new "HUD" displaying the only thing you need to keep track of in Kingdom: coins. Totally inspired by Pike'n Shot's cool health bar.

« Last Edit: May 27, 2015, 08:09:33 AM by noio » Logged


Check out twitter @noionl for regular updates
chriswearly
Level 3
***


prince slugcat


View Profile
« Reply #61 on: May 27, 2015, 08:15:40 AM »


On another note, doing some combinatorial banners. I might take a few requests for emblems, so shout out!  ..
You a fan of the Rain World dev? Here's a lizard :D  

with dark body:
Logged

lagdog
Level 0
**



View Profile
« Reply #62 on: May 27, 2015, 01:02:05 PM »

looking great, one of my fave browser games in a while: )
how do the coins leave the sack when spent?  some sparkle or glow fx for them could make them look more shiny and valuable

Logged

Igor Sandman
Level 0
***


Pixel Artist and Game dev


View Profile WWW
« Reply #63 on: May 27, 2015, 01:25:54 PM »

Very moody! You're doing agood job at keeping things animated like water and what not.
Also, I really enjoyed reading how you made your arrows on first page. Really interesting!
Keep it up!
Logged

noio
Level 1
*



View Profile WWW
« Reply #64 on: May 28, 2015, 01:18:19 AM »

how do the coins leave the sack when spent?  some sparkle or glow fx for them could make them look more shiny and valuable

iteratin'

Logged


Check out twitter @noionl for regular updates
pixeye
Level 1
*


You have my mace


View Profile WWW
« Reply #65 on: May 28, 2015, 01:53:17 AM »

Lovely setting, art and mushrooms in the logo pic on the first page : )
Logged

noio
Level 1
*



View Profile WWW
« Reply #66 on: May 28, 2015, 01:58:24 AM »

Here's a lizard :D  


Thanks! Here you go! Did a few tweaks.

Logged


Check out twitter @noionl for regular updates
chriswearly
Level 3
***


prince slugcat


View Profile
« Reply #67 on: May 28, 2015, 02:02:41 AM »

Here's a lizard :D  


Thanks! Here you go! Did a few tweaks.


Aw killer dude! I'll tweet the Devs, they'll be thrilled :D
Logged

and
Level 6
*



View Profile WWW
« Reply #68 on: June 01, 2015, 01:09:40 AM »

iteratin'



Yeah this looks awesome
Logged

Silbereisen
Overlord
Administrator
Level 10
******


eurovision winner 2014


View Profile
« Reply #69 on: June 01, 2015, 01:21:55 AM »

looks good, but the coins look slightly too "bouncey" to me

also  hi, i like the original flash version of this, looking forward to the sequel.  Smiley
Logged

noio
Level 1
*



View Profile WWW
« Reply #70 on: June 05, 2015, 07:01:23 AM »

I've been working on these statues that you can find, clean, paint, and worship for good luck.

Logged


Check out twitter @noionl for regular updates
Greipur
Level 6
*



View Profile WWW
« Reply #71 on: June 05, 2015, 07:07:00 AM »

I've been working on these statues that you can find, clean, paint, and worship for good luck.

Looking good. I assume you mean mechanically and not that the player can be creative? It would be neat with the latter. Wink
« Last Edit: June 05, 2015, 07:25:34 AM by Greipur » Logged

noio
Level 1
*



View Profile WWW
« Reply #72 on: June 14, 2015, 05:12:51 AM »

A little side-by-side

   
Logged


Check out twitter @noionl for regular updates
ernanir
Level 2
**


Hello World


View Profile WWW
« Reply #73 on: June 14, 2015, 06:09:03 AM »

A little side-by-side

   

You accomplished so much atmosphere with those pixel, I can only imagine how immersive this will be when you put the sound there Smiley

Keep it up
Logged

Bluebutton
Level 1
*



View Profile WWW
« Reply #74 on: June 14, 2015, 10:33:23 AM »

Great sense of atmosphere, great artwork. Can't wait to play it.
Logged

Bahototh
Level 1
*


Design, Pixels & Art


View Profile WWW
« Reply #75 on: June 14, 2015, 11:01:53 AM »

Oh yeah! Drooling over the pixel art.
This has THE look I've been wanting from games. Seems a lot of you guys like it too.
It's the time for cool looking 2D games for sure.
Logged

-----------------------------------------------------
"An artist cannot fail; it is a success to be one." ~Charles Horton Cooley
---------------------------------------------------
[Thy Sword] https://forums.tigsource.com/index.php?topic=48380.0
noio
Level 1
*



View Profile WWW
« Reply #76 on: June 16, 2015, 08:23:52 AM »

Last few days I've been having a very specific issue with using Unity's Surface shader for lighting sprites. I think their default example "Sprites-Diffuse" is actually bugged. It did mean I had to rewrite the main shader in the game (called PowerSprite) to not use surface shaders. I've done that now but the shader is a mess and I think I should clean it up. Not using Surface also has the advantage that I can optimise away some unused features like Lightmapping, Shadows and Fog.

EDIT: Image because why not. It shows me trying to duplicate the previous lighting (top castle) in the new shader (bottom castle).. So that seems to work now. And I managed to insert the Half Texel Offset on D3D so it's all looking good! Now I just have to clean up the big mess I made.

« Last Edit: June 16, 2015, 11:19:02 PM by noio » Logged


Check out twitter @noionl for regular updates
noio
Level 1
*



View Profile WWW
« Reply #77 on: June 22, 2015, 12:26:48 AM »

Hi everyone! I was prompted to write one of these more thorough explainy posts by a question on the Unity3D subreddit...

Sprites and Color Replacement

I'll talk about solving two issues:

  • Recoloring parts of a pixel art sprite dynamically
  • Replacing entire sprite sheets in an animation


Sprites with varied colors.

In Kingdom, both the citizens and the player can have different outfit and skin color variations. I'd like to avoid drawing sprites manually for each variation. And since each sprite has multiple dynamic colors (e.g. skin and clothes color), drawing sprites for the combinations of these is just not feasible at all. One option would be to use white/uncolored sprites, split those out into layers, one for skin, one for clothes, and a regular sprite. Then, using the SpriteRenderer's "Color" property we could recolor each of these layers. The downside of that method is that we have to animate each of those layers separately, which could turn out to be a hassle.

Recoloring
So instead, I decided to recolor the sprites using a shader. The primary idea here is that we can use the alpha channel to store information about which part of the sprites are recolorable. This means we lose some of the information that the alpha channel usually confers, but most of my sprites are 100% opaque or 100% transparent anyway.

So, we use a special alpha value to indicate that a pixels should be recolored. To avoid having to check for precise floating point equality, I decided to use intervals of the alpha value.



Now in the Fragment shader, we output the "new color" value given by a shader property if the alpha falls in either of these ranges.

Code: (c)
void surf (Input IN, inout SurfaceOutput o)
fixed4 c = tex2D(_MainTex, IN.uv_MainTex) * IN.color;
#if defined(RECOLOR_ON)
o.Albedo = lerp(_RecolorB.rgb, _RecolorA.rgb, step(0.75f, c.a)) * c.r;
o.Albedo = lerp(o.Albedo, c.rgb, step(0.875f, c.a));
o.Alpha = step(0.5f, c.a);
o.Albedo *= o.Alpha;
#else
o.Albedo = c.rgb ; // * c.a;
o.Alpha = c.a;
#endif
// ...

The two lines with the "lerp" are the lines doing the work. step outputs 1 or 0 depending on if the alpha value is above or below 0.75. This determines which color is used. Then another similar line inserts the original sprite color if the alpha is above 7/8ths (0.875). Additionally, the inserted color is multiplied by the value of the red channel. This allows us to store brightness information in the red channel, so that a recolored pixel can still have its brightness modulated. You can see the effect of this in the screenshot above, where the outfits have darker parts in a matching tint.

Finally, the alpha value is thresholded at 0.5, effectively discarding any semi-transparency information, and just returning either fully opaque or fully transparent pixels. This is the cost of storing other information in the alpha channel. Of course, I could have been more efficient with the alpha information, but at the moment I don't need pixels that are both semi-transparent and recolored.

Asset workflow
Now you might think that these values (6/8, 7/8) seem a bit arbitrary. They are, but they were chosen to make the workflow of generating sprites with these special values a little easier. I chose to use fractions of 8 because hex colors are fractions of 16*16. Long story short, by using alpha values of 0xE0, 0xC0 and 0xA0 I am sure that they fall right in the middle of those 1/8th intervals. I just found out I'm probably doing the math wrong, but it doesn't matter as long as the alpha values are somewhere in the interval.

In PyxelEdit, I just draw with specific skin and clothes colors, and then replace those using a little script before importing into unity:


Convert to special alpha values. Note the transparency.

Code: (bash)
#!/usr/bin/env bash
# Cloth colors
mogrify -channel RGA -fill "#FFFFFFD0" -opaque "#567271FF" "[email protected]"
mogrify -channel RGA -fill "#AAAAAAD0" -opaque "#394b4aFF" "[email protected]"
# Skin colors
mogrify -channel RA -fill "#FFFFFFB0" -opaque "#edbebfFF" "[email protected]"
mogrify -channel RA -fill "#CCCCCCB0" -opaque "#bd9898FF" "[email protected]"

Part 2: Replacing an entire sprite sheet

Another way to vary sprites is to replace a sprite sheet entirely. This means generating new animations for the alternative sprite sheet. I had already decided to just duplicate the Animator Controller for each sprite variation, in this case, the Queen and the King.



Duplicating the Animator and replacing the animations in the "motion" field for each state is not too hard. The problem is generating all these duplicate animations, they are exact matches of the regular animations. My sprites are named systematically, I just need a way to copy the animations and replace the "sprite" field of each keyframe. So I wrote a 'little' editor script for that. For each sprite keyframe, it looks up a sprite with a word replaced, and inserts that.


And that's it. That was a lot shorter than I thought it would be, so if you have any questions, please ask.
Logged


Check out twitter @noionl for regular updates
Biggerplay
Level 0
***


View Profile
« Reply #78 on: June 23, 2015, 05:25:49 AM »

Really like how you have given the pixel art a natural look, not easy to do.
Logged
ThilDuncan
Level 0
***


Indie Developer at Ghost Town Games


View Profile WWW
« Reply #79 on: June 23, 2015, 05:52:13 AM »

Really liking the muted palette of your game, gives it a real natural earthy feel which seems to fit the setting really nicely. Great work :D
Logged

Pages: 1 2 3 [4] 5 6 7
Print
Jump to:  

Theme orange-lt created by panic