I started making this game a while back and I'm nearly done. All I want to do now is to make a video animation right at the start of the game. So when you click on the game icon you go directly to a video animation then to the main game screen. It will show all the people that made it and developed it. I have finished making the video animation but how do I load it to the very start of the game? I just wanted to this because I want the game to look professional. Do you use the os system command? I'm using Windows 7, Python 3.1, Pygame 3.1 and I made the video clip in windows live movie maker.
There is a whole module dedicated for something like this and it's part of Pygame. pygame.movie
Related
I made an app(although not finish yet)with kivy module. It can let me upload my audio file in and play it.
It works like this if I press the play button on the right corner, it will play audio file (using vlc module for mp3 and kivy SoundLoader for other types of audio file)
This app is for iPad use(although I currently test it on pc), but I don't know how to make it background playing, I mean making it can even play sound while the screen is black or while using other app on the screen like wut youtube premieum does.
This is important for me because I tried to develope this app in order to listen to my music and do my homework with ipad page meantime.
Pls tell me some method if you have any idea, thank you!
well I haven't tried much methods bc I currently didn't fine out much information.
U actually will found people talking about pygame running other function while BGM is playing (which is not wut I want) if u just search "python background playing" on search engines
I made a game using SDL and OpenGL in C++, which is of course common for games. Windows 10 should be able to detect that it's a game and show the Game Bar when starting it, but it doesn't. What can I do to make Windows 10 detect it as a game?
Windows cannot "detect" that you are playing a game. There is literally no way for it to magically work that out. Heck, I can think of a number of kinds of programs that a human would have difficulty categorising as a game or not (such as Stack Overflow, which doesn't use OpenGL or SDL whatsoever!).
Load up the game bar with Win+G, and check "Yes, this is a game" so that Windows remembers for next time.
http://www.tenforums.com/tutorials/8686-game-dvr-remember-game-undo-windows-10-a.html
any help is much appreciated. I've been looking for a few days for something to meet the following use case. I need to open a single video player window which will play a dynamic stream of videos selected by an accompanying program. I'm on windows 10 but could probably find a way to use linux if needed.
So the flow would be as such:
Video 1 opens in the video player window.
On a queue sent by the same script which started the previous step, Video 1 is paused/stopped and Video 2 is played in this same window with a seamless frame to frame zero transition time.
The script in the background does some additional processing to decide whether it wants to next play Video 3, Video 4, or Video 5. Let's say the script chooses Video 5.
Now on conclusion of Video 2 we want to tell this same window to play video 5, again with seamless frame to frame zero transition or black screen.
Does anyone know how to do this? I've not been able to figure it out with python-vlc, OpenCV, or anything else! Please Help! Thanks!
I found this PyQt5 code (How to play multiple clips of a video one after another see ekhumoro's answer), which appears to play one video after another. However, the media is given to the window before calling app.exec()... How do I update the media source dynamically as the window is already open and playing media? AKA after app.exec() has been called?
I would like to move a (stereoscopic) video on a computer screen automatically. Think of the video as the ball in a Pong game. The problem is that it should be a stereoscopic 3D video. So the video size itself is kind of small. I did this kind of movements with pictures or drawing object, but I don't know how to do it with video material!
Does somebody know how I can do this? I already searched for video tools in python like pygame or pyglet. I have an external player Bino 3d which can open the desired video. But how can I make it move around the screen?
Or is there a tool in other programming languages like c/c++ or Matlab which can help?
By the way, the program will be on a Linux OS.
I'll be grateful for any help or hints!
Anna
I'd try to use a decent video client (mplayer, vlc). They can present the video in lots of ways, hopefully your stereoscopic issue can be solved by them.
Then I would let the client present a single window (not fullscreen) which I then would move around using window manager controls.
If you must not have window decorations around the video or if the output shall be a specific window, I think mplayer at least can be told to use an existing window to perform the output in. Maybe that's an approach then.
I'm developing a media player. Right now it's a simple window with a button to load .wav files. The problem is I would like to implement a pause button now. But, when playing a audio file the GUI isn't accessible again (no buttons can be pushed) till the file is done playing. How can I make the GUI dynamic while an audio file is playing?
I'm using PyAudio, and their implementation doesn't allow this.
Probably you have to use threads for that. You have to play your audio file in a different thread than the gui mainloop so that the GUI keeps responding user input.
IMHO, wxpython is not so complicated and has some utility functions that would help to do what you want. Check the wxpython demo, you have several examples there.
You can alternatively use pygame mixer for the purpose , I made the same in pyqt and I did'nt require to implement threading . You can get the documentation of pygame mixer at https://www.pygame.org/docs/ref/mixer.html
Happy Coding .
Try this out:
Check the code https://drive.google.com/file/d/0B7ccI33Aew5fNVhwZ2puYTBuUFU/view?usp=sharing
I have used pygame also.Hope this helps.