Guest Posted February 28, 2008 Posted February 28, 2008 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.
lil Toady Posted February 28, 2008 Posted February 28, 2008 No, you can not play video's. You could script something that'd be switching images per frame so it looks like a video
Mr.Hankey Posted February 29, 2008 Posted February 29, 2008 that would be horrible lol if you only use 10-15 fps and make a low-res video out of about 100 images it could be quite funny^^
Cazomino05 Posted March 5, 2008 Posted March 5, 2008 could wait for peds and do what gta does with its cutscenes guy talks narrate at bottom might not be perfect but itl do the job
Woovie Posted March 6, 2008 Posted March 6, 2008 Download these 100 images would be less funny. ^^ It isn't our fault you use a bad format and compression
iam2noob4u Posted March 10, 2008 Posted March 10, 2008 Download these 100 images would be less funny. ^^ It isn't our fault you use a bad format and compression what about 99% compressed JPEG?
XetaQuake Posted March 11, 2008 Posted March 11, 2008 what about a function to show a website? and then a html site with iframe to a youtube movie or so
50p Posted March 11, 2008 Posted March 11, 2008 what about a function to show a website? and then a html site with iframe to a youtube movie or so What do you think MTA is? Multiplayer or Website browser? Haha
Oli Posted March 12, 2008 Posted March 12, 2008 there isn't an html parsing gui type, so that wouldnt work.
Guest Posted April 3, 2008 Posted April 3, 2008 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.
50p Posted April 3, 2008 Posted April 3, 2008 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. 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.
Ace_Gambit Posted April 3, 2008 Posted April 3, 2008 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. 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.
50p Posted April 3, 2008 Posted April 3, 2008 I've never tried to use onClientRender event to load the images and maybe it doesn't take that much cpu. But anyway, I'd strongly recommend not to use large images (over 2kb) in scripts where tens or even hundreds of images need to be created.
Ace_Gambit Posted April 3, 2008 Posted April 3, 2008 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.
50p Posted April 4, 2008 Posted April 4, 2008 You also must think of users with weaker PC, that barely run MTA.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now