Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 28 29 [30] 31

Author Topic: Proceedurally Generated RTS  (Read 56980 times)

Akhier the Dragon hearted

  • Bay Watcher
  • I'm a Dragon, Roar
    • View Profile
    • My YouTube Channel
Re: Proceedurally Generated RTS
« Reply #435 on: July 14, 2011, 11:13:15 am »

   So far it looks good. Just one thing though, turret hubs
should probably have a part of the cost required up front
as right now its to easy to use them to bait the enemy
ships around because they get destroyed quick enough not
to hardly cost anything.
Logged
Quote
Join us. The crazy is at a perfect temperature today.
So it seems I accidentally put my canteen in my wheelbarrow and didn't notice... and then I got really thirsty... so right before going to sleep I go to take a swig from my canteen and... end up snorting a line of low-grade meth.

Draco18s

  • Bay Watcher
    • View Profile
Re: Proceedurally Generated RTS
« Reply #436 on: July 14, 2011, 11:22:31 am »

   So far it looks good. Just one thing though, turret hubs
should probably have a part of the cost required up front
as right now its to easy to use them to bait the enemy
ships around because they get destroyed quick enough not
to hardly cost anything.

Good point.

* Draco18s checks code

Uh.  You are spending a crystal every time you do that.
« Last Edit: July 14, 2011, 11:26:03 am by Draco18s »
Logged

Akhier the Dragon hearted

  • Bay Watcher
  • I'm a Dragon, Roar
    • View Profile
    • My YouTube Channel
Re: Proceedurally Generated RTS
« Reply #437 on: July 14, 2011, 04:28:07 pm »

Huh, I did not notice the crystal use...

Edit: I think I know why I did not notice it.
I was using turret spam as my method of
choice. Crystals tend to pile up if you are
not actively building ships. I would like to
adjust my suggestion. Instead of having a
higher start up cost make it so you can't
just troll the enemy base with turret. Just
one turret nest can take a number of ships
and you can build them anywhere.
« Last Edit: July 14, 2011, 04:39:52 pm by Akhier the Dragon hearted »
Logged
Quote
Join us. The crazy is at a perfect temperature today.
So it seems I accidentally put my canteen in my wheelbarrow and didn't notice... and then I got really thirsty... so right before going to sleep I go to take a swig from my canteen and... end up snorting a line of low-grade meth.

Draco18s

  • Bay Watcher
    • View Profile
Re: Proceedurally Generated RTS
« Reply #438 on: July 14, 2011, 04:46:21 pm »

Huh, I did not notice the crystal use...

Just
one turret nest can take a number of ships
and you can build them anywhere.

Yeah, I'm trying to work out what the reasonable limit on placing turrets should be.  You shouldn't be able to place a turret hub "just anywhere" it'd have to be connected into your "power network" at it were1, I just haven't worked out what that network is, how it is extended, and such.

1See: Perimeter, Creeper World, and The Space Game: Missions
Logged

Aklyon

  • Bay Watcher
  • Fate~
    • View Profile
Re: Proceedurally Generated RTS
« Reply #439 on: July 14, 2011, 05:21:24 pm »

Creeper World 1, or 2?
Logged
Crystalline (SG)
Sigtext
Quote from: RedKing
It's known as the Oppai-Kaiju effect. The islands of Japan generate a sort anti-gravity field, which allows breasts to behave as if in microgravity. It's also what allows Godzilla and friends to become 50 stories tall, and lets ninjas run up the side of a skyscraper.

Draco18s

  • Bay Watcher
    • View Profile
Re: Proceedurally Generated RTS
« Reply #440 on: July 14, 2011, 07:07:20 pm »

Creeper World 1, or 2?

Either one; the only one I've played is Creeper World Training Sim, or something like that.  It's on Kongregate.

The point was: there's a power network in all three of them.
Logged

Aklyon

  • Bay Watcher
  • Fate~
    • View Profile
Re: Proceedurally Generated RTS
« Reply #441 on: July 14, 2011, 07:23:23 pm »

I was asking because Creeper World 2 uses a wireless network, so its almost nothing like Training Sim.

I get your point about the power network, though, and another game to that list: Harvest Massive Encounter.
Logged
Crystalline (SG)
Sigtext
Quote from: RedKing
It's known as the Oppai-Kaiju effect. The islands of Japan generate a sort anti-gravity field, which allows breasts to behave as if in microgravity. It's also what allows Godzilla and friends to become 50 stories tall, and lets ninjas run up the side of a skyscraper.

Draco18s

  • Bay Watcher
    • View Profile
Re: Proceedurally Generated RTS
« Reply #442 on: July 14, 2011, 07:37:57 pm »

I don't mind if the network is wired or wireless, just that it has to have a limited range.

The question is:
Do I want building nodes (that are attackable) that transmit power?  What's the range from the mother ship?

Etc.
Logged

Akhier the Dragon hearted

  • Bay Watcher
  • I'm a Dragon, Roar
    • View Profile
    • My YouTube Channel
Re: Proceedurally Generated RTS
« Reply #443 on: July 15, 2011, 02:33:15 pm »

   What about using the turret hub and turrets
themselves? You already have turrets needing to
be close to a hub so make the hubs have to be
a certain distance from other hubs or the home
base. Give the base a decent sized range in which
hubs can be built.
   Another idea that builds on the last is you could
