Page 1 of 1
Wondering if I should stick my hobby game into stratagus.
Posted: Sat Feb 11, 2012 10:46 am
by b_o
I've been thinking about sticking the graphics from my hobby game into stratagus for a while. What I'd need to do first is get stratagus to accept different sized tiles. I'm currently using two different sizes of tiles together, so I'm not sure I could get stratagus to accept them in their current state.
I thought I'd share some screen shots of what I'm thinking of putting into stratagus and perhaps any of the stratagus programming experts reading this could tell me what could and couldn't be done with stratagus, or what would need to be changed, or better yet: make the code changes for me.
I currently have object based trees which I'd rather use instead of the tile based trees I've made, but I'm not sure if object based trees would be easily implemented into stratagus. If it would be too difficult, I'd settle for using my tile based trees.

- This is what I mean by object based trees. They aren't part of a tile-set, and can be walked under.
- rep.png (38.74 KiB) Viewed 16553 times

- There is a unit depth so that the top of the units and trees covers the bottom of other units and the bottom of trees.
- orcs.png (24.48 KiB) Viewed 16553 times
I'd also like to have randomized unit appearances:

- These goblin wolf riders are essentially the same unit, but have different appearances.
- wridersl.png (35.78 KiB) Viewed 16553 times
Re: Wondering if I should stick my hobby game into stratagus
Posted: Sun Feb 12, 2012 4:14 am
by jarod42
Different sized tiles should not be possible in stratagus, but bos have support for "patch" (which is "equivalent" to multiple tiles).
Trees can be units which can be harvested (like in bos) (already supported).
To be able to walk "under", unit have a tilesize of 1x1 (32x32 pixels) but using a bigger graphism (30x100 pixels per example). (already supported).
We don't support natively multiple graphisms per unit, but we can "randomize" the unit to create.
we have to tell to the AI these units are equivalent (already supported).
Re: Wondering if I should stick my hobby game into stratagus
Posted: Sun Feb 12, 2012 12:19 pm
by b_o
Thanks for your response, You've made things a lot clearer.
But what exactly is "patch" from boswars, and is it something that could be brought into stratagus? Is that where groups of tiles are treated as one big tile?
I've heard that the person who made windgus was able to successfully test changing the tile-size in stratagus (which is supposedly linked to the movement grid?), so I wasn't worried about having a non-standard tile-size, what I am worried about is having two separate tile-sizes and being able to place tiles on top of other tiles. Is it possible to have multiple tiles placed on top of each other, with some tiles having transparent portions in order to reveal portions of the tiles beneath them?
Also, I'm wondering if it would be possible to change the fog of war to look more like actual fog.

- It would be nice if the fog of war looked more like fog. ... I already know that the selection circle under the elf still needs the Y offset adjusted.
- screenshot117.png (479.71 KiB) Viewed 16546 times
Re: Wondering if I should stick my hobby game into stratagus
Posted: Sun Feb 12, 2012 9:15 pm
by jarod42
In boswar, a patch is a shape that "contains several stratagus-tile", I think it should not be overlapping.
I don't know how difficult it is to bring that in stratagus :/ but bos war have removed lot of hard-coded stuff from tile
which are still in stratagus (and needed for wargus

).
Tile is currently a problem in stratagus. :/
Tile is use as grid movement.
Fog of war is a graphism so you could change it, and you can choose its opacity.
Unseen regions are black and not a custom graphic. Changes in the engine are required for support that.
Re: Wondering if I should stick my hobby game into stratagus
Posted: Mon Feb 13, 2012 10:07 am
by Kyran
b_o wrote:Is it possible to have multiple tiles placed on top of each other, with some tiles having transparent portions in order to reveal portions of the tiles beneath them?
Being able to have multiple layers would be a neat thing to have. What are some of the things you're using two tilesets for?
Re: Wondering if I should stick my hobby game into stratagus
Posted: Mon Feb 13, 2012 3:44 pm
by b_o
thanks again jarod.. its nice to know that the fog can have different opacity.
Kyran, I'm mostly using two tile sets because I've made two with different sized tiles.. I started out with one size, then made another tileset for a different project of a different size, but now I'm using both sets together for more variety of ground texture.. but both tilesets were designed to have multiple layers of tiles.. for example, instead of having a tile with a border between grass and dirt, I just have grass bordered with transparent.. then I can have the same grass tile border with dirt, stone, other grass, water, whatever, because the transparent portion will show whatever is beneath. It allows for more diversity with fewer tiles.

- The first tile on the left has a transparent portion represented by black, I place this over a solid water tile or a solid dirt tile to achieve a border, without requiring a multitude of different border tiles.
- tiles.png (4.86 KiB) Viewed 16538 times
Another thing it might be useful for is how the buildings in warwind functioned, with disappearing roofs, though that may be more complicated since it would have to be triggered somehow.

- I have some interior tiles which could be displayed underneath a layer of roof tiles which would disappear when the building is entered.
- food.png (43.35 KiB) Viewed 16538 times
Ideally, I would like to have the map functionality of the tactical portion of X-com 1 & 2, with multiple altitude levels, and the use of stairs and gravity, though I realize that stratagus is nowhere near ready for something like that. It would require multiple movement grids at different altitudes with the ability to move between grids. I kind of doubt that will happen.

- stairs leading to different levels
- stairs.png (18.15 KiB) Viewed 16538 times
Re: Wondering if I should stick my hobby game into stratagus
Posted: Tue Feb 14, 2012 11:00 am
by Kyran
I'm pretty sure multiple altitude levels is definitely out.
Disappearing roofs, sounds doable. Should definitely come up with a list of these cool ideas... and then get some developers to implement them.
Disappearing roofs may be doable right now. Mm, make a unit that on touch disappears? Oh yeah, it's doable.
Code: Select all
If unit man & unit roof within x,y and x,y remove unit roof
elseif unit man & unit roof isn't within x,y and x,y, add unit roof
Re: Wondering if I should stick my hobby game into stratagus
Posted: Tue Feb 14, 2012 9:29 pm
by jarod42
Kyran wrote:Disappearing roofs may be doable right now. Mm, make a unit that on touch disappears? Oh yeah, it's doable.
I don't think that hacking like this is a good solution.
Don't forget there is very few people developing on stratagus currently :-/
Re: Wondering if I should stick my hobby game into stratagus
Posted: Wed Feb 15, 2012 4:29 pm
by b_o
What is not good about that solution? and where would the code go exactly?
Re: Wondering if I should stick my hobby game into stratagus
Posted: Sat Feb 18, 2012 7:30 am
by Kyran
I think the best place to put the code is in the campaign mission definition file. You could also stick it directly in the map file, or stick it in an AI. Whatever you prefer.