Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 279 280 [281] 282 283 ... 748

Author Topic: Future of the Fortress  (Read 3808739 times)

ag

  • Bay Watcher
    • View Profile
Re: Future of the Fortress
« Reply #4200 on: November 07, 2012, 05:40:54 am »

I have some reasonable things to try that would improve performance in my mind, but that's not one of them.

Some things I'd suggest to look into:

  • Rewrite flagarrayst::has_flag without using get_slot_and_addbit_uchar, so that the compiler could fully inline it when the flag is a constant.
  • Units should cache the effective state of frequently checked caste flags like OPPOSED_TO_LIFE in a bitfield, so that the check could be done with one instruction, instead of multiple checks, branches, memory accesses and function calls. This seems to be one of the top sources of slowness in friend-or-foe checks in the current version.
  • I'm wondering if sticking to integer math for temperature is that good of an idea, since modern CPUs probably have quite good floating-point units, while branch mispredictions and integer division are slow. With floating-point you can even cache the reciprocal of SPEC_HEAT in a field, and use only multiplication and addition. Integer math also causes some boundary jitter bugs with item containers that prevents temperature updates from ever stabilizing.
  • Speaking of temperature, why can't it be done every 5 or 10 frames, instead of every frame, with an increased exchange coefficient to compensate. Something like tallow takes over 10000 frames to reach equilibrium with the environment from a 10 degree difference, and while that happens, all items in a 16x16 tile block have to be updated. Likewise, all units seem to be always being updated...
  • I don't remember if items created in workshops are set to the environment temperature, instead of some fixed preset one, but if they aren't, that should probably be fixed too for the above reason.
« Last Edit: November 07, 2012, 05:45:11 am by ag »
Logged

Trif

  • Bay Watcher
  • the Not-Quite-So-Great-as-Toady One
    • View Profile
Re: Future of the Fortress
« Reply #4201 on: November 07, 2012, 07:21:20 am »

The purpose of the thread is to discuss current developments.  Specific bugs should be reported on the bug tracker, and specific suggestions belong for the most part in the suggestion forum.
Logged
Quote from: Toady One
I wonder if the game has become odd.

BinaryBeast1010011010

  • Bay Watcher
    • View Profile
Re: Future of the Fortress
« Reply #4202 on: November 07, 2012, 09:00:34 am »

if I may, I didnt suggest anything nor did the above poster, I asked a question regarding df programming without greening it since I hoped someone could answer it and didnt want to bother toady. the kind sir ag answered and gave me clues about what could be done regarding my question. it's not just an answer I agree, it's also an incentive to look more into the raws and how df works.

I do not deserve my own suggestion forum, mind you. :P
Logged
cant stop playing DF?
 : (){ :|:& };:

CaptainArchmage

  • Bay Watcher
  • Profile Pic has Changed! Sorry for the Delay.
    • View Profile
Re: Future of the Fortress
« Reply #4203 on: November 07, 2012, 10:04:37 am »

"and fortresses, which connect the surface to the underground and are the same sort of sites that you create."

If fortresses now connect the surface to the underground societies will we now find restrictions upon where we can embark, or if not a restriction then a new possibility to make a fortress as an entrance to our mountain home?

Will our fortresses still become the capital after a time? It seems a bit weird to turn the front door into the throne room, so to speak.

It seems that my main deciding factor for where to place what should be some far-flung colony in the style of Ancient Greece or some vital fort watching over a trade route is actually whether or not there's an aquifer.

The idea is that fortresses connect the surface to the underground, and since we embark on the surface, that should eliminate most of the restrictions for building a Dwarf Fortress far away. In the future, however, we may have to deal with getting there, so there will be places that are difficult to get to, or will require ships. For example, after the naval release, embarking on an island may result you in having a boat instead of a wagon. The details of that have yet to be worked out and there's only a slight chance of them going in this release.

Worldgen fortresses seem to be exclusively in mountain areas, which do not have aquifers as frequently as non-mountain biomes. There will probably be some way around this.

Trade routes are in but the actual movement of caravans is abstracted out, so you won't find them on the road in adventure mode. Toady had put out a map of trade routes in 0.31.13.

Toady, do you have any ideas or goals for when ships, boats, and vehicles are added? Specifically, do you see ships, boats, and vehicles as being optionally designed by the player within the game, or just being hardcoded or defined within the raws?
Logged
Given current events, I've altered my profile pic and I'm sorry it took so long to fix. If you find the old one on any of my accounts elsewhere on the internet, let me know by message (along with the specific site) and I'll fix. Can't link the revised avatar for some reason.

reality.auditor

  • Bay Watcher
    • View Profile
Re: Future of the Fortress
« Reply #4204 on: November 07, 2012, 11:32:28 am »

Just musing, would it improve speed to rewrite it in assembly?
No.
Logged
Are weapons like the least lethal thing in DF?

Aerval

  • Bay Watcher
    • View Profile
