Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 6 7 [8] 9 10 ... 15

Author Topic: A Dance with Ice and Fire  (Read 30187 times)

voodooattack

  • Bay Watcher
    • View Profile
Re: A Dance with Ice and Fire
« Reply #105 on: December 30, 2013, 04:59:30 pm »

So why not have each cell be an object with multiple attributes? Keeps the hash clean, and you can just reference the Solid and Liquid/Gas attributes as needed.

I was actually thinking of making each cell a generic container, where possible contents are materials (liquids, solids, and gasses), structures, items, and entities.
This would allow for any number of materials to co-exist in a cell, ramp status would be determined by the ratio of solids to other materials relative to the total volume of the cell. Liquid simulation and cave-ins would be really easy to implement in such a case, something akin to a 3D falling sand game.

This would mean that the renderer would be responsible for determining what to draw though. Which isn't necessarily a bad thing, but might reduce rendering performance a bit.

What do you think of this? I'm experimenting with the concept at the moment.
Logged
A Dance With Ice and Fire
An open-world roguelike based off the world of "A Song of Ice and Fire" by George R. R. Martin

Mephansteras

  • Bay Watcher
  • Forger of Civilizations
    • View Profile
Re: A Dance with Ice and Fire
« Reply #106 on: December 30, 2013, 05:20:55 pm »

Huh. Yeah, I can see how that could work.

I suppose for Rendering you'd just have to have some sort of order of precedence for what is shown. Things like entities over object over ground, and the like.
Logged
Civilization Forge Mod v2.80: Adding in new races, equipment, animals, plants, metals, etc. Now with Alchemy and Libraries! Variety to spice up DF! (For DF 0.34.10)
Come play Mafia with us!
"Let us maintain our chill composure." - Toady One

dennislp3

  • Bay Watcher
    • View Profile
Re: A Dance with Ice and Fire
« Reply #107 on: December 30, 2013, 07:27:01 pm »

ptw
Logged

voodooattack

  • Bay Watcher
    • View Profile
Re: A Dance with Ice and Fire
« Reply #108 on: December 31, 2013, 06:00:12 am »

Huh. Yeah, I can see how that could work.

I suppose for Rendering you'd just have to have some sort of order of precedence for what is shown. Things like entities over object over ground, and the like.

I think it'll go like this:

