Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Any manual for compile this souce code? #4

Open
cpcbegin opened this issue Apr 2, 2019 · 43 comments
Open

Any manual for compile this souce code? #4

cpcbegin opened this issue Apr 2, 2019 · 43 comments

Comments

@cpcbegin
Copy link

cpcbegin commented Apr 2, 2019

Is there a manual to compile this code in a Ubuntu Mate 18.04 64 bits?

@BazkieBumpercar
Copy link
Owner

I'm afraid not, as I don't have that installed. However, it should be mostly a case of 'install all the packages it whines about' :p

@acoppola
Copy link

acoppola commented Apr 6, 2019

There is not a manual, but there is a set of cmake files so you can install all the dev packages (sdl, openal, boost libraries...) run it and be able to compile. The only thing that was trouble was to setup sge library but if u’re skilled or have the bad habit to try everything you can overcome this.

@BazkieBumpercar
Copy link
Owner

Yeah SGE is a troublemaker, I think there's no official package for that in most distro's. I hear that a lot :)

@hasanleiva
Copy link

@acoppola can you help me to compile blunted engine and game??

@acoppola
Copy link

I can try...
You have to be on linux Ubuntu... then run these commands (I think the commands are there more or less I compiled long time ago).

Clone the repository blunted and gameplayfootball
sudo apt-get install make
sudo apt-get install gcc
sudo apt-get install g++
sudo apt-get install freeglut3-dev
sudo apt-get install libsdl1.2-dev
sudo apt-get install libsdl-image1.2-dev
sudo apt-get install libsdl-ttf2.0-dev
sudo apt-get install libsdl-gfx1.2-dev
sudo apt-get install libsdl-net1.2-dev
#download libSGE
git clone https://github.com/flibitijibibo/libSGE
git checkout 3facdc9
sudo make install
#boostdev
sudo apt-get install libboost1.62-dev
sudo apt-get install libboost1.62-all-dev
sudo apt-get install libopenal-dev


in blunted directory execute
cmake ./
make
copy the libblunted2.a file generated in gameplayfootball directory and execute:
cmake ./
make

@cpcbegin
Copy link
Author

cpcbegin commented Apr 14, 2019

It seems than I install libSGE and all the other libraries successfully in my system but when I type cmake ./ to compile blunted I get this error:

CMake Error at CMakeModules/FindPackageHandleStandardArgs.cmake:97 (MESSAGE):
Could NOT find SGE (missing: SGE_LIBRARY SGE_INCLUDE_DIR)

If I type 'whereis libSGE' show this:

libSGE: /usr/lib64/libSGE2.so /usr/lib64/libSGE2.a

@acoppola
Copy link

so edit cmakelist to set the path of static lib SGE_LIBRARY (.a), and the includes of that lib ,in this way you can compile the project

@PedroSilvaGit
Copy link

How to compile in Windows 10 x64?
What are the libs that use?
Can I compile in Visual Studio or MinGW?

@PedroSilvaGit
Copy link

PedroSilvaGit commented Apr 20, 2019

I can compile Blunted2 and Football on Ubuntu.
Following the acoppola tutorial, but the game gives a Renderer error on start.
Are not you missing more libs?

@PedroSilvaGit
Copy link

What is the exact version of Ubuntu used?
Is it x86 or x64?

@BazkieBumpercar
Copy link
Owner

BazkieBumpercar commented Apr 20, 2019

How to compile in Windows 10 x64?
What are the libs that use?
Can I compile in Visual Studio or MinGW?

MinGW :)

I can compile Blunted2 and Football on Ubuntu.
Following the acoppola tutorial, but the game gives a Renderer error on start.
Are not you missing more libs?

Can you copy/paste the exact error? Do you have OpenGL support (to test, try for example to run TuxRacer)

What is the exact version of Ubuntu used?
Is it x86 or x64?

I used to build it in Debian, but not sure if that was 32- or 64 bits. Maybe they work both? No idea tbh :P

