Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Easy creature size simulation  (Read 1234 times)

Vanzetti

  • Bay Watcher
    • View Profile
Easy creature size simulation
« on: April 01, 2014, 06:21:50 am »

I think there is a hack to allow an easy simulation of creatures with a large size/volume. Basically, you keep the creature as a 1-tile entity, but it can only move to a different tile if that tile has enough empty spaces around.

For example, let's say we have a giant who is about the same proportions as a dwarf, only twice as tall. While he is standing, he should only be able to move to a spot where there is 1 empty tile above him - which means he can't walk into a regular dwarf tunnel. If he is prone, the rule changes from 1 empty tile above to 1 empty tile in any direction near him, which simulates the giant crawling. By adding more movement rules you can simulate the giant being taller and fatter...

P.S. This idea is so simple I`m sure someone has suggested it before, but I could not find it...
Logged

Manveru Taurënér

  • Bay Watcher
    • View Profile
Re: Easy creature size simulation
« Reply #1 on: April 01, 2014, 11:32:10 am »

Eh, the problem with multi-tile creatures isn't really creating the multi-tile part but rather the pathfinding updates necessary to make it work, and unless I'm missing something that part wouldn't really change with what you're suggesting?
Logged

Vanzetti

  • Bay Watcher
    • View Profile
Re: Easy creature size simulation
« Reply #2 on: April 01, 2014, 02:38:09 pm »

Eh, the problem with multi-tile creatures isn't really creating the multi-tile part but rather the pathfinding updates necessary to make it work, and unless I'm missing something that part wouldn't really change with what you're suggesting?

Hmm. You'll need to give a new parameter to every empty tile, specifying how many empty neighbors it has. This will add more memory overhead, I guess (not a programmer). After this, the pathfinding for large creatures should be faster, actually, as there will be less possible paths for them to take (less walkable space).
Logged

Mohreb el Yasim

  • Bay Watcher
  • ♫♪♫♫♪♫♪♪♫♪
    • View Profile
Re: Easy creature size simulation
« Reply #3 on: April 01, 2014, 07:23:26 pm »

<irony & quote> i am not an economy expert what i think we could solve poverty by printing more monies ... </irony & quote>
So to add my view on this idea (not claiming to be expert or whatever, claiming do not work on internet ...):
For a a program, in general a "hack" allowing to do something easy ... well that is a bad sign,
semantically simple idea =/= a simple idea to code, (for coding: numbers, algorithmically steps, and instructions in-between are easy an idee even if it seems simple might not be transmutable as it is), so if you want to make a good code, you need to know what you want it, and the how will come from your overall habit/practice/knowledge or "intuition" to tame the machine spirit.
<danger>most bad codes are from ideas where people wanted to code something in a way, and if it does not worked out they adapted the thing instead of the way</danger>
suggesting or thinkig of a "how to" without the basic knowledge of "how" is not that fruitful.
<claim>I do not have the intention of criticizing your idea</claim>
<precision>Just want to fire-up the interest in coding, so go Vanzetti, learn to code you might like it, it is ‼FUN‼ </precision>
Logged
Mohreb el Yasim


GENERATION 24:The first time you see this, copy it into your sig on any forum and add 1 to the generation. Social experime

Vanzetti

  • Bay Watcher
    • View Profile
Re: Easy creature size simulation
« Reply #4 on: April 02, 2014, 03:38:52 am »

<claim>I do not have the intention of criticizing your idea</claim>

I don't mind criticizing.

DF uses A* search algorithm. What I propose does not change that, it just changes the map for some creatures, creating more obstacles, basically.
Logged

Icefire2314

  • Bay Watcher
  • Programmer and Space Enthusiast
    • View Profile
Re: Easy creature size simulation
« Reply #5 on: April 02, 2014, 03:12:42 pm »

Eh, the problem with multi-tile creatures isn't really creating the multi-tile part but rather the pathfinding updates necessary to make it work, and unless I'm missing something that part wouldn't really change with what you're suggesting?

I think that if multi-tile creatures were a thing, then path-finding would work along the lines of it having several body parts, over several tiles. The center body part (or wherever it belongs based on the creature) would be the head, where all path-finding takes place from. It would be as though the head is one single-tile creature moving, just with other pieces attached. As far as other body parts go, they would be represented from other tiles. So if a 2-tile high zombie get's bisected, or it's legs removed, then it might be small enough to fit through a one tile gap, etc. The other body pieces would be represented on the map.
Logged
"ERUTH PULL THE DAMN LEVER THE ZOMBIES ARE ABOUT TO GET INSIDE!"
"zzz"
BAY 12 MINI CITY: http://bay-12.myminicity.com/