Airborne projectiles
Entities
Items (Piles of items will have a special symbol)
Ramps (submerged ramps will inherit the most prominent liquid's colour)
Most prominent material (liquid/solid/gas)

Physics will be as easy by the way: A set of basic rules that I'm going to determine as soon as I'm done with this stage.
Logged
A Dance With Ice and Fire
An open-world roguelike based off the world of "A Song of Ice and Fire" by George R. R. Martin

Mephansteras

  • Bay Watcher
  • Forger of Civilizations
    • View Profile
Re: A Dance with Ice and Fire
« Reply #109 on: December 31, 2013, 01:02:11 pm »

Sounds good to me.
Logged
Civilization Forge Mod v2.80: Adding in new races, equipment, animals, plants, metals, etc. Now with Alchemy and Libraries! Variety to spice up DF! (For DF 0.34.10)
Come play Mafia with us!
"Let us maintain our chill composure." - Toady One

voodooattack

  • Bay Watcher
    • View Profile
Re: A Dance with Ice and Fire
« Reply #110 on: January 01, 2014, 06:00:43 pm »

The mapping engine is now fully polymorphic. ANYTHING can go into map cells to be loaded, saved, and to be procedurally generated.

This means that I can have anything on tiles with no special distinction, from basic materials, liquids, and items to vehicles and NPCs. Portals are also a possibility..

Support for material states(gas/liquid/solid), temperature, pressure, and structural integrity is already in place, I just need to implement the physics algorithms when the time comes.

For example: Currently, each cell has a maximum volume of 1 m³, if it exceeds that threshold it should try to eject elements to the nearest cell with a lesser volume in use. Everything counts towards volume, including NPCs and the player character. (Explosions will send you flying once implemented)

It was a lot of effort but it was worth it, I think I'll start on items now.
Logged
A Dance With Ice and Fire
An open-world roguelike based off the world of "A Song of Ice and Fire" by George R. R. Martin

Mephansteras

  • Bay Watcher
  • Forger of Civilizations
    • View Profile
Re: A Dance with Ice and Fire
« Reply #111 on: January 01, 2014, 06:52:02 pm »

Excellent
Logged
Civilization Forge Mod v2.80: Adding in new races, equipment, animals, plants, metals, etc. Now with Alchemy and Libraries! Variety to spice up DF! (For DF 0.34.10)
Come play Mafia with us!
"Let us maintain our chill composure." - Toady One

Sheb

  • Bay Watcher
  • You Are An Avatar
    • View Profile
Re: A Dance with Ice and Fire
« Reply #112 on: January 02, 2014, 06:23:01 am »

Do you have a fixed size for cells, or just a fixed volume?
Logged

Quote from: Paul-Henry Spaak
Europe consists only of small countries, some of which know it and some of which don’t yet.

voodooattack

  • Bay Watcher
    • View Profile
Re: A Dance with Ice and Fire
« Reply #113 on: January 02, 2014, 06:36:47 am »

Do you have a fixed size for cells, or just a fixed volume?

Those both amount to the same thing, a fixed volume of 1 m³ is a 1x1x1 metres cell. (If we're talking in terms of symmetric cubic cells that is)

The volume won't be a hard limit though, the cells will accept more than 1 m³ in the future, it'll just increase the pressure once I implement physics.
Logged
A Dance With Ice and Fire
An open-world roguelike based off the world of "A Song of Ice and Fire" by George R. R. Martin

Gamerlord

  • Bay Watcher
  • Novice GM
    • View Profile
Re: A Dance with Ice and Fire
« Reply #114 on: January 02, 2014, 06:38:08 am »

Hey, I was just wondering; will we be able to build/dig/change the map in this?

Sheb

  • Bay Watcher
  • You Are An Avatar
    • View Profile
Re: A Dance with Ice and Fire
« Reply #115 on: January 02, 2014, 06:38:37 am »

But then, a character will occupy two cells on different z-levels?
Logged

Quote from: Paul-Henry Spaak
Europe consists only of small countries, some of which know it and some of which don’t yet.

voodooattack

  • Bay Watcher
    • View Profile
Re: A Dance with Ice and Fire
« Reply #116 on: January 02, 2014, 06:48:04 am »

Hey, I was just wondering; will we be able to build/dig/change the map in this?

Of course, that's the foundation on which I built the terrain engine. I had this in mind long before I started writing it.

But then, a character will occupy two cells on different z-levels?

I might increase the limit to accommodate larger creatures, but I don't really have any frame of reference as of yet. Once I add some entities I'll be in a better position for figuring this out.

I also plan to add multi-cell entities in the future, I just need to figure out how they fit in the big picture since their physics will be a pain to implement.
Logged
A Dance With Ice and Fire
An open-world roguelike based off the world of "A Song of Ice and Fire" by George R. R. Martin

Mephansteras

  • Bay Watcher
  • Forger of Civilizations
    • View Profile
Re: A Dance with Ice and Fire
« Reply #117 on: January 02, 2014, 01:26:42 pm »

Might be better off starting with the assumption of humanoid creatures being 2x1 cells to begin with. Get the physics working for that as a start, since you'll find lots of issues and whatnot that need to be addressed just to handle that fairly easy multi-cell creature shape. More of a pain to start, but it'll make going to larger multi-cell creatures later on much easier since you'll already have a framework that assumes multi-cell as the default.
Logged
Civilization Forge Mod v2.80: Adding in new races, equipment, animals, plants, metals, etc. Now with Alchemy and Libraries! Variety to spice up DF! (For DF 0.34.10)
Come play Mafia with us!
"Let us maintain our chill composure." - Toady One

voodooattack

  • Bay Watcher
    • View Profile
Re: A Dance with Ice and Fire
« Reply #118 on: January 02, 2014, 01:40:56 pm »

Might be better off starting with the assumption of humanoid creatures being 2x1 cells to begin with. Get the physics working for that as a start, since you'll find lots of issues and whatnot that need to be addressed just to handle that fairly easy multi-cell creature shape. More of a pain to start, but it'll make going to larger multi-cell creatures later on much easier since you'll already have a framework that assumes multi-cell as the default.

That's probably a good idea although it complicates things immensely for the renderer. How am I supposed to render a humanoid player if their body spans two different z-levels in a top-down view? Start at the waist and have the head invisible to the 2D camera? Or start with the head and have the body extend to the secondary layer?

With either solution I'd have to scrap the curses renderer, since it can't handle multi-layer rendering (and has been a colossal pain in the nads for that reason so far).
Logged
A Dance With Ice and Fire
An open-world roguelike based off the world of "A Song of Ice and Fire" by George R. R. Martin

Mephansteras

  • Bay Watcher
  • Forger of Civilizations
    • View Profile
Re: A Dance with Ice and Fire
« Reply #119 on: January 02, 2014, 01:46:49 pm »

That does become a bit of a problem, although it's one that's relevant for multi-cell creatures of any height past the first. But of course those then become the exception rather than the rule. Still, something that has to be dealt with eventually.

How important is that to your goal with the game eventually?

Obviously, given the source material, most of the enemies are going to be humans or at least roughly human. Are Dragons, Giants, and Mammoths going to be in? Are they important to have in a useful way?

Now's the time to change rederers if you're going to do that, but it's also a giant pain to change renderers completely. So I understand if you don't want to do that.
Logged
Civilization Forge Mod v2.80: Adding in new races, equipment, animals, plants, metals, etc. Now with Alchemy and Libraries! Variety to spice up DF! (For DF 0.34.10)
Come play Mafia with us!
"Let us maintain our chill composure." - Toady One
Pages: 1 ... 6 7 [8] 9 10 ... 15