Jump to content

A video player script?


Guest Thaxor

Recommended Posts

Posted

Is it possible to script a video player for mta. Like when a player joins in the game, he could watch the server promotion video or something.

So just wondering is it possible to play a avi file or something similar in game with a script.

If everything is possible i belive this is too then.

Posted

No, you can not play video's. You could script something that'd be switching images per frame so it looks like a video

Do not PM me, im not going to read it anyway.

Posted
Download these 100 images would be less funny. ^^

It isn't our fault you use a bad format and compression :roll:

"The humble beet is the answer to all riddles." - Rolf

Posted
that would be horrible lol

haha

image.gif.e25ddd8be17e3a9b50a78609787fabd6.gif

Offical B.L.A.S.T.A.ddict
VCP - winners of the official MTA tournament (undefeated!) /smug

  • 4 weeks later...
Posted

Well yeah by adding pictures. Not bad heh. And about 100 images. its not even big to download if its in the right format. i guess i could try it. :D

Posted
Well yeah by adding pictures. Not bad heh. And about 100 images. its not even big to download if its in the right format. i guess i could try it. :D

Each file must not be heavier then 1kb. I made a speedometer with a needle which load 260 images each of them is ~2.2kb and it take long to load them all for the first time (may take 60 seconds, depends on your PC). While the game loads them all you can't even move camera, it just freezes you PC for the loading time. So maybe make them smaller then a kilo.

Posted
Well yeah by adding pictures. Not bad heh. And about 100 images. its not even big to download if its in the right format. i guess i could try it. :D

Each file must not be heavier then 1kb. I made a speedometer with a needle which load 260 images each of them is ~2.2kb and it take long to load them all for the first time (may take 60 seconds, depends on your PC). While the game loads them all you can't even move camera, it just freezes you PC for the loading time. So maybe make them smaller then a kilo.

I am working on a game-mode and because DP2 does not have support for custom fonts I made a dynamic text script. What it does is basically translate a string to an array of font textures (or font images if you like). As a result of that I had to create over 300 gui images at once causing cpu locks (each up to 3 kB in size). What I did is load the images first thing when the client script is loaded. Instead of creating a loop the image loading takes place in the clients' render call back event. This does bring your fps down for a short while, but it doesn't lock the cpu anymore. This also gave me the opportunity to add a working progress bar to the loading event. The loading does not take more than 20 seconds. And I don't even have the best hardware settings...believe me.

Posted

I second that. Unless the developers come up with some low level function that allows the cpu to process other system messages while performing operation like image loading. I know for example that Delphi has something like ProcessMessages which you can use in cpu extensive loops. I tried to dig into lua threads but it seems like it doesn't have a good system based threading system. Anyway, I did some testing. It took me 44 seconds to load 1000 images of +/- 3 kB each.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...