Re: Future of the Fortress
« Reply #4205 on: November 07, 2012, 12:02:51 pm »

Wow I thought it would be object oriented.

What's not oo in c++?

I remember Toady once guessed about several thousand objects, he wrote for df. Might be a bit exaggerated but it definitely is oo.
Logged

AutomataKittay

  • Bay Watcher
  • Grinding gears
    • View Profile
Re: Future of the Fortress
« Reply #4206 on: November 07, 2012, 12:28:15 pm »

Wow I thought it would be object oriented. Just musing, would it improve speed to rewrite it in assembly?

There're reasons that assembly isn't very used compared to higher level codes! Optimizing compilers can pull out more tricks, much faster, than most people can do. Plus it's pretty nitty gritty and ASM's harder to write over larger code segements because it involves micromanaging stuffs :D

Sure, a person can use tricks that compiler can't take advantage of, it's still not going to run twice as fast compared to decent compilers.

OO isn't a magic bullet for anything, either, it's a useful tool when applied well.
Logged

BinaryBeast1010011010

  • Bay Watcher
    • View Profile
Re: Future of the Fortress
« Reply #4207 on: November 07, 2012, 12:41:23 pm »

Just musing, would it improve speed to rewrite it in assembly?
No.

care to clarify for a nub?

I do not know the first thing about c++, when I say oo I was thinking python or ruby for an example... Since I'm pretty new here I cant recall the "auld days" of C. why did he switch? how hard had it been?
Logged
cant stop playing DF?
 : (){ :|:& };:

MrWiggles

  • Bay Watcher
  • Doubt Everything
    • View Profile
Re: Future of the Fortress
« Reply #4208 on: November 07, 2012, 02:44:09 pm »

There been a lot of threads already discussing how ToadyOne should be programming the game, why does it need to be in this one?
Logged
Doesn't like running from bears = clearly isn't an Eastern European
I'm Making a Mush! Navitas: City Limits ~ Inspired by Dresden Files and SCP.
http://www.bay12forums.com/smf/index.php?topic=113699.msg3470055#msg3470055
http://www.tf2items.com/id/MisterWigggles666#

King Mir

  • Bay Watcher
    • View Profile
Re: Future of the Fortress
« Reply #4209 on: November 07, 2012, 03:09:38 pm »

Just musing, would it improve speed to rewrite it in assembly?
No.

care to clarify for a nub?

I do not know the first thing about c++, when I say oo I was thinking python or ruby for an example... Since I'm pretty new here I cant recall the "auld days" of C. why did he switch? how hard had it been?
No, because C++ is faster than assembly, unless you're know assembly as well as a compiler writer. Even then, it would be prudent to use C++ for speed of development.

dree12

  • Bay Watcher
    • View Profile
Re: Future of the Fortress
« Reply #4210 on: November 07, 2012, 03:46:55 pm »

Just musing, would it improve speed to rewrite it in assembly?
No.

care to clarify for a nub?

I do not know the first thing about c++, when I say oo I was thinking python or ruby for an example... Since I'm pretty new here I cant recall the "auld days" of C. why did he switch? how hard had it been?
No, because C++ is faster than assembly, unless you're know assembly as well as a compiler writer. Even then, it would be prudent to use C++ for speed of development.
And C++ is also far more platform-independent than assembly.
Logged

BinaryBeast1010011010

  • Bay Watcher
    • View Profile
Re: Future of the Fortress
« Reply #4211 on: November 07, 2012, 04:49:46 pm »

so anything but assembly to be platform independent, I got it.but what c++ have that C doesnt?
Logged
cant stop playing DF?
 : (){ :|:& };:

King Mir

  • Bay Watcher
    • View Profile
Re: Future of the Fortress
« Reply #4212 on: November 07, 2012, 05:10:50 pm »

so anything but assembly to be platform independent, I got it.but what c++ have that C doesnt?
The standard template library and object oriented programming, which among other benefits, allow you to express to the compiler what you want to do instead of how to do it, which allows the compiler to be smarter about optimizing your code. It is also makes it easier to organize a large project into parts, as that's an integral part of OOP. Lastly, it makes managing memory easier than C, especially C++11. There are other benifits too, so there is little reason to use C for a project like DF.

At it's worst C++ is as good as C. At it's best it's as abstract as Java, yet faster.
« Last Edit: November 07, 2012, 05:14:50 pm by King Mir »
Logged

BinaryBeast1010011010

  • Bay Watcher
    • View Profile
Re: Future of the Fortress
« Reply #4213 on: November 07, 2012, 07:02:00 pm »

Are some unix os written in c++?
Logged
cant stop playing DF?
 : (){ :|:& };:

hermes

  • Bay Watcher
    • View Profile
Logged
We can only guess at the longing of the creator. Someone who would need to create one such as you. - A Computer
I've been working on this type of thing...
Pages: 1 ... 279 280 [281] 282 283 ... 748