Theme related suggestions

31 replies [Last post]
KoBeWi
KoBeWi's picture
User offline. Last seen 3 days 21 hours ago. Offline
Joined: 2010-12-25
Posts: 564

#1 - Better girder masking
Currently, girder height is ignored. It shouldn't.

Maybe only half girder should be made if there's not enough place.

#2 - Multiple covered rectangles per object
This would allow to make corner objects, bridges or columns connecting floor with ceiling.
It requires one additional number for object to specify number of covered rectangles. To not break current themes, amount of numbers could be checked when making object. If it is odd (like currently), it assumes one covered rectangle. Additional number will make even value, which is then treated accordingly.

#3 (extra) - Sudden Death land texture and objects
Seems impossible, but it isn't. To make it work, every object position and type should be saved. Then when Sudden Death starts, land texture is redrawn on every solid space and then objects are replaced with their SD equivalents, which are drawn on their position (of course only on solid parts). Player-placed and normal girders could just be added to objects (which would allow SD version of girders).
This one is just additional suggestion, originally I was going to give only two.

Any thoughts? I know these are only cosmetic and a bit complicated changes, but especially second one, gives fun possibilities.

Wuzzy
Wuzzy's picture
User offline. Last seen 2 weeks 4 days ago. Offline
Joined: 2012-06-20
Posts: 1301

I agree with all suggestions 100%!
Smile

The Farm theme would benefit from suggestion #2, because it as a fence as object.

Hi, I am a Hedgewars developer. Smile

sheepluva
sheepluva's picture
User offline. Last seen 5 days 2 hours ago. Offline
Joined: 2009-07-18
Posts: 563

Hmm.

ad #1 Yes, create a bug issue please.
ad #2.Would be cool, themes could be made more diverse. Maybe create a feature request issue?
ad #3 Hum. That's a very ambitious idea :p

  sheepluva <- me  my code stats -> 
a Hedgewars Developer


   <- where I'm from  what I speak -> 

nemo
nemo's picture
User offline. Last seen 2 weeks 2 days ago. Offline
Joined: 2009-01-28
Posts: 1861

Retexturing terrain only (lfBasic) wouldn't require keeping track of everything.

--
Oh, what the heck. 1PLXzL1CBUD1kdEWqMrwNUfGrGiirV1WpH <= tip a hedgewars dev

KoBeWi
KoBeWi's picture
User offline. Last seen 3 days 21 hours ago. Offline
Joined: 2010-12-25
Posts: 564