@acoppola
Copy link

How to compile in Windows 10 x64?
What are the libs that use?
Can I compile in Visual Studio or MinGW?

You can crosscompile from ubuntu to have a win10 exe, it'll be a bit more difficult , but you can use one environment to get 2 linux and windows support.

I compile on 32 bit, in future i'll try to compile in 64 bit.

About render error, check your libs , or paste your errors here so i can check.

Btw I take this comment as a way to thank Bastian for his game, very very interesting. I learned a lot from this.

@PedroSilvaGit
Copy link

This error occurred while starting the game.
Note: I imported football.config, databases folder and media folder from gameplayfootball_beta2v02_linux64.tar.gz

INIT
[Notice] in [SystemManager::RegisterSystem]: Added system named 'GraphicsSystem'
[Notice] in [SystemManager::RegisterSystem]: Added system named 'AudioSystem'
[Notice] in [WorkerThread::operator()()]: Starting worker thread
[Notice] in [WorkerThread::operator()()]: Starting worker thread
[Notice] in [OpenGLRenderer3D::operator()()]: Starting OpenGLRenderer3D thread
[Notice] in [WorkerThread::operator()()]: Starting worker thread
[Notice] in [OpenGLRenderer3D::CreateContext]: Using OpenGL version 2.1 Mesa 18.0.5
[Notice] in [OpenGLRenderer3D::CreateContext]: OpenGL major/minor 0.0
[Warning] in [OpenGLRenderer3D::CreateContext]: OpenGL version not equal to or higher than 3.2 (or not reported as such)
[Warning] in [::LoadGLShader]: shader compilation error (media/shaders/simple.vert)
[Warning] in [::LoadGLShader]: shader compilation info (media/shaders/simple.vert):
0:1(10): error: GLSL 1.50 is not supported. Supported versions are: 1.10, 1.20, and 1.00 ES

[FATAL ERROR !!! N00000 !!!] in [OpenGLRenderer3D::LoadShader]: Could not compile vertex program: simple
Segmentation fault (core dumped)

@PedroSilvaGit
Copy link

I'm using Ubuntu in VirtualBox.
So this "GLSL 1.50 is not supported" error.
Should it be caused by VirtuaBox limitation?

@acoppola
Copy link

I'm using Ubuntu in VirtualBox.
So this "GLSL 1.50 is not supported" error.
Should it be caused by VirtuaBox limitation?

Yeah, Virtual Box environment is not good to play 3d games because is an emulated environment. Play it on a real Ubuntu installation on your HDD

@PedroSilvaGit
Copy link

I'm able to compile on Windows.
But when I start Football.exe.
Only this appears:

SQLite version 3.7.3
Enter ".help" for instructions
Enter SQL statements terminated with a ";"
sqlite>

What will be the problem?
It should not start with int main (int argc, const char ** argv)?

@BazkieBumpercar
Copy link
Owner

Eh, I have no idea to be honest! Are you compiling using mingw32?
Get any errors/warnings during compilation?

@gekinci
Copy link

gekinci commented Jun 26, 2019

I am following the manual to compile given here. Until make in Blunted2 repo, everything works fine but that fails. I get a long list of errors which starts with the following and they are all similar to that (the same .cpp file and 'glXXXX' was not declared in this scope.):

/home/gekinci/Blunted2/src/systems/graphics/rendering/opengl_renderer3d.cpp: In member function ‘virtual void blunted::OpenGLRenderer3D::Exit()’:
/home/gekinci/Blunted2/src/systems/graphics/rendering/opengl_renderer3d.cpp:485:7: error: ‘glDeleteShader’ was not declared in this scope
glDeleteShader((*shaderIter).second.vertexShaderID);
^~~~~~~~~~~~~~

I tried adding #include <GL/glut.h> and similar header files, but none of them solved the problem.
Do you know how to fix this?

