Guest Posted February 28, 2008 Share 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. Link to comment
lil Toady Posted February 28, 2008 Share 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 Link to comment
Oli Posted February 29, 2008 Share Posted February 29, 2008 that would be horrible lol Link to comment
Mr.Hankey Posted February 29, 2008 Share 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^^ Link to comment
Atti Posted March 3, 2008 Share Posted March 3, 2008 Download these 100 images would be less funny. ^^ Link to comment
Cazomino05 Posted March 5, 2008 Share 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 Link to comment
Woovie Posted March 6, 2008 Share Posted March 6, 2008 Download these 100 images would be less funny. ^^ It isn't our fault you use a bad format and compression Link to comment
iam2noob4u Posted March 10, 2008 Share 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? Link to comment
Ransom Posted March 11, 2008 Share Posted March 11, 2008 that would be horrible lol haha Link to comment
XetaQuake Posted March 11, 2008 Share 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 Link to comment
50p Posted March 11, 2008 Share 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 Link to comment
Oli Posted March 12, 2008 Share Posted March 12, 2008 there isn't an html parsing gui type, so that wouldnt work. Link to comment
Guest Posted April 3, 2008 Share 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. Link to comment
50p Posted April 3, 2008 Share 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. Link to comment
Ace_Gambit Posted April 3, 2008 Share 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. Link to comment
50p Posted April 3, 2008 Share 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. Link to comment
Ace_Gambit Posted April 3, 2008 Share 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. Link to comment
50p Posted April 4, 2008 Share Posted April 4, 2008 You also must think of users with weaker PC, that barely run MTA. Link to comment
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