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

Author Topic: All the King's Men  (Read 12657 times)

0 Members and 1 Guest are viewing this topic.

kpulv

  • Newbie
  • *
  • Posts: 18
    • View Profile
Re: All the King's Men
« Reply #15 on: November 15, 2013, 09:45:20 pm »
I slept on the first night from 4am to 11am, there's a big jump in time in the time lapse around then.  I didn't sleep for the rest of the time.

Nexus

  • SFML Team
  • Hero Member
  • *****
  • Posts: 6286
  • Thor Developer
    • View Profile
    • Bromeon
Re: All the King's Men
« Reply #16 on: November 16, 2013, 01:01:50 pm »
Very funny game! I also like the graphics style. It's not always easy to decide between protection and loot... And the bombs, you always have to sacrifice some poor guys :D

Sometimes it is a bit confusing if guards leave the view, and the view isn't zoomed out. And is it somehow possible to skip the intro? I know it's not that long, but still :)
Zloxx II: action platformer
Thor Library: particle systems, animations, dot products, ...
SFML Game Development:

kpulv

  • Newbie
  • *
  • Posts: 18
    • View Profile
Re: All the King's Men
« Reply #17 on: November 18, 2013, 08:50:07 pm »
Hey thanks for the feedback!  I'm going to make some slight adjustments to the camera and try to put in a way to skip the intro for version 1.1 this week :)

Cpl.Bator

  • Hero Member
  • *****
  • Posts: 540
    • View Profile
Re: All the King's Men
« Reply #18 on: January 31, 2014, 05:56:08 pm »
Very fun !
How do you make the map ?

kpulv

  • Newbie
  • *
  • Posts: 18
    • View Profile
Re: All the King's Men
« Reply #19 on: February 02, 2014, 06:17:51 am »
Thanks!

The map is generated using a list of 2d points.  I start by choosing a random point on the left side of the scene, and then start placing points outward from there.  I basically just keep track of an angle at which the road should be drawn in, and every time I place a point I adjust that angle by a random amount.  I have some safety checks in there, like the road can never go backwards, and the road is too far up or too far down it forces the angle back on track.  When I get a certain distance from the start I stop generating points, and that's the end of the level.

For the decorations and stuff, I just populate the entire map with trees and then remove trees that are a certain distance from each node on the path.  Enemies are then placed randomly in trees near the road, and soldiers are placed along the road every couple of nodes or so.

Does that make sense?

Cpl.Bator

  • Hero Member
  • *****
  • Posts: 540
    • View Profile
Re: All the King's Men
« Reply #20 on: February 02, 2014, 10:34:03 am »
the path generation is easy, yes, but , i've a last a couple of question :D
How dow you generate noise color on the path and the dark grass color along the path border ?

kpulv

  • Newbie
  • *
  • Posts: 18
    • View Profile
Re: All the King's Men
« Reply #21 on: February 08, 2014, 06:56:43 am »
Ah, yeah I use a tile sheet full of images that are used to "paint" the ground along the path.  Making the background goes through passes like this:

1. Draw grass tiles randomly all over the entire map.
2. Draw dark green grass tiles along the path with a very wide spread.  Draw enough to completely cover the path.
3. Draw dark brown dirt tiles along the path with a slightly lower spread.  Draw enough to completely cover the path, but leave a little bit of dark green on the outside.
4. Draw the light brown dirt tiles along the path with a narrow spread.

CJ_COIMBRA

  • Full Member
  • ***
  • Posts: 112
    • ICQ Messenger - 13077864
    • View Profile
    • http://www.cjcoimbra.com
    • Email
Re: All the King's Men
« Reply #22 on: February 11, 2014, 08:24:04 pm »
Nice visuals and it´s also very fun! Congrats
CJ

Cadisol87

  • Full Member
  • ***
  • Posts: 129
  • C++ Programmer
    • View Profile
Re: All the King's Men
« Reply #23 on: February 14, 2014, 06:07:32 pm »
Hmm nice work!

I especially like the artwork of the game  :)