@roberth11
Copy link

Someone has been able to compile it in windows to explain to me please

@roberth11
Copy link

Puedo compilar en Windows.
Pero cuando comienzo Football.exe.
Solo esto aparece:

SQLite versión 3.7.3
Ingrese ".help" para obtener instrucciones
Ingrese las instrucciones SQL terminadas con un ";"
sqlite>

¿Cuál será el problema?
¿No debería comenzar con int main (int argc, const char ** argv)?

Puedo compilar en Windows.
Pero cuando comienzo Football.exe.
Solo esto aparece:

SQLite versión 3.7.3
Ingrese ".help" para obtener instrucciones
Ingrese las instrucciones SQL terminadas con un ";"
sqlite>

¿Cuál será el problema?
¿No debería comenzar con int main (int argc, const char ** argv)?

hola pedro me podrias decir como lo compilaste en windows yo ya lo pude compilar en linux pero necesito hacerlo en windows te agradezco que me ayudes

@HappyPiggy
Copy link

I can't compile properly with cmake. (windows10 64bit)

error:
CMake Error at C:/Program Files/CMake/share/cmake-3.17/Modules/FindPackageHandleStandardArgs.cmake:97 (MESSAGE):
Could NOT find SDL (missing: SDL_LIBRARY)
Call Stack (most recent call first):
C:/Program Files/CMake/share/cmake-3.17/Modules/FindPackageHandleStandardArgs.cmake:288 (_FPHSA_FAILURE_MESSAGE)
C:/Program Files/CMake/share/cmake-3.17/Modules/FindSDL.cmake:188 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
CMakeLists.txt:28 (FIND_PACKAGE)

i have no idea about it .

@roberth11
Copy link

INSTALA MSYS2 PARA WINDOWS10

@hasanleiva
Copy link

Who is can compile this game to html?

@hasanleiva
Copy link

Please help i can pay for it

@roberth11
Copy link

Por favor ayuda, puedo pagarlo

en html a que te refieres? mi wap +57 3137535772
llevo un mes tratando de compilarlo pero siempre me tira uno que otro error de libreria no se si alguno de los que lo a podido compilar pueda pasar un documento explicando como lo a hecho

@roberth11
Copy link

No hay un manual, pero hay un conjunto de archivos cmake para que pueda instalar todos los paquetes de desarrollo (sdl, openal, impulsar bibliotecas ...) ejecutarlo y poder compilarlo. Lo único que fue un problema fue configurar la biblioteca sge, pero si eres hábil o tienes la mala costumbre de probar todo, puedes superar esto.

acoppola could you tell me how you compiled it for windows could you help me with a document where it is already explained and tried everything and it always throws me some error soon after I already have all the packages installed
Thanks a lot

@acoppola
Copy link

acoppola commented May 8, 2020

Who is can compile this game to html?

Is not possible... even html? Is not a unity / unreal project that can export to webgl

@roberth11
Copy link

It is true in html games cannot be created since it is not a programming language

@roberth11
Copy link

Who is can compile this game to html?

Is not possible... even html? Is not a unity / unreal project that can export to webgl

Could you help me compile the game with a manual or something specific every time I try, it has thrown errors at me and I have done it in several ways in Linux I compile myself but I want to compile it for windows which I have not achieved I would appreciate it if you could help me since I want to make some modifications to the game

@acoppola
Copy link

acoppola commented May 8, 2020

No hay un manual, pero hay un conjunto de archivos cmake para que pueda instalar todos los paquetes de desarrollo (sdl, openal, impulsar bibliotecas ...) ejecutarlo y poder compilarlo. Lo único que fue un problema fue configurar la biblioteca sge, pero si eres hábil o tienes la mala costumbre de probar todo, puedes superar esto.

acoppola could you tell me how you compiled it for windows could you help me with a document where it is already explained and tried everything and it always throws me some error soon after I already have all the packages installed
Thanks a lot