Um, two more ideas: (#1 and #2 have issues created BTW)

#4 - Floating flakes
Currently, flakes are assumed to be falling down and they disappear when they leave on bottom and appear on top. But it's possible to make negative falling speed. However, flakes will then float infinitely and not appear on bottom as they should, leaving map without flakes. So this could be fixed. Maybe Bath theme would benefit a bit from floating bubbles.

#5 - Fake water
Ok, this may be out of place, but who actually said, that each theme needs water? What if the water was "fake" (optionally in theme), generating no splashes? Then hogs would just fall out of map, so we could make abyss at the bottom or fire etc. This may be against fundamentals of this game, but I'll just leave it here Smile

(after more thoughts, since you can "hide" splash and drops, all that is needed is possibility to change splash sound. Currently only images can be "modded", so this would need new functionality though. Also, animated water would be a nice bonus too)

sheepluva
sheepluva's picture
User offline. Last seen 5 days 2 hours ago. Offline
Joined: 2009-07-18
Posts: 563

#1 was fixed btw

  sheepluva <- me  my code stats -> 
a Hedgewars Developer


   <- where I'm from  what I speak -> 

h3oCharles
h3oCharles's picture
User offline. Last seen 5 days 27 min ago. Offline
Joined: 2012-10-19
Posts: 129

KoBeWi allegedly wrote:

#5 - Fake water
Ok, this may be out of place, but who actually said, that each theme needs water? What if the water was "fake" (optionally in theme), generating no splashes? Then hogs would just fall out of map, so we could make abyss at the bottom or fire etc. This may be against fundamentals of this game, but I'll just leave it here Smile

My good example theme, VoidNature_v1 from my Match Making package.
EarthRise and DeepSpace are very good examples of needing this. If there would be water in space, it would be ice. Or stronger than ice that's possible on earth.

My suggestions:
- Allow more land objects
- Random water related graphics
- Allow bigger size of Sky and horizont. Maybe I will make a ClimbHome theme?
- Mask only land objects
- Random AND animated flakes. I wouldn't expect that to happen, because that is impossible to make with the power currently.
- 3rd 'Sky' layer, between Sky and horizont. That will make a lot of benefits, especially to themes like Farm (from DLC), Nature, Sheep, Snow and Hoggywood, where they have stuff in Sky.
- Remove instant skip animation of drowning when water-opacity = $FF and/or 255. Its really annoying for me that i cant see that hogs are drowning. Good examples: Compost, Underwater.
- No freezing of SD flakes when normal flakes are not present in theme.cfg

oh hi

nemo
nemo's picture
User offline. Last seen 2 weeks 2 days ago. Offline
Joined: 2009-01-28
Posts: 1861

Theme can override splashes and water. Although it can't override drowning animation.
A theme w/ nothing but solid black below the map would avoid that ofc.

--
Oh, what the heck. 1PLXzL1CBUD1kdEWqMrwNUfGrGiirV1WpH <= tip a hedgewars dev

KoBeWi
KoBeWi's picture
User offline. Last seen 3 days 21 hours ago. Offline
Joined: 2010-12-25
Posts: 564

Some more random ideas:

#6 - Mirrored flakes/clouds (*IMPORTANT*)
The current system is very limiting. You can't make sprites facing any direction, because wrong wind will make it fly backwards, which doesn't look good. The options to fix this are either FlakeL/FlakeR graphics or "mirror clouds/flakes" keys in theme config, with default direction defined. Sprites of course would then change depending on wind.

#7 - Water-covered objects
I'm making a Sky theme and I thought it would be nice to make a huge beanstalk. But it wouldn't look good if it wasn't coming from below clouds (water). And it's impossible. But actually, I don't know how would it be implemented in a way that makes sense (stupid idea is to make 'negative object count' to indicate it can be covered by water).

#8 - Multiple girders per theme
This is more for fun rather for practical reasons. It can be achieved by a key in cfg: "girder = image, probability". It would be more fun if girders could be then masked, for indestructible or bouncy girders etc..

#9 - Infinite horizonts
Like KarBoy's third sky layer thing, but without limits. Again: "horizont = image, layer, speed" or something. Just an idea.

EDIT: (playing with necromancy, lol)

#10 - Foreground objects
This came in my mind when I saw hedgehogs floating on my castle:

Other than making hole slightly bigger in the mask (which I've done currently), the protruding bricks could be passable. But the problem is that they appear below hedgehog. So my idea is to allow for making an object that appears above hedgehog.

This:

vs this:

Better uses include making hollow wooden logs or pipes. It would allow to make themes more lively. Maybe active hedgehogs could make the foreground locally transparent, so you know where you are standing.

nemo
nemo's picture
User offline. Last seen 2 weeks 2 days ago. Offline
Joined: 2009-01-28
Posts: 1861

Hey Kobwei. While current system doesn't allow foreground objects, you know you can use masks on objects to do "cutaways" right? So a hollow log could have a solid background colour. It wouldn't look quite as nice, but maybe if the top of the tunnel seemed to wrap down a bit to emphasise the curve of the log it might work?

Overall nice ideas and some are pretty easy to implement like flake direction.

--
Oh, what the heck. 1PLXzL1CBUD1kdEWqMrwNUfGrGiirV1WpH <= tip a hedgewars dev

KoBeWi
KoBeWi's picture
User offline. Last seen 3 days 21 hours ago. Offline
Joined: 2010-12-25
Posts: 564

nemo allegedly wrote:
a hollow log could have a solid background colour.

I just gave an example with the log. Though I might make a pipe for one of the themes I'm planning. But such objects would work better with my #2 suggestion here.

nemo allegedly wrote:
Overall nice ideas and some are pretty easy to implement like flake direction.

Thanks, I wrote them 8 months ago. I just made the edit today.

nemo
nemo's picture
User offline. Last seen 2 weeks 2 days ago. Offline
Joined: 2009-01-28
Posts: 1861

Heh. Well, I did comment prior, but, eh, that particular suggestion just caught my eye again and was thinking it would be like 5 minutes to add it to the game.
We're being slow on next release anyway ☺

--
Oh, what the heck. 1PLXzL1CBUD1kdEWqMrwNUfGrGiirV1WpH <= tip a hedgewars dev

Wuzzy
Wuzzy's picture
User offline. Last seen 2 weeks 4 days ago. Offline
Joined: 2012-06-20
Posts: 1301

I have a suggestion, too:

Confined spray areas.

With this feature you can restrict where Hedgewars plays sprays.

It could be done by extending the syntax of “spray” in theme.cfg.

After the first two parameters (name and amount), there can be any multiple of 4 of parameters. Each set of 4 parameters specifies a set of LandTex.png coordinates in which placement of the spray is valid. To place a sprite, Hedgewars will choose a random position out of this set. Hedgewars shall use the spray's center coordinates for placement.

The syntax of those 4 parameters shall be:
x, y, x_length, y_length

x, y: x and position of the upper left corner of the rectangle in which the spray may be placed. The coordinates are the image coordinates of LandTex.png.

x_length, y_length: x and y size of the rectangle. For a fixed position, the user can just specify 0, 0 here.

Examples:
spray1, 10, 45, 45, 0, 0
May only place spray1 at position 45,45 of LandTex.png. That is, the center of spray1 goes to 45,45.

spray2, 10, 45, 45, 10, 10
May place spray2 anywhere between 45,45 and 55,55 of LandTex.png.

spray3, 10, 1, 1, 0, 0, 100, 100, 0, 0
May place spray3 either at position 1, 1 or 100, 100.

spray4, 10
Can place spray4 anywhere, this is how themes already work. No change required.

Use case: Proper alignment of capacitator sprays of Teknologi, posted here: http://hedgewars.org/node/6464

Hi, I am a Hedgewars developer. Smile

KoBeWi
KoBeWi's picture
User offline. Last seen 3 days 21 hours ago. Offline
Joined: 2010-12-25
Posts: 564

Any chance some of these will appear in next release? Especially #2 and #6. #5 would be useful too, but less important.

I wanted to try tinkering with the code myself, but I didn't manage to build the source. I tried for hours ;_; Can't do it on Linux and I don't want to litter my Windows.

KoBeWi
KoBeWi's picture
User offline. Last seen 3 days 21 hours ago. Offline
Joined: 2010-12-25
Posts: 564

IT WORKS!

After I successfully compiled Hedgewars, I tried to implement the suggestion #2. Well, here's the result:

Especially the last image is interesting, because of big holes between parts of objects (look even at the chains to the right, they are in groups of 3, but I made separate hanging points).

I hope it wasn't done already, because I'm not up to date with latest HW build ¬_¬

Anyways, here's the modified uLandObject.pas, that does this:
http://pastebin.com/MmPfWCBA

Changes are around lines 47 (added two values to TThemeObject), 347 (modified CheckCanPlace) and 647 (modified object loading, it counts commas to determine if there are multiple 'inlands').
It comes from 0.9.22

How should I contribute the changes in a proper way, rather than posting them here?

EDIT:
Any comments on this?
Annoyed

Lyberta
Lyberta's picture
User offline. Last seen 3 years 33 weeks ago. Offline
Joined: 2016-09-10
Posts: 177

Not sure about Mercurial, but in a git world you fork the repository, commit to your local fork and then make pull request.

nemo
nemo's picture
User offline. Last seen 2 weeks 2 days ago. Offline
Joined: 2009-01-28
Posts: 1861

Mercurial would be same.

--
Oh, what the heck. 1PLXzL1CBUD1kdEWqMrwNUfGrGiirV1WpH <= tip a hedgewars dev

KoBeWi
KoBeWi's picture
User offline. Last seen 3 days 21 hours ago. Offline
Joined: 2010-12-25
Posts: 564

So I managed to create a commit, but it's on branch 0.9.22. Should I just push it, or re-branch it somehow??

nemo
nemo's picture
User offline. Last seen 2 weeks 2 days ago. Offline
Joined: 2009-01-28
Posts: 1861

Well, it would make sense to merge it into your tip. Or just strip it/roll back and recheck it into tip.

--
Oh, what the heck. 1PLXzL1CBUD1kdEWqMrwNUfGrGiirV1WpH <= tip a hedgewars dev

KoBeWi
KoBeWi's picture
User offline. Last seen 3 days 21 hours ago. Offline
Joined: 2010-12-25
Posts: 564

So, I can't use push, because it needs authorization ;_;

I found this page, however it doesn't mention any "pull requests", but patches. Should I create a patch and post it here maybe?
(I don't know what to do anymore, sorry Hiding )

EDIT:
Also, regarding #4, I found this line:
// if round(Y) < (LAND_HEIGHT - 1024 - 75) then Y:= Y + 25.0; // For if flag is set for flakes rising upwards?

When I uncomment it and just copy the teleporting lines from below (changing - to +), flakes appear at bottom as expected. But that would be too simple, right?

nemo
nemo's picture
User offline. Last seen 2 weeks 2 days ago. Offline
Joined: 2009-01-28
Posts: 1861

So... With DVCS what you do is you put your local repo copy somewhere where people can see it.
Either by running your own (usually HTTP-based) host (like https://www.mercurial-scm.org/wiki/hgserve)

Or by pushing your local repo copy to some remote location (like bitbucket).

You then ask the devs if they mind pulling in your changes to make them official. Like here on this forum ☺

If the devs agree, it'll show up on official.
And if you keep doing nice things for a project they may give you that commit access.

--
Oh, what the heck. 1PLXzL1CBUD1kdEWqMrwNUfGrGiirV1WpH <= tip a hedgewars dev

KoBeWi
KoBeWi's picture
User offline. Last seen 3 days 21 hours ago. Offline
Joined: 2010-12-25
Posts: 564

OK, so I cloned the Mercurial repository to my GitHub, cloned git repo locally, then copied the changes from old local repo and commited to my git.

Here are the results:
for #2: https://github.com/KoBeWi/myHedgewarsBranch/commit/12c47c691029c19620e680c5fe9e6667399fa9db
for #4: https://github.com/KoBeWi/myHedgewarsBranch/commit/043eb1fb947a3f2407373140264f9d376b7649a0

However the first one has some problems, because I copied whole file from 0.9.22 and it seems like it was changed for dev branch, so these changes were reverted ¬_¬
Since I switched to dev, I can no longer run the game with new code, so if I'd copy only my changes to the new file, I couldn't test it. So, uh, I hope it's not that much of a problem.
Hiding

sheepluva
sheepluva's picture
User offline. Last seen 5 days 2 hours ago. Offline
Joined: 2009-07-18
Posts: 563

I'm in a tramway, but had a look.

What's up with all the Pred() removals?

EDIT:
Also not a fan of all dat random in second diff.
Would be cleaner IMO if flakes generated a random value of how much pix they live past the limit once and stored it in their data. Rather than running two randoms for every flake ever single frame.

  sheepluva <- me  my code stats -> 
a Hedgewars Developer


   <- where I'm from  what I speak -> 

KoBeWi
KoBeWi's picture
User offline. Last seen 3 days 21 hours ago. Offline
Joined: 2010-12-25
Posts: 564

sheepluva allegedly wrote:
What's up with all the Pred() removals?
Looks like they were added after 0.9.22. This time I used the up-to-date file and just added my changes there, to it's fixed.

sheepluva allegedly wrote:
Also not a fan of all dat random in second diff.
It was like this originally. I just uncommented the condition that checks if flakes are too high and copied the code from below.

Here are the fixes (also changed the tabs to spaces): https://github.com/KoBeWi/myHedgewarsBranch/commit/7041168f0c2eeb22861b2594af92db4cf41249cf

KoBeWi
KoBeWi's picture
User offline. Last seen 3 days 21 hours ago. Offline
Joined: 2010-12-25
Posts: 564

#5 done: https://github.com/KoBeWi/myHedgewarsBranch/commit/5d3e377a1abe262713c89ed8a5602bc490e726c2

I added support for alternate sound paths, and sounds related to water will be first searched in theme directory. So if you put silent sounds + empty splash textures you can "remove" water. Or replace it with anything else.
I'll now try to allow for animated water. (this will be fun if I succeed)

Too bad my VM refuses to play sound after it crashed ¬_¬

EDIT:
I managed to divide water into frames of arbitrary size. I used the fact, that sprites with 'getDimensions' always have dimensions set to 0. So I used negative value as a "signal", that sprite should be treated properly. -1 Height is used for BlueWater and it divides sprite into watFrames frames of equal size (actually, it sets Height to imageHeight/frames).

Now, watFrames is new theme variable, which can be changed with new key:
water-animation = frames, frame ticks, movement speed

Movement speed is speed the water is moving (it's currently constant, right?). So you can make e.g. static water.

Now I have to make the sprite animate. Hopefully I can do this by looking at flakes code. (EDIT2: Nope, water is drawn in a completely different manner ;_; )

EDIT3:
Done: https://github.com/KoBeWi/myHedgewarsBranch/commit/65aad43613fe018e127e8622cbc7f413ea454389

(done this gif with screenshots, but it gives the idea)

Default values for water-animation and sd-water-animation are:
1, 0, 10

So default speed is 10. It's because I use RealFrames shr (16 -waterSpeed) formula for water movement. I tried to multiply RealFrames with some real number, but for whatever reason, the water didn't move at all if I used non-integer number (it worked and then it didn't, lol). But it gives enough control on the speed, plus no one actually requested it, so it's not something that will be used too often.

Anyways, water animations allow to make e.g. static bubbling lava (something for my Bowser theme) or fire or rainbowy psychodelic water. Then I realized that fire or abyss isn't actually that good idea, because even if I remove splash, game will show drowning texts ¬_¬
Oh, well...

Still, fun thing to have. Also, the same way I did animated water, there could be animated sky or horizon.

KoBeWi
KoBeWi's picture
User offline. Last seen 3 days 21 hours ago. Offline
Joined: 2010-12-25
Posts: 564

#6: https://github.com/KoBeWi/myHedgewarsBranch/commit/fa03120837b18a714b5f7f79b1bb4f9f7f47b45d

Themes can have (SD)CloudsL and (SD)FlakeL and they will display accordingly depending on the wind.

KoBeWi
KoBeWi's picture
User offline. Last seen 3 days 21 hours ago. Offline
Joined: 2010-12-25
Posts: 564

Wuzzy allegedly wrote:

I have a suggestion, too:

Confined spray areas.

With this feature you can restrict where Hedgewars plays sprays.

It could be done by extending the syntax of “spray” in theme.cfg.

After the first two parameters (name and amount), there can be any multiple of 4 of parameters. Each set of 4 parameters specifies a set of LandTex.png coordinates in which placement of the spray is valid. To place a sprite, Hedgewars will choose a random position out of this set. Hedgewars shall use the spray's center coordinates for placement.

The syntax of those 4 parameters shall be:
x, y, x_length, y_length

x, y: x and position of the upper left corner of the rectangle in which the spray may be placed. The coordinates are the image coordinates of LandTex.png.

x_length, y_length: x and y size of the rectangle. For a fixed position, the user can just specify 0, 0 here.

Examples:
spray1, 10, 45, 45, 0, 0
May only place spray1 at position 45,45 of LandTex.png. That is, the center of spray1 goes to 45,45.

spray2, 10, 45, 45, 10, 10
May place spray2 anywhere between 45,45 and 55,55 of LandTex.png.

spray3, 10, 1, 1, 0, 0, 100, 100, 0, 0
May place spray3 either at position 1, 1 or 100, 100.

spray4, 10
Can place spray4 anywhere, this is how themes already work. No change required.

Use case: Proper alignment of capacitator sprays of Teknologi, posted here: http://hedgewars.org/node/6464

I managed to do this. If you could give me values for sprays for Teknologi, I could test if the theme looks any better with it.

UltiMaxKom
UltiMaxKom's picture
User offline. Last seen 4 years 13 weeks ago. Offline
Joined: 2016-06-26
Posts: 381

SpoilsDoThis allegedly wrote:

I Notice something :

ISee: allegedly wrote:

... If you could give me values for sprays for Teknologi, I could test if the theme looks any better with it.

'Teknologi' ?

I really surprised for it,,, is it a little typing error [Technology] which not a problem and i wrong
Or
It is the way you want to write it ???

Sorry, no offense but just curious,,,

I surprised because You use word that "Same" as my country's language to say "Technology" [Teknologi = Technology[In Bahasa of Indonesia]]

If i not wrong,,,
Poland use Flag as "White-Red" colour which splited horizontally at the centre of it,,, which ALMOST Same as my country's flag that use "Red-White" colour that splitted too like Poland's Flag, but just invert of it...

Sorry Filling your post with this XD
And Thank you

]{

╟───NW──────┼──────N╢

╓──────────────────╖ ╓──────────────────╖
⠀HP: ██████████ 1E9/1E91E9/1E9 ██████████ :MP
╙──────────────────╜ ╙──────────────────╜

KoBeWi
KoBeWi's picture
User offline. Last seen 3 days 21 hours ago. Offline
Joined: 2010-12-25
Posts: 564

UltiMaxKom allegedly wrote:
'Teknologi' ?

That's the theme name this feature was requested for: http://hedgewars.org/node/6464

UltiMaxKom
UltiMaxKom's picture
User offline. Last seen 4 years 13 weeks ago. Offline
Joined: 2016-06-26
Posts: 381

Oh Hell Yeah For Me X_X

Sorry,,, XD ! Such a Donkey...

]{

╟───NW──────┼──────N╢

╓──────────────────╖ ╓──────────────────╖
⠀HP: ██████████ 1E9/1E91E9/1E9 ██████████ :MP
╙──────────────────╜ ╙──────────────────╜

KoBeWi
KoBeWi's picture
User offline. Last seen 3 days 21 hours ago. Offline
Joined: 2010-12-25
Posts: 564

Wow, this is old.

Anyways
#11 More terrain flag granularity
Right now we have ice, which makes girders slippery. That's a bit lame. What if it affected whole terrain? What if we could make everything bouncy?

The syntax would be:
[terrain type] = [terrain flag]

Where [terrain type] could be:
-girder
-tool (optionally, above could affect both land and placed girders)
-land

[terrain flag]
-normal (default)
-bouncy
-slippery
-etc.

E.g.
land = slippery
girder = bouncy

Would make whole land slippery and all girders bouncy.

#12 Animated clouds
#13 SD Sky and animated sky

Wuzzy
Wuzzy's picture
User offline. Last seen 2 weeks 4 days ago. Offline
Joined: 2012-06-20
Posts: 1301

#11
Making all girders bouncy by theme is a bad idea, as this would make it impossible to place a non-bouncy girder. Remember we already have bouncy girders, they are called “rubber”. IMO it's important we have both the normal girder (which is never bouncy) and rubber (which is always bouncy). If the theme is allowed to make all girders bouncy, then there is no real gameplay distinction between girder and rubber anymore (except a minor difference in shape).

Making the entire terrain slippery seems problematic as well. This could lead to many ugly surprises. For example, the hog spawn positions can be a problem if many hogs spawn at slopes ... It would be much more difficult to find “safe” spawn positions for hogs, and that could be a real problem. I might be wrong and maybe there's a way to figure out a solution, but frankly, I don't think it's worth the effort.

For fun, you could create an all-slippery image map yourself and see for yourself.

Another thing: Even if this would work, this would make more sense if it gets enabled in the game scheme, rather than the theme. Similar to the indestructible land mode.

Frankly, I think the increased granularity of landflag settings in themes is pretty overkill. Too much complexity. It's already not always obvious to players when land is slippery. Sad Smiley
In general, I'm not too happy in allowing themes to screw with gameplay too much.

One thing I might be onboard with you is allowing to enable slippery land girders and placed girders separately, but that should be it.

Anyway, changes in this area should be done with care. I wouldn't rush to add those.

#12
Yes.

#13
SD sky: Yes. We already have that one on our bugtracker.

Animated sky: Well, I would like an animated sky, but the question is how. I think just making Sky.png do a simple frame-based animation (1 image per frame) won't be practical, the file size would just explode. We would need to think of a better system to make the background more “alive” in general.
One idea that comes into mind is to use smaller images, and animate those, and just paste them into the background with a theme-defined offset or something like that.

---
I also like to add one: In our bugtracker, we have an ancient theme suggestion that suggests we add some stars high above the clouds (but completely optional, of course).

Hi, I am a Hedgewars developer. Smile

User login

Copyright © 2004-2024 Hedgewars Project. All rights reserved. [ contact ]