make it so that the hubs range goes farther the
less turrets are connected to it. This would put the
tactical problem of having well defended hubs that
have to be close to each other or a undefended hub
system that stretches farther and uses less resources.
Logged
Quote
Join us. The crazy is at a perfect temperature today.
So it seems I accidentally put my canteen in my wheelbarrow and didn't notice... and then I got really thirsty... so right before going to sleep I go to take a swig from my canteen and... end up snorting a line of low-grade meth.

Draco18s

  • Bay Watcher
    • View Profile
Re: Proceedurally Generated RTS
« Reply #444 on: July 15, 2011, 02:45:03 pm »

   What about using the turret hub and turrets
themselves? You already have turrets needing to
be close to a hub so make the hubs have to be
a certain distance from other hubs or the home
base. Give the base a decent sized range in which
hubs can be built.

I'd considered it.

Quote
   Another idea that builds on the last is you could
make it so that the hubs range goes farther the
less turrets are connected to it. This would put the
tactical problem of having well defended hubs that
have to be close to each other or a undefended hub
system that stretches farther and uses less resources.

That's certainly an idea.
Logged

Draco18s

  • Bay Watcher
    • View Profile
Re: Proceedurally Generated RTS
« Reply #445 on: July 15, 2011, 09:45:48 pm »

Started poking around with making the hubs need supply and such, but ran into an issue of when the supply chain is interrupted.  I had the clever idea of each hub taking up a "turret slot" in order to keep track of a hub supplying another hub.

But then I hit a snag with regards to losing connections and having the power network find alternative links.  The node graph I had was mono-directional!  And without care, it was possible to end up with two (or more) nodes that were supplying each other, and if the original parent connection was lost, continue to supply each other.

Will re-approach this again at another time.
Logged

Virex

  • Bay Watcher
  • Subjects interest attracted. Annalyses pending...
    • View Profile
Re: Proceedurally Generated RTS
« Reply #446 on: July 16, 2011, 07:36:28 am »

Started poking around with making the hubs need supply and such, but ran into an issue of when the supply chain is interrupted.  I had the clever idea of each hub taking up a "turret slot" in order to keep track of a hub supplying another hub.

But then I hit a snag with regards to losing connections and having the power network find alternative links.  The node graph I had was mono-directional!  And without care, it was possible to end up with two (or more) nodes that were supplying each other, and if the original parent connection was lost, continue to supply each other.

Will re-approach this again at another time.
You need a graph walking algorithm for that. Consider the following pseudocode:
Code: [Select]
GraphWalker(connection)
  If hub.visited = false
     hub.visited = true
     Loop for each connectedHub in hub.connectedHubs do
       GraphWalker(connectedHub)
If you call this function on all possible connections from the mothership it will walk through the hub graph and check if there is a connection from the mothership to each hub. It doesn't find the shortest path, but it will always find a path if one exists. This means that all hubs that aren't marked as visited are disconnected from the grid and thus unpowerd. By running the algorithm every time something changes you can keep the hub connectivity graph up to date and immediately tell if something has been disconnected.


If you'd actually want to find the shortest path, you'd have to implement a variation on this algorithm called Dijkstra's Algorithm, which is guaranteed to find the shortest-path-tree representing the shortest path from the mothership to each hub.
« Last Edit: July 16, 2011, 07:39:08 am by Virex »
Logged

Draco18s

  • Bay Watcher
    • View Profile
Re: Proceedurally Generated RTS
« Reply #447 on: July 16, 2011, 08:59:34 am »

You need a graph walking algorithm for that. Consider the following pseudocode:
Code: [Select]
GraphWalker(connection)
  If hub.visited = false
     hub.visited = true
     Loop for each connectedHub in hub.connectedHubs do
       GraphWalker(connectedHub)

Yep.  I knew I needed something like it.  It was just too late at night to want to think about it.
Logged

Draco18s

  • Bay Watcher
    • View Profile
Re: Proceedurally Generated RTS
« Reply #448 on: July 16, 2011, 04:47:39 pm »

You need a graph walking algorithm for that. Consider the following pseudocode:
Code: [Select]
GraphWalker(connection)
  If hub.visited = false
     hub.visited = true
     Loop for each connectedHub in hub.connectedHubs do
       GraphWalker(connectedHub)

Yep.  I knew I needed something like it.  It was just too late at night to want to think about it.

I figured out a different way to do it this morning that doesn't require knowing the whole network.  Instead each node knows all of its child nodes, and when it loses supply it first checks to see if it can get supply back from another hub (using the main hub list), if not it sets all of its children to not having supply and clears its children list.

Turrets already had code to seek a new hub if they lost supply, so I borrowed that code and added it to hubs.

Took a couple hours to get it to work right (kept forgetting to do one thing or another, so my 2nd tier hubs weren't in the main hub list, etc.) but it works great.

I also put in the more turrets -> less supply range.  It only applies to hubs.  There's a base 3.2 multiplier on supply distance from another hub, and each turret on that hub reduces the multiplier by 0.2--so it starts at 192 pixels and drops down to 120.

I haven't tested anything complex yet, but it does appear to be working correctly.
Logged

Draco18s

  • Bay Watcher
    • View Profile
Re: Proceedurally Generated RTS
« Reply #449 on: July 28, 2011, 10:38:15 am »

Fiddled with the nebula generation today.

This one added render time (1000ms instead of 800ms per 10,000 pixels of cloud), but looks fantastic.


This one I used output from a perlin noise that had already been generated for another purpose, giving largely the same results.
« Last Edit: July 28, 2011, 10:40:27 am by Draco18s »
Logged
Pages: 1 ... 28 29 [30] 31