当前位置:网站首页>Write web games in C language

Write web games in C language

2022-07-06 16:03:00 Programming fish 66

1. download PainterEngine

2. We start with a PainterEngine Fox Parkour game of

3. install mingw Configure environment variables

install emscripten( Please refer to the online tutorial ), The tutorial assumes that you have installed D:\emsdk

4. Windows Open the command prompt and enter the following command

D:
emsdk\emsdk_env.bat
emcc -v

verification Emscripten Whether it works properly , If it works , You can see the following interface

Then open the emsdk\upstream\emscripten\src\setting.js

  modify INITIAL_MEMORY by 268435456( This parameter is the memory space allocated for program operation )

 5. Open in text file format PainterEngine\platform\webassembly\makefile, Modify the game project The file path where the directory is located

 5. Will you project\assets The required files are placed in PainterEngine\platform\webassembly\assets Under the table of contents ( So you can get through assets/filename To read the file )

 6. Enter... At the command prompt

cd PainterEngine\platform\webassembly\

 7. Enter... At the command prompt

emmake make

Then wait for the compilation to complete , When you see the following interface , Prompt that the project has been compiled successfully

 8. Now? , You can enter Check the compilation results

The following page , Is the result of game compilation , You can play directly  

 C/C++ Getting started video , Provide it to zero based partners C Introduction to language learning , Study C/C++ Programming knowledge , Welcome to your attention UP, You can also enter UP Penguin learning group :828339809 Progress together , More high-quality learning tutorials are constantly updated ~

原网站

版权声明
本文为[Programming fish 66]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/187/202207060919349531.html