Can We Use Civ4 As A "Base" Game Engine?

Ozymandias

In Terra Fantasia
Supporter
Joined
Nov 5, 2001
Messages
10,877
Location
The lone and level sands
Caveat: I have never played, nor wanted to play, Civ4 - but I think it was the last in the series to use square & not hexagonal Tiles ... ?

If so, the SDK w/ the core game DLL source code (game and A.I. code) has been released, and the underlying GameBryo Engine is also now open-source.
 
Theoretically, doubtful. The big "gotcha" that springs to mind is that Civ 3 uses isometric tiles, and Civ 4 uses actual square tiles. So while the x and y dimensions of Civ4 tiles are the same (say, 64x64), in Civ3, tiles are twice as wide as tall. If Civ3 tiles were diamonds that we could rotate 45 degrees, I'd be more optimistic, but we're talking rhombuses.

Aside from that, graphics in general would be the next area of most expected difficulty. Civ4 is a 3D game, and I expect we'd have a very difficult time getting things like unit animations from Civ3 working in Civ4. There is some precedent for 2D leaderheads in Civ4, so I'd be more optimistic about figuring out a way to convert those. Terrain would also pose a challenge not just in the isometric sense, but in the natural-looking-borders-between-tiles sense. The interface is also altogether different in Civ4, so I would not expect much if any luck migrating custom interfaces over.

My general position is that it probably would be feasible to create an infrastructure for migrating rules from Civ3 scenarios to Civ4, but it would be very difficult if not impossible to migrate map-based mods over. GameBryo being open source now might help, but if you're going to the trouble of modifying a 3D square-tile engine to support a 2D isometric layout, I doubt you'd save any effort over starting with a tool more appropriate to the task at hand.

Civ4 would probably be a more appropriate target for a Civ 1 migration.
 
Yeah, it seems like a stretch for the graphics. It's on my list for the sake of completeness, but I'm not hopeful. Someone somewhere was talking up the power of the SDK and referenced a mod that used "isometric graphics" but I haven't been able to find any such thing. People have done billboards (sprites that always face the camera) but trying to make pixel-perfect isometric tile billboards from a square tiled engine sounds like a nightmare.

Civ4 would probably be a more appropriate target for a Civ 1 migration.
Pretty sure I saw someone on Discord talking about making a Civ1 mod in Civ4
 
I like to point out that the Civ3 map isn't actually isometric. The tiles are an isometric perspective, but the logical grid is actually a checkerboard where you can only jump between squares of the same color. e.g. 0,0 / 0,2 / 1,1 / 1,3 are all valid coordinates, but not 0,1 / 0,3 / 1,0 / 1,2 . (With 0,0 being top-left, increasing to the right and down.)

I'm pretty sure this matters when calculating distances, but I'm not absolutely unsure if it would work on a square or isometric map.

In any case, I'm doubtful that adapting a true isometric layout or square grid layout would be doable as the layout is quite distinct.
 
I just posted (Somewhere Close By :cooool:) some stray thoughts on using Freeciv. Having read a little more in the last 8 minutes o so, I noted that a .dll can be written for an individual Civ ... Is that, " :shifty: " or, " :dance: ?"
 
Freeciv. Stable, open source project, emulating and going well above and beyond its target (Civ 2.) So well structured that an individual Civ can have its own .dll directly associate with it.

"Broad stroke" pros:
  1. Stable & open sourced , etc., as mentioned above.
  2. Isometric, with some of our "wish list" items already in place (straits/canals.)
  3. Client/server model: The functions I've looked at (interactions between client and server) appear to be structured in a way that:
    • Makes code and data structures more even more clear.
    • Appears to make "regrouping them" into a standalone chunk of software easy enough.
  4. Beyond that, the game functions are rigorously delineated into, "Rulesets," (there are Tilesets as well) all of which screams, "Port into an OO/OODB schema ASAP" - with the real possibility that this would not nee to be done 100% before we roll some out something worth poking a stick at.
As an example, here's the Overview documentation for Rulesets:
Spoiler Freeciv Ruleset Overview :

Overview of Editing a Ruleset
Rulesets are specified using the server command "rulesetdir". The command "./freeciv-server -r data/civ1.serv" just reads a file which uses this command (as well as a few of the standard server options). The server command specifies in which directory the ruleset files are to be found.
The ruleset files in the data directory are user-editable, so you can modify them to create modified or custom rulesets without having to recompile Freeciv. You should **not** edit the existing files in the "default", "civ1", and "civ2" directories. Instead you should copy them to another directory and edit the copies. This is so that its clear when you are using modified rules and not the standard ones.
Some specific notes on the format:
  • Some rule files have dependencies on other files. For example: units depend on advances specified in the techs file.
  • Units have a field, "roles", which is like "flags", but determines which units are used in various circumstances of the game (rather than intrinsic properties of the unit). See comments in common/unit.h
  • Properties of units and advances are now fairly well generalized.
  • Properties of buildings are still rather inflexible.
Check the ruleset forum for asking questions.


It also hasn't escaped my attention that there other C2/TOT open source works underway -

Just remember: Pillage then burn! :viking:
 
Back
Top Bottom