To crosscompile for windows you need to use this: https://github.com/mxe/mxe
Is not easy to use, you need more try and error. Or you can use the google reasearch project forked from this to have an example , they even updated the libraries

@acoppola
Copy link

acoppola commented May 8, 2020

But as the author said long time ago is better to use unreal or unity to create the game, and use his code for reference when you build the ai. Thanks to him you have a very good concept on how create a football game. Study it, study well c++ and the tons of tutorial you can find on youtube and if you have guts zou will be able to create something good

@roberth11
Copy link

could you compile it? I would like to know to keep trying or not and hopefully one day you will be encouraged to write the way you compiled it, if so, thank you very much, what a shame I am a junior programmer

@acoppola
Copy link

acoppola commented May 8, 2020

could you compile it? I would like to know to keep trying or not and hopefully one day you will be encouraged to write the way you compiled it, if so, thank you very much, what a shame I am a junior programmer

I cross compiled it on windows some time ago on my old laptop, it took me two weeks to be able to do so. Now I use linux and compile/run on it. I don't remember all the steps to crosscompile it, i remember i forked mxe to compile the libraries for windows and some cmake edits to do that.

Being a junior programmer doesn't mean that you can't do something. Just try to overcome your limits or you never grow as developer.

@roberth11
Copy link

could you compile it? I would like to know to keep trying or not and hopefully one day you will be encouraged to write the way you compiled it, if so, thank you very much, what a shame I am a junior programmer

I cross compiled it on windows some time ago on my old laptop, it took me two weeks to be able to do so. Now I use linux and compile/run on it. I don't remember all the steps to crosscompile it, i remember i forked mxe to compile the libraries for windows and some cmake edits to do that.

Being a junior programmer doesn't mean that you can't do something. Just try to overcome your limits or you never grow as developer.

