( search forums )
Animated Scenery
Soldat Forums - Soldat Talk - Game Improvements / Suggestions
Anna
September 7, 2005, 11:23 pm
I'm sure this has been suggested before, but not in this amount of detail. Also I can't decide if I'm in favour of putting animated scenery into Soldat, but if it was to be implemented then here is one possible way to do it.


Based on the Map Maker source, I think there could be a simple way to implement animated scenery in Soldat. It might even be possible to do this without changing the map format.

The frames of the animation would go into one bitmap, lined up horizontally in sequence.
Each scenery would need 3 extra values: number of frames, current frame, and time interval.
When rendering the scenery sprites with D3DXDrawSpr, instead of passing NIL as the source rect, a rect specifying what part of the source image to use is passed.
Calculating the source rect is easy: left = currentFrame * (Width / number of frames), right = left + Width, top = 0, bottom = Height
Then there needs to be a way to time it, and increment the current frame value depending on the time interval.

I suspect the extra values could be stored in the TProp record, in the unused bytes. (There is plenty of wasted space in TProp :P ) Then the map file format wouldn't have to be changed, and existing maps would still work with Soldat.


Some drawbacks of animated scenery are that it could be too visually distracting, there is increased potential for abuse, and bitmap sizes would be bigger than for regular scenery.

I know animated scenery is just a visual effect but I think in the hands of a skilled mapper it could add a lot to the atmosphere of a map :)


Some crappy examples:

[IMAGE]
[IMAGE]

(fire and tree gfx taken from Seiken Densetsu 3)

Deleted User
September 8, 2005, 11:51 am
I would really like to see it. And I can't find anything bad about it.

GluLm
September 8, 2005, 2:47 pm
Regarding what you explain, if it doesn't involve changing the map format, I think it'd be one really great improvement in Soldat.
Of course the abuse and stuffs... it's exactly the same deal with cheaters and weapon mods actually. Some idiots may change and abuse at extended limits, but I guess there are even more normal people who would enjoy this feature.
I support the idea because it's a good one. Go go Anna!

Oh yeah and before any stupid prick comes up with "this has been suggested many times already" I'd like to say this quick, yet clever reply: STFU.


Deleted User
September 8, 2005, 2:52 pm
Like I said on IRC:

If anyone tries to abuse animated scenery on maps...don't play on their map :/ this should definitely be added.

Deleted User
September 8, 2005, 2:53 pm
I agree with this. Just *.gif file format support for sceneries. Not a problem.

MisterX
September 8, 2005, 2:58 pm
Would definately be a sweet feature. I don't think there's anything to be said against it, since it wouldn't be much more than static scenery, just instead of 1 picture it'd be an animated picture of 5+ single pictures.

numgun
September 8, 2005, 4:26 pm
it sounds awesome! but will there be more lag from them? coz i hope no. ; )

Keron Cyst
September 8, 2005, 6:15 pm
I've always supported this. Why doesn't Marcinkowski implement it? Will .PMSs (*lol*) have to be rewritten code-wise?...

DeMonIc
September 8, 2005, 6:32 pm
It really helps to read the entire post, and not just the topic title.

If animated scenery is as easy as that, then I think it's really worth implementing :)

cooz
September 8, 2005, 7:19 pm
imo it dont suits soldat style,
vehicles would be nicer

edit:
if its easy to implement why not do it, right?
i can give many new posibilites to map makers,
its good idea.

(im curious why nobody thought about it before...)

Deleted User
September 8, 2005, 8:27 pm
I like it, it'd spice the maps up.

Deleted User
September 8, 2005, 8:42 pm
To be honest, its been submitted a few times, though strangely enough before Anna suggested it (I even suggested it once myself) it's always been shut down.

I like it. I would love to see it happen, and I support this idea 110%.

dr.ON
September 8, 2005, 8:45 pm
Good idea. Nothing else i can say.

Michal
September 8, 2005, 8:58 pm
It's a good idea, but I don't really like those examples. Graphics from crappy snes RPGs don't fit in with the look of Soldat.

I'm sure if it were implemented some people could make really good use of this.

The Geologist
September 8, 2005, 9:11 pm
More power to you for the good ideas. I would love to see this impliment, and quite to the contrary of the above post, I'd love to see graphics of that sort in game. Gives me ideas just looking at 'em.

mar77a
September 8, 2005, 9:23 pm
Looks weird, but i think i could get used :P

Got my support, tho i dont think its very needed...

Deleted User
September 9, 2005, 12:28 am
Man, I can just see the possibilities... Combine this with (animating) ambient light and you could get some seriously awesome effects: blinking lamps hanging from the ceiling in a dark room, lightning strikes, maybe even light reflecting off a surface of water (like a pool)...

Of course, even combining scenery animation with static ambient light would have a multitude of possibilities.

This idea has my seal of approval, not that that means much.

Leo Da Lunerfox
September 9, 2005, 1:12 am
So, from what I understand (And in layman's terms) This means that you put however many bitmaps on top of each other on a map, and then the map will rotate through them, giving that effect of moving scenary?

CottonTheMoth
September 9, 2005, 4:08 am
We all know some noob'd spam up a map with dancing mario's..XD. I really like the idea.. Maybe make aton of sceneries that..OH SNAP GOOD IDEA ALERT!! You could make sceneries the exact same length, and make there appear to be wind by making em all move and look like they're being affected by wind at the exact same time!! :D. Twould be cool..NO DANCING MARIOS!! XD

EDIT: Now dancing Mario BUSHES! Now thats something to think about..:D. Talking about the ones like in super mario bro's 3 when you're selecting the course you're about to do. Left to right bushes...lol.

Or you could make tons of running people(a very long scenery), and put em all on a flat level, and then have tons of men running and you have to stay behind them or something..lol

Just some random ideas..:P

Deleted User
September 9, 2005, 4:33 am
I have always supported this idea, I think it would be an awesome implimentation to soldat and serve much more to good than to bad. If you dont like the map somone has on a server leave the server, that simple. This idea would be great for some of my maps, adding explosions, planes flying by, flack exploding while parachuting down etc, very nice idea indeed. I do hope dear Michal works this into the next version, perty please :p

The @venger
September 9, 2005, 7:13 am
i suggested this once before, but ,the post was deleted immediately..
O_o

Kage
September 9, 2005, 7:58 am
very excellent idea. if you can add a feature without changing the map format, then it's much easier to implement. as for the negative side effects (visual distractions, anim spamming), you could just add an option in the options menu to turn off animations, along with a console command like /animon and /animoff that change start and stop animations - the menu setting would just change the default when joining a game.

DeMonIc
September 9, 2005, 12:19 pm
Just a sidenote, previous Animated scenery suggestions were turned down because it was suggested a long while back, but this idea is a new approach, since it actually has material, and it's very detailed.

SPARTAN_III
September 9, 2005, 12:31 pm
i love this idea, but i believe animated gifs would be better. and i could finally make my warzone map properly.

Chakra`
September 9, 2005, 12:36 pm
From the MM interview... (transcript at www.soldat.nl )


[Chakra] Ok I start with a soldat related questions, people want to know, especially a soldat player named HHH, he wants to know, will soldat ever support .gif sceneries in the background? Because right now we use .bmp files as our images, will any other format of images be supported?
[MM] I don't it is neccessary for other formats, bmp is just fine. I mean I think you want animated sceneries but that would be rather hard to do at the currence.


..maybe you should send an email to the dear boy detailing your proposal Anna. Might change his mind.

Deleted User
September 11, 2005, 7:30 am
oooh anna explained it heaps well, now MM has to do it

GAMEOVER
September 11, 2005, 8:21 am
No reason why it shouldnt/couldnt be added.

vash763
September 11, 2005, 10:02 am
I'm behind this, I would love to see this ingame.

UGK
September 11, 2005, 10:12 am
quote:[i]


Some crappy examples:

[IMAGE]
[IMAGE]

(fire and tree gfx taken from Seiken Densetsu 3)


crappy? wtf are u talking about? thats awesome!

Deleted User
September 11, 2005, 11:32 am
MM is screwed now....oooh i know in the light of the protests in starwars battleground, or what ever, lets riot until this is implemented, everyone talk in capital letters....god that sounds so lame

Deleted User
September 11, 2005, 1:19 pm
wow it see nice!^^
maybe deflection? Oo

Zegovia
September 11, 2005, 1:49 pm
Hell yeah, Seiken Densetsu 3 owns!!! thats really nice.....

117
September 11, 2005, 2:21 pm
<3 this idea...

Now with trees swaying, pred kits and all sorts of funky stuff, i can freak out n00bs that decide to challenge me. Im still thinking of the possibilities... water falling, gusts of wind picking up leaves....

2 n00bs:

n00b 1: what was that?
n00b 2: I saw that tree move
n00b 1: ZOMG THAT HaxX0r! He's USING TREE GOSTEKS!
n00b 2: really?
n00b 1: LOOK! IT MOVES!
n00b 2: Gah! *shoots at tree with barret until all ammo is wasted*

Deleted User
September 11, 2005, 2:58 pm
it sounds awesome! but will there be more lag from them? coz i hope no. ; )

Leo Da Lunerfox
September 12, 2005, 3:11 am
I wouldn't mind having this sort of feature, would make maps much more atomspheric

But what I don't understand is, how can bmp files have frames?

vash763
September 12, 2005, 4:09 am
dude, then you could do animated fog

Deleted User
September 12, 2005, 6:38 am
yeah itll cause lag but if you dont like it join a game with a crappy map :P or get a better internet connection/computer

Kage
September 12, 2005, 3:54 pm
There shouldn't be any extra lag (you could implement it without extra lag, and would) - if you're computer were to run Soldat on a map with animated scenery in single player and was as smooth as before, it would be as smooth as before in multiplayer. Only if your computer was too slow to handle the animations would you see lag (and that's a pretty damned old computer).

Also, gif's would be unappropriate as they are limited in the number of colors they can use to 256, and the format is heavily copyrighted... .png's have all the features of gif's plus some, and is not a copyrighted format. However, Anna detailed a very good solution to using bitmaps as animations, and is probably the easiest for MM to implement, thus I say that bitmaps are the best choice. Also, in addition to the suggested flags for an animation, there should be a framestep, which defaults to the "width" of a frame, but if specified, changes the starting X location of each frame - would make it easier for the "blowing leaves" scenario as with a small framestep of, say, one pixel, the scenery would be a "scrolling animation".

blackdevil0742
September 12, 2005, 7:03 pm
this is absolutely some thing I would like to have :D

Michal
September 12, 2005, 8:45 pm
quote:Originally posted by Leo Da LunerfoxI wouldn't mind having this sort of feature, would make maps much more atomspheric

But what I don't understand is, how can bmp files have frames?


The frames would be side by side on the same bitmap, but in-game only one section of the bitmap would be shown at a time.

Keron Cyst
September 12, 2005, 11:44 pm
Yeah, I've seen that method in plenty of games.

Kage
September 13, 2005, 2:50 am
Yes, in many, many games. I could even write out the algorithms necessary to find a given frame in pseudo-code for MM if he'd like (with support for a framestep value), not that it's the most advanced programming any of us has seen.

Deleted User
September 13, 2005, 8:50 am
alright kage get writing :P

Kage
September 13, 2005, 8:12 pm
eh... alright.

as shown by Anna, this isn't too difficult.

assuming you need just two points, the top left (we'll call that p1) and the bottom right (p2) points, here it is:

below, it is assumed that height is equal to the height of the bitmap, while width and framestep are in some way or another by the modder, if not specified, width should be set to equal height, while framestep would be set to equal width. time, though not in the below example, would be specified by the modder, and would either be the time (in ticks) that any given frame is displayed, or the rate (in something like "frames per second") that the animation is played at. i'll leave it to MM to decide which he'd prefer.

to calculate the total number of frames before the animation is played the first time:
num_frames = round_down(bitmap_width / width)

example: 14 = round_down(255 / 18)

using num_frames, you can put the following somewhere in the game loop:
[code]set p1_X to current_frame * frame_step
set p2_X to p1_X + width
set current_frame to current_frame + 1
if current_frame equals num_frames then set current_frame to 0[/code]
the above method provides the coordinates necessary to either generate each frame just before it is played (more processing time), or can be slightly modified to load up all frames before the game starts (more memory required). also, p1_Y is always set to 0, and p2_Y is always set to height.

i'll see if i can't translate this directly into pascal when i have more time (and some pascal code to use as a reference).

Deleted User
September 13, 2005, 10:23 pm
damn, thats what you get when you try to be a smartass, good job mate

Deleted User
September 14, 2005, 5:34 am
sweet idea

Guil
October 1, 2005, 5:30 am
I Like it too.

UnRadiant
October 1, 2005, 6:38 pm
This could really spice up the game...

Jack Bauer
October 5, 2005, 1:16 am
Omg it would be really cool those pictures you made or got from somewhere, lol.
The problem is, the game will have more lag, and it can go slower :S

xtishereb
October 5, 2005, 3:42 pm
An example of the animated .bmps would be the explosions and flames. When you look at them in the folder, they're a bunch of .bmps. But, in-game, they're sequenced and become animated, and I'm sure I don't need to describe the optical illusion of animation.

And as long as we're talking about different image files, there should be something smaller than .bmps, .jpgs have poor quality, so it would best to use .gifs or .pngs, 'cause .bmps are HUGE (comparitively).

Deleted User
October 5, 2005, 6:53 pm
I think my eyes will love it.
We can finally play lemmings!
And we had better post FAP Marshall BM in every map.

Deleted User
October 6, 2005, 12:33 am
quote:Originally posted by xtisherebAnd as long as we're talking about different image files, there should be something smaller than .bmps, .jpgs have poor quality, so it would best to use .gifs or .pngs, 'cause .bmps are HUGE (comparitively).

Right now MM hasn't any plans for incorporating any graphic formats beyond the bitmaps Soldat already uses--which is okay, as long as you keep the files small. Anyone who puts a ginormous animation in the map they've made will just get pointed and laughed at in the New Maps forum and told to get rid of it/make it smaller.

Deleted User
October 6, 2005, 2:15 pm
I love this idea, many times suggested before.
And I still love it !
]: )