Solved About video background

Question that is answered or resolved.

MMK

New member
Hi everyone,
I'm pretty new to OpenBor so this can be a ridiculous question: Is there a way to us a video in the background and make it synch with the movement? Think a video going right, it stops when the character stops and plays when the character moves. Of course it needs to be tied to in game camera for a reasonable movement.
Thanks
 
Welcome to the community @MMK.

OpenBOR supports webm playback, but you're going to have a difficult time positioning it and controlling the start/stop like that. I've never tried such a thing and would need to look through the source code to make sure you can at all.

In truth though, it sounds like you are trying to create a specific set piece or effect that is probably best done another way. Could you give us some details on your end goal?

DC
 
  • Like
Reactions: MMK
Welcome to the community @MMK.

OpenBOR supports webm playback, but you're going to have a difficult time positioning it and controlling the start/stop like that. I've never tried such a thing and would need to look through the source code to make sure you can at all.

In truth though, it sounds like you are trying to create a specific set piece or effect that is probably best done another way. Could you give us some details on your end goal?

DC
Thank you. I'm trying to create a background like this.

VillainousHeavenlyBlackrussianterrier-size_restricted.gif


The video doesn't need to be moving but frames of it should progress with the movement. It's an old animation trick from Fletcher studios.
 
@MMK, it seems like what you really want is full 3D stages. You can't really do that with video playback. Well, I suppose you could, but it would be a convoluted mess to get going. The good news is you don't need it because OpenBOR supports 3D stages. Here's a couple of examples, each using their own technique:

Rocket Viper 2. The creator of this module just took a screenshot of every possible scroll position, loaded them as images and then a script plays them back based on your coordinates. This has the advantage of simplicity. The main downside is that the background only looks 3D. In actuality it's just a flat image you can't do much with.

Golden Axe The Hackjob (mine, not released yet). I leveraged the engine's affine transform capabilities to create the grass and sky, then added trees, hills and such with background layers. The walking area is a flat plane, but that's an intentional design choice. This technique gives you true 3D depth. The objects are "real", so you can move in front or behind them. The only drawbacks are that you have to know what you are doing with the engine and your image editor of choice to make the layers.

Same game at the select screen. It's a similar technique as the in game stage, but created entirely from script as the native Select Screen only offers one background layer:

Fatal Fury Chronicles. This stage is just something I was playing around with for kicks. It's really just a bunch of background layers with different affine transform and scroll settings to build the illusion of a half-pipe:

In any case, the point is the engine supports your visual example and then some. For example, you can have portions of the foreground apply selective transparency so they don't obscure the action.

QOXqIVh.png


In fact, the hard part isn't going to be getting it into the engine. It's going to be capturing that image in the first place. By that I mean getting shots where foreground portions aren't in the way. That should give you rough idea to work with. Depending on what your needs are we can discuss the details of each technique.

DC
 
@DCurrent Thanks a lot for this amazingly detailed answer. One thing I forgot to mention, even though I'm new to OpenBOR, game engines and overall digital image creation isn't new to me. I'm a professional animator. So I'm very familiar with concepts like motion parallax etc. (Just wanted to mention so that we can jump into detailed discussions)

The technique in Rocket Viper 2 is the one I'm interested in. Even though creating a nice parallaxing background can be very nice and complimentary, there's an authenticity to a pre-rendered background.

I mentioned video, because (as in R.Viper 2 example) using image sequences would be very costly for file size. Especially for long levels. Controlling frames of an optimised video should be more feasible. What do you think?

I'll try to come up with some animation and artwork to test things out.

Thanks again for the great answer.

MMK
 
The issue with video is that it is more or less self contained. To the engine logic, the video player is mostly a black box. IOW, you really can't control frames with that kind of precision. So that takes us back to the static image technique.

I'm not a fan of it personalty because I like the elegance of having real depth and knowing I can interact with the background if I want to. That said, don't worry too much about memory consumption. Sure, a set of 400 or so screen sized images is obviously a much heavier load than the 20 or so strips you might use for building layers. However, OpenBOR is extremely optimal in the way it loads and renders images. The Webm does have an advantage of streaming from a memory perspective, but the engine turns right around and beats it for CPU use. You'll find the trade comes out about even overall.

DC
 
Last edited:
ID do background as separate frames like in rocket viper and call it a day, using backgrounds from blurays is a good idea, you can clean them ,just takes more time with some.People will appreciate using original bgs tho.
MMK are you makin Popeye game ?
 
@MMK ,
a combination of techniques will yield results from basic to really impressive.

to optimize/save resources, there is a technique where youn split images into RGB and over lay them using transparency, in that way you reduce/limit the palette but make up for it using the trick

have not tested the rockt viper thing using sprites with no palette limit

but palette limits will make your backgrounds lool like this Dracula for the sega cd situation:
the script used in rocket viper could be expanded to multiple entities in different background planes, or even as a panel type entity if you wish.

example , you water effect for floor, and rocket viper script for trashcans, bushes, foreground objects, lamposts etc

but for walls and floors is best to invent or develop a script to mimic what mugen does so they can feature animated effects if they need to have them
example: balrog's stage animated floor
so far Openbor does floors in backgrounds as "3d" using a water effect value, if you make your panel transparent , a background layer works a the floor, but it only works well for certain stages & values have to be very specific on them to avoid weird visual behaviors.
@DCurrent developed a tutorial where background layers can feature animation so that is also available for "floors"

for walls tho, there are inline comands that can be fetured in sprite animations that can distort sprites (shoot cant remember the name), so the trick is to distort the sprites (vertical or horizontal) to match the scrolling. Rmeber now , its called DRAWMETHOD.

anyway , long story short , i wish that DRAWMETHOD on sprites/entities would/could have the same kind of controls that
FG layers had, that way any sprite could feature some of the water, repetiton and other effects.


vertical distortions tho, need the frame by frame DRAWMETHOD-type trick or scripting to work
 
ID do background as separate frames like in rocket viper and call it a day, using backgrounds from blurays is a good idea, you can clean them ,just takes more time with some.People will appreciate using original bgs tho.
MMK are you makin Popeye game ?
I haven't decided on a game yet :) I was looking into using this technique somewhere and accidentally came across OpenBOR. As a big fan of B'emUP games wanted to check if the engine can be used for this. I liked the OpenBor project a lot, and as you said a PopEye game would be cool. I think PopEye is also license free now.
 
Back
Top Bottom