I have this error undefined reference to `sge_TextEditor :: check (SDL_Event *) '

@hasanleiva
Copy link

could you compile it? I would like to know to keep trying or not and hopefully one day you will be encouraged to write the way you compiled it, if so, thank you very much, what a shame I am a junior programmer

I cross compiled it on windows some time ago on my old laptop, it took me two weeks to be able to do so. Now I use linux and compile/run on it. I don't remember all the steps to crosscompile it, i remember i forked mxe to compile the libraries for windows and some cmake edits to do that.

Being a junior programmer doesn't mean that you can't do something. Just try to overcome your limits or you never grow as developer.

Hi do you have compiled tool of animator of the Blunted engine?

@roberth11
Copy link

¿podrías compilarlo? Me gustaría saber si sigo intentándolo o no y ojalá algún día se animen a escribir de la forma en que lo compilaron, si es así, muchas gracias, que lástima soy programador junior.

Lo compilé en Windows hace algún tiempo en mi vieja computadora portátil, me tomó dos semanas poder hacerlo. Ahora uso linux y compilo / ejecuto en él. No recuerdo todos los pasos para realizar la compilación cruzada, recuerdo que bifurqué mxe para compilar las bibliotecas para Windows y algunas ediciones de cmake para hacer eso.
Ser un programador junior no significa que no puedas hacer algo. Intenta superar tus límites o nunca crecerás como desarrollador.

Hola, ¿tienes una herramienta compilada de animador del motor Blunted?

If you want to help work on the project write me at +57 3137535772

could you compile it? I would like to know to keep trying or not and hopefully one day you will be encouraged to write the way you compiled it, if so, thank you very much, what a shame I am a junior programmer

I cross compiled it on windows some time ago on my old laptop, it took me two weeks to be able to do so. Now I use linux and compile/run on it. I don't remember all the steps to crosscompile it, i remember i forked mxe to compile the libraries for windows and some cmake edits to do that.
Being a junior programmer doesn't mean that you can't do something. Just try to overcome your limits or you never grow as developer.

Hi do you have compiled tool of animator of the Blunted engine?

If you want to help work on the project write me at +57 3137535772

@ming-soon
Copy link

ming-soon commented Jan 16, 2021

@gekinci @acoppola Were you able to solve these errors when running make on Blunted2 folder?

/home/gekinci/Blunted2/src/systems/graphics/rendering/opengl_renderer3d.cpp: In member function ‘virtual void blunted::OpenGLRenderer3D::Exit()’:
/home/gekinci/Blunted2/src/systems/graphics/rendering/opengl_renderer3d.cpp:485:7: error: ‘glDeleteShader’ was not declared in this scope
glDeleteShader((*shaderIter).second.vertexShaderID);

I checked GL/glu.h is included and I can also find glDeleteShader in Gl/glext.h which is included in gl.h

@vi3itor
Copy link

vi3itor commented Jan 16, 2021

Hi @ming-soon! Several months ago I created a fork and made some changes (mostly updated the libraries and shaders), so the game can be compiled and run on Linux and Windows. Windows and MacOS are "work in progress", but I hope to return and finish porting next month or so.
You can check README.md for instruction on compiling the projects. If you have any problems, please open an issue.

@jhonny-oliveira
Copy link

jhonny-oliveira commented Jul 3, 2021

Hi @vi3itor !

I have packaged the game for Ubuntu and plan to publish it in my PPA (https://launchpad.net/~xtradeb/+archive/ubuntu/play). I had to make a few adjustments (dirty patches):

  • set install directories;
  • store config at user home;
  • use system sqlite3 (not a deal breaker, just to avoid lintian embedded libs alert/error).

Some of these patches could be adjusted and merged upstream.

I also noticed that the SQLite3 libs are duplicated in the source, at least one set of files could/should go.

The game seems to work fine, but I'm facing two issues:

  • running it on a VM leads to a GLSL related segmentation fault (already described in this post);
    -- Workaround: export MESA_GL_VERSION_OVERRIDE=3.3;
    -- no further issues, other than performance.
  • running it on my computer works fine, but everytime I exit the game I get a segmentation fault somewhere within this call: SystemManager::GetInstance().Exit();
    -- I did not find a solution for this one. It does not affect playing the game, but I would like to sort it out before publishing...

gameplayfootball-SegFaultLogs.txt

Being this said, there are a few things I would like to discuss with you, could you please enable the issues on your fork to facilitate interaction?

Thank you!
Jhonny@XtraDeb

@vi3itor
Copy link

vi3itor commented Jul 4, 2021

Hey @jhonny-oliveira,

I have opened issues and discussions - feel free to use them now. Thanks for the efforts to publish the game in the PPA! Please send a PR with your patches. On my side, I have been working on Google Research Football fork to compile and run the engine on Windows and have recently created a PR. Next, I plan to apply some of the changes (especially platform-specific statements in CMakeLists) to the GameplayFootball repository and merge Windows support into the master branch. I hope to work on it during the upcoming week.

As for the SegFault: it looks like a multithreading issue (probably VM uses only a few cores and so protected from the error). I'll check if I can find the reason. The first guess would be to remove SDL_QuitSubSystem(SDL_INIT_VIDEO); from opengl_renderer3d.cpp, because SDL is being shut down in the other thread.

@jhonny-oliveira
Copy link

Thank you @vi3itor for the reply!
I'm rather busy at the moment, but I will try to get back to you ASAP.

@VOM7HC
Copy link

VOM7HC commented Jul 28, 2021

This question is too old, but now I just read it 5 minute ago.

Who is can compile this game to html?

Yeah, this code can compile to run on the web browser, but need lots, lots, lots, ... of effort. First convert OpenGL functions to OpenGL ES functions, because web is use WebGL base on OpenGL ES, not OpenGL. Then compile all code with WebAssembly, then if some libraries or functions is can't compile, change it and compile again. Since this repository code still need clean and optimize performance first, port this game to web task can't be start soon

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

13 participants