Want to show videos in my C++ game (cocos2d-x 3.17.1)

I was going to look up C++ libraries to show canned videos that I’d like to include in my game, but then thought I’d first ask here for either advice from your experiences or perhaps even see if there’s a cocos2d-x solution.

p.s. my game: Pro Strategy Football 2023 on Steam

thanks!

  • Dogwalker

Nice an simple check this vid out only a few simple lines of code thanks cocos.

Only problem I had was, video stuck on top layer could not move it down a layer when I had 2 or more playing at same time.

That will not work for Windows/Mac. (only works on Android/iOS)
So you need to add your own code to play video on Win/Mac.

Do I need to look around for a C++ library for Windows then, separately from cocos2d-x?

There is a working implementation in the cocos2d-x fork, axmol, specifically in this directory. You may be able to port it across to cocos2d-x v3.17, or at least get some ideas on how to accomplish what you need.

Thanks, R101. I’ll try to pull that class over. Do you know what libraries I need to pull over, if any? Thanks again.

Not sure what libraries you will need, but you should be able to easily find out by going through the code and any CMake files associated with it.