Author Topic: Just thinking... Animania  (Read 4959 times)

erandur

  • Guest
Just thinking... Animania
« on: 8 February 2008, 14:22:08 »
Hi everybody, I'm planning on creating a mod for glest. But before I start with it, I'd like to hear some comments, suggestions, etc.
So... As the title might've made clear, I'm thinking about something with animals. Fierce predators to create an army, busy little insects to create houses etc.
However, I've been wondering if it's possible to create a third 'field'. Next to land and air, I'd like to create water. This could open so many new ways of fighting... 4 islands, crabs fighting in the water, boats carrying other animals to the shores.  
Finally, I'm thinking to create a more 'passive' way of playing. Creating strong buildings to defend you. And you can just relax and expand your land, within the restrictions of Glest of course.  :)

So, any thoughts? Can my ideas be realized? Will it even be worth it?

Edit: Forgot to mention I already have a lot of animals, probably made them for one of my previous projects. Just have no idea how to export them to g3d, as the current export tool doesn't work with 3ds max 9...
« Last Edit: 1 January 1970, 00:00:00 by erandur »

wciow

  • Behemoth
  • *******
  • Posts: 968
    • View Profile
(No subject)
« Reply #1 on: 8 February 2008, 18:24:01 »
Sounds like an interesting idea.

As for creating water units I think this has been discussed in some older threads. It is certainly possible but your going to have to spend a bit of time coding in C++ to achieve it. If you don't know how to code then unfortunately theres no way to implement water based units via XML.

I support the idea of making a more relaxed playing style as I've always preferred games that have tactics above build-and-rush types.

As I am currently finding out if you plan on doing a large mod by yourself its gonna take a lot of work so make sure you have it well planned out and keep at it!
« Last Edit: 1 January 1970, 00:00:00 by wciow »
Check out my new Goblin faction - https://forum.megaglest.org/index.php?topic=9658.0

daniel.santos

  • Guest
(No subject)
« Reply #2 on: 9 February 2008, 04:52:08 »
That sounds cool erandur! :)  As wciow mentioned, it does take C++ moding.  However, I was examining adding additional "fields" to the game as I'm currently working on a Glest engine mod to facilitate the mod that wciow and I are working on.  Although I haven't delved too deeply in this part yet, it brings about a few thoughts that I think are worth considering.  But let me back up a bit before going there.

As best as I understand it thus far, when the engine reads in and digests a map, it creates a 3 dimensional array of map "cells".  These are essentially the tiles on an x,y grid with the z axis being the field.  Each cell can contain one unit (or part of a unit in the case of larger units).  So currently, if you have a 64x64 tile map, this 3d cell array is 64x64x2.  This is how a land unit and air unit are able to occupy the same tile.  However, each "cell" in this array (actually a C pointer) can be available or not (point to an actual Cell object or NULL).  The engine determines if a tile should have a land cell or not based upon it's altitude above or below the water line (I can't remember the value below the water line that is allowed before the tile is no longer considered land).

What this brings to mind for me is, how should this be managed in relation to allowing water and land units to occupy each tile.  Working within the existing paradigm it would make sense to say that if a tile is too deep to walk on than it should be deep enough to swim/float on, except that I don't like that.  A Swamp boat works plenty fine in very deep water and very shallow water, but is pretty crappy on dry land.  A canoe can be used in very shallow water as well, plenty shallow enough to walk through.  However, a large sea vessel cannot come near the depth that one could walk in, requiring canoes, a pier or a doc in order to load and unload passengers.

This analysis may be too exhaustive for the purpose of Glest, but I think that it would be cooler to have units define parameters as to how they travel in relationship to water.  Then, if a simple enough XML interface can feed that, it'll keep it simple where it should be simple, but also flexible where it's needed.  My idea here would be to implement altitude-to-speed requirements.  So a human unit can travel at speed 200, from 0 sea level to infinity altitude. Can travel at 150 from -1 to 0, 100 from -1 to -2 and then he just can't go below -2.  A canoe can go 200 speed from -infinity to -0.5 altitude (the inverse of depth).  But since Mr Goliath is significantly taller than a human, he can go 200 speed from -1 to infinity altitude, 150 from -4 to -1, 100 from -8 to -4 and maybe he can't go any deeper than that.  My catapult/wagon/Toyota Carola however, cannot go in the water at all or it'll get stuck.

What's your thoughts on that, too complex or a cool idea?  The implementation time is probably not too different, rather we say that water is everything x depth and below and land starts at x depth and above.  Another aspect of this is that I intend to implement the ability to travel though areas with trees for our druid-ish, tree hugger types.  It won't be easy to implement this as a "field" and it probably wouldn't make much sense, so I'm going to need to put together some alternate mechanism anyway.
« Last Edit: 1 January 1970, 00:00:00 by daniel.santos »

erandur

  • Guest
(No subject)
« Reply #3 on: 9 February 2008, 13:33:21 »
Quote from: "daniel.santos"
That sounds cool erandur! :) 10.000+ polygons for one cow, heheh.
But I think there is one problem, how can you mount the units in a boat? Without morphing them into a unit in a boat? And morphing would be a small problem too. :) As one can't swim, the other can't walk, where do they morph then?
Either way, just creating the animals isn't going to be that hard, probably. And the more passive way of playing shouldn't be that hard neither.
« Last Edit: 1 January 1970, 00:00:00 by erandur »

erandur

  • Guest
(No subject)
« Reply #4 on: 9 February 2008, 13:41:29 »
Forgot to mention my other small plan, which is actually part of the apssive way of playing. I'll try to create really crowded places, it just isn't logical that in a city, there isn't one crowded place. So I'll try to get as many people as possibly at the storage area (usually a castle, but animals don't have castles, do they?). And create massive traffic there, creating delays etc. This will create chaos, when selecting some military units, you might select some workers by accident. Or the military units get stuck in the mob, and get left behind. Creating a somewhat chaotic atmosphere, and that way I could add some creatures that quickly reproduce, but that'll get them stuck. :D
I'm evil! I want to see my followers get stuck!
« Last Edit: 1 January 1970, 00:00:00 by erandur »

erandur

  • Guest
(No subject)
« Reply #5 on: 9 February 2008, 14:21:02 »
Quote from: "wciow"
As I am currently finding out if you plan on doing a large mod by yourself its gonna take a lot of work so make sure you have it well planned out and keep at it!

Not really, I'll start alone, and I might drag a few friends in it. :) ). I just tested it, with controlling the center, you can quickly build a large army. And you get attacked by the other 3 players. That giving you a slightly advantage.
Now, that isn't really passive nor relaxed I know. But if you just stay inside your camp (which is pretty big, I divided a 512x512 map in 5 places, 4 bases and the center). The other 3 players shall fight each other. And if you put a few defensive buildings at the exit/entrance, you'll be safe for quite a while.
Still isn't finished though... When the other 2 players (cpu) try to attack player 4, they get stuck. :) They want to go right to the base, and ignore the entrance. So they get stuck in the trees (which I use to make entrances, and divide the 5 places). It's getting along pretty well, going to create a 1024x1024 map soon, to that attacking another player takes a long time, giving you the chance to start some defenses.
« Last Edit: 1 January 1970, 00:00:00 by erandur »

Duke

  • Guest
(No subject)
« Reply #6 on: 9 February 2008, 14:48:40 »
Nice concept
Daniel I think thats probably the best aproach you got there.
Sticking to field would probably just cause trouble the more complex it gets.

But such speed modifiers are greatly expandable. You could easily introduce something like swamp or highgrass.
But the pathfinding would probably need an update so that it finds the quickest way. This way it would simply avoid areas with zero speed.

And it would also solve another problem: the flat maps.
You could have steep hills or even cliffs and units would react accordingly.
Just By adding an speed to angle modifer.

The boating problem should actually be rather easy to solve: you have one mesh of a boat and one of a creature. if you put both units in the same place an syncronise their movement you have a creature in a boat (;
As daniel said: in shallow water you can do both, walk and swim so getting them together is not a problem.
We could introduce a climbing action which we would need for steep hils as well to get the creature in.
Same goes for air transporters.
If you have a bigger closed ship, you can simply make the unit disappear.

About the animals housing: Of course they don't have castles, but you could pile some stones to form a cave entrance, or some sticks to make a nest. Or some clay structures for the insects (look at termites)
But I would be carefull to place Mamals and insectoids in the same faction, they don't quite fit.
« Last Edit: 1 January 1970, 00:00:00 by Duke »

erandur

  • Guest
(No subject)
« Reply #7 on: 9 February 2008, 15:55:55 »
Quote from: "Duke"
Nice concept
About the animals housing: Of course they don't have castles, but you could pile some stones to form a cave entrance, or some sticks to make a nest. Or some clay structures for the insects (look at termites)
But I would be carefull to place Mamals and insectoids in the same faction, they don't quite fit.

That castle was more or less a joke, heh. And there are plenty of mammals to let out the insects completely. And while I was walking around a few hours ago, I had another (great) idea. Everybody probably knows that there are... lemurs (I like those creatures). But why should only 1 lemur race be playable? So I'm going to find a certain creature that does a lot of work as worker. And add about 3 different types of it, the one walking faster and carrying less etc.
And daniel, do you have any idea how this could be implanted? :) As it does sound good, if not very good. But I suppose you'll have to adjust the Glest engine then, so it can read the xml files?
« Last Edit: 1 January 1970, 00:00:00 by erandur »

daniel.santos

  • Guest
(No subject)
« Reply #8 on: 9 February 2008, 21:50:34 »
Quote from: "erandur"
And daniel, do you have any idea how this could be implanted? :)

As to Dukes comments, there is already a bit of code in the engine that alters movement speed based upon rather or not you are going up hill, but I think it's a static amount.  I think there's already code that regulates how steep of an incline can be "walked" accross.  I made a screwy map for testing things and it had an insanely tall peek in it.  Then I sunk the main camp (player 1 spot) and discovered that it finds places to put the units, even if they have to be scattered all around. :)

As to the idea of having one unit contain another (i.e., humans in a boat), this shouldn't be colossal effort, but it's not bite-sized.  I hadn't really considered this much when going through the code, I was just using those as real-life type examples.  But being able to do this will add a great amount to the game.  When I think about it, I was considering a siege unit for the Path of Reason sub-faction in our mod.  This would be some type of armored unit that would house up to 4 archers.  The archers could attack from the unit (which moved rather slowly) but when the unit was hit, the unit its self took damage and not the inhabitants.  But visually displaying a unit in a boat, that could have some challenge to it.  My vote would be to have separate animation sequences for "being in boat" and have these animations overlay on top of the boat, offset in such a manner that multiple units "being in the boat" don't overlap each other (like if you had up to 4 units in a canoe).  If you want to allow them to attack from the canoe, you should also have an animation sequence for this.  But this gets tricky as well because then the direction they are attacking wont usually be the direction the boat is traveling.  So let's just suffice to say for now that there are some elements of this that will need a lot more examination and that units that contain other units in general will need a lot of examination. However, I think we can specify this much for now:
  • Units should have the option to contain other units.
  • A name to use in the XML file and in code for the ability of units to contain other units should be  decided upon (i.e., "housing", "garrisoning", "containing", etc.).  I'm going to use the verb "contain" for now.
  • The number of units contained should probably be governed by unit size.  However, unit size in glest is restricted size to the power of 2 (1, 4, 9, 16, etc.) and there may be cases where units should be able to take up a number of spaces aside from their squared size.
  • A containing unit should be able dictate a list of units it can contain, rather or not they are allowed to attack while contained and rather or not the unit can move when no units are contained.  i.e., I don't think a canoe should be able to move without anybody in it.  But a barge unit should probably come with it's own captain, and thus, can move when "empty."
  • A containing unit should specify what happens to it's contents when it dies.  The contents can
    • also die
    • die unless they are on a tile & field they can travel on (e.g., they drown if in deep water and they can't swim, fall to their death if they are in the air and can't fly)
    • or maybe just emerge where they can (I'm not sure this should be needed or used).
  • Load and Unload commands and skills will need to be added.
  • A contained_attack skill should probably be added for units to be able to attack while contained in another unit.  This skill will will not cause them to try to leave the container.
  • A container_attack skill should probably be added that will invoke the contained_attack skill of it's contents.
  • An unload_and_attack skill may be desirable that will cause the contained to attack from the container when possible, but as soon as possible unload and continue to attack the specified target.  This is something that no commercial RTS has that I am aware of.  Having to give the order for boats to unload and then separately telling them to charge when you are trying to reinforce troops in a battle that's already underway shouldn't be necessary.
But back to erandur's mod, remember that resources can be defined under the tech/<tech_tree_name>/resources directory in your mod, so you can make them anything you want.  They can be "static", "consumable" or "tech".  Just look at the resources for magitech.  I'm not 100% sure what the type "tech" means, but these are the harvestable resources and are associated with a resource-type (which is just a number) in the map and your mod can specify what that resource is and what model is uses.  Just by changing this, you can change what would normally be "gold" in a map into a "Chick Fillet" store that can sell you 1500 units of chicken sandwiches.

It'll be neat to see how your mod turns out.
« Last Edit: 1 January 1970, 00:00:00 by daniel.santos »

wciow

  • Behemoth
  • *******
  • Posts: 968
    • View Profile
(No subject)
« Reply #9 on: 10 February 2008, 15:56:48 »
Quote from: "erandur"

Just got to find my way in Blender now, as 3ds max 9 can't export to g3d. And those models I already had are.. well.. worthless. :) 10.000+ polygons for one cow, heheh.


Your old models are not totally worthless you can just export form max as .obj files then import into blender then export as g3d. As for the poly count that might be a problem but you can always use the the old models to base new ones on and they will also com in handy for bump mapping, since you can texture the higher poly models and then bake the lighting and self-shadowing in to a single texture with blender.

This is a good place to start:
http://wiki.blender.org/index.php/Manual/Render_Bake
« Last Edit: 1 January 1970, 00:00:00 by wciow »
Check out my new Goblin faction - https://forum.megaglest.org/index.php?topic=9658.0

ZaggyDad

  • Guest
(No subject)
« Reply #10 on: 26 February 2008, 16:59:35 »
Could you post your models? I'm interested to see what they look like.

I hope this mod isn't dead... :confused:

Btw, Blender has some sort of reduce poly thing in it. Though, I'm not sure it's worth anything.

~Zaggy
« Last Edit: 1 January 1970, 00:00:00 by ZaggyDad »

Duke

  • Guest
(No subject)
« Reply #11 on: 26 February 2008, 19:29:45 »
and if they are good models they should consist mostly of quads.
In that case it is pretty easy to select edgeloops and remove them where they aren't necessary.
« Last Edit: 1 January 1970, 00:00:00 by Duke »

erandur

  • Guest
(No subject)
« Reply #12 on: 4 March 2008, 18:55:50 »
This mod isn't dead by far, just on some kind of a 'pause'. Due the lack of resources, I can't create any 3d models at the moment, as Blender lost all respect in my eyes... As soon as I opened Blender, I saw the perspective was all messed up. Looking at messed up 3d perspectives can destroy your eyes, or at least give you a headache.

Anyway, I found a composer for the mod, (call me whatever you like, but I want to do it good).

And I found the 'opposing' faction... the cavemen, so it'll be prehistoric animals vs prehistoric humans. And I'll extend that setting, to my MMORPG, that I am going to create in a few years.

The models are pretty.. limited, I'll have to create a way to create caves, because those have to be 'carved' out of the mountains. And I have no idea what type of buildings will need. Finally, I didn't start with the 'improved' animals yet, as I don't know anything about animating.

So, that's pretty much all so far.

P.S. Besides this project, I'm also making some money with selling 3d models. So I'm pretty occupied.
« Last Edit: 1 January 1970, 00:00:00 by erandur »

Duke

  • Guest
(No subject)
« Reply #13 on: 4 March 2008, 21:23:18 »
did you check if blender was actuaklly in perspective mode?

If you had a from the side view before, or something alike it might have been in orthographic mode.
(you can switch with NumPad5)
« Last Edit: 1 January 1970, 00:00:00 by Duke »

erandur

  • Guest
(No subject)
« Reply #14 on: 5 March 2008, 13:17:49 »
Quote from: "Duke"
did you check if blender was actuaklly in perspective mode?

If you had a from the side view before, or something alike it might have been in orthographic mode.
(you can switch with NumPad5)

Well, Blender is pretty fucked up here anyway, it's possible it affected the perspective. If I run Blender, it starts with a landscape I made a while ago. Even if I select new, it always brings that scene back. I can't export to any 3d format (except the xml, for glest). But I can't change them into .g3d, because that package only works on linux.

So, I'll wait for my new 3ds max to come in, and reprogram the exporter, to work on the newer versions.
« Last Edit: 1 January 1970, 00:00:00 by erandur »

ZaggyDad

  • Guest
(No subject)
« Reply #15 on: 5 March 2008, 16:09:57 »
I've got a working version of it working on windows (I replaced the old dlls with ones in inkscape, or something). It works fine enough for me.

http://www.mediafire.com/?atbczoxzfxm

If it doesn't work, please tell me.

~Zaggy
« Last Edit: 1 January 1970, 00:00:00 by ZaggyDad »

Duke

  • Guest
(No subject)
« Reply #16 on: 5 March 2008, 17:04:42 »
Ah there is a somewhat strange feature in blender. It saves the model and the Gui settings in the same file and loads them, together.
And the same filetype is used for the standart setup for a new file. So if you resaved as default settings your model got saved as well, that's the reason you always get your landscape back.
« Last Edit: 1 January 1970, 00:00:00 by Duke »

erandur

  • Guest
(No subject)
« Reply #17 on: 6 March 2008, 18:14:45 »
Quote from: "Duke"
Ah there is a somewhat strange feature in blender. It saves the model and the Gui settings in the same file and loads them, together.
And the same filetype is used for the standart setup for a new file. So if you resaved as default settings your model got saved as well, that's the reason you always get your landscape back.


That explains a lot, heh.
« Last Edit: 1 January 1970, 00:00:00 by erandur »