OhMyGame
OhMyGame은 AI로 게임을 만들 수 있는 오픈소스 스튜디오로, 디자인·구축·플레이테스트·출판을 하나의 앱에서 모델 키와 함께 수행합니다
아직 감지된 업데이트가 없습니다. GitHub 릴리스가 나오면 여기에 보입니다.
개인 계정의 공개 저장소 소유자는 GitHub로 로그인해 운영자를 확인하고 소개를 직접 관리할 수 있습니다. 관리자 승인은 필요하지 않습니다.
로그인한 뒤 확인 파일을 만들어 이 저장소의 기본 브랜치에 30분 안에 커밋해 주세요. 다른 브랜치나 포크의 파일은 인정하지 않습니다. 파일을 올린 뒤 아래에서 확인하면 관리자 승인 없이 관리할 수 있습니다. 자격을 유지하려면 파일을 남겨 두세요.
로그인이 필요하면 로그인 화면으로 이동합니다. 로그인 후 이곳으로 돌아와 원하는 확인 버튼을 다시 눌러 주세요.
프로젝트 폴더에서 /nomorevibe verify를 실행하면 소유권을 확인하고 소개를 직접 관리할 수 있습니다.
1분 만에 확인하기A poc of Sonic in PHP (with wasm)
저장소 README에서 가져옴
README 전체를 불러오는 중입니다.
README 전문 보기 ↗[DEMO] ( working yet on android ! ) => https://davidnurdin.github.io/php-wasm-sdl/
Documentation (français) :
https://github.com/soyuka/php-wasm
Project based on https://github.com/seanmorris/php-wasm which was forked from https://github.com/oraoto/pib
I fixed some inconsistencies in the Makefile and removed non-essential things. This fork:
docker buildx bake
Builded files will be located in build/php-web.js and build/php-web.wasm.
The module we export in this image is called createPhpModule.
Use this as template to build PHP with emscripten. At build these arguments are available:
LIBXML2_TAG=v2.9.10
PHP_BRANCH=PHP-8.3.0
The next args are used for emcc options -sOPTION
see settings.js.
In fact it's even easier for you to set them directly in the Dockerfile.
WASM_ENVIRONMENT=web
ASSERTIONS=0
OPTIMIZE=-O2
INITIAL_MEMORY=256mb
JAVASCRIPT_EXTENSION=mjs # change by js if needed
MODULARIZE=1
EXPORT_ES6=1
EXPORT_NAME=createPhpModule
My preferred option is to use the file_packager tool to build the preloaded data in a php-web.data.js (and php-web.data file). These are preloaded into IDBFS. That can be changed changing the -lidbfs.js argument to emcc.
This will preload SOME_DIR into the /src directory inside the WASM filesystem:
mkdir -p php-wasm
docker run -v SOME_DIR:/src -v $(pwd)/php-wasm:/dist -w /dist soyuka/php-wasm:8.2.9 python3 /emsdk/upstream/emscripten/tools/file_packager.py php-web.data --use-preload-cache --lz4 --preload "/src" --js-output=php-web.data.js --no-node --exclude '*/.*' --export-name=createPhpModule
ls php-wasm/
Note that the php-web.data.js must be either used as PRE_JS argument to emcc or it needs to be included inside the php-web.js:
sed '/--pre-js/r php-wasm/php-web.data.js' php-wasm/php-web.mjs > this-has-preloaded-data-php-web.mjs
We match the export-name with the emcc EXPORT_NAME option. Use excludes to downsize the preloaded data weight.
To execute some php, call phpw_exec using ccall, for example:
const phpBinary = require('build/php-web');
return phpBinary({
onAbort: function(reason) {
console.error('WASM aborted: ' + reason)
},
print: function (...args) {
console.log('stdout: ', args)
},
printErr: function (...args) {
console.log('stderr: ', args)
}
})
.then(({ccall, FS}) => {
const phpVersion = ccall(
'phpw_exec'
, 'string'
, ['string']
, [`phpversion();`]
);
})
phpw_exec(string code): string
phpw_run(string code): void
phpw(string filePath): void
const STR = 'string';
ccall("phpw", null, [STR], ["public/index.php"]);
console.log(ccall("phpw_exec", STR, [STR], ["phpversion();"]));
More about how to call exposed functions
Before running the demo, you need to build the library.
docker buildx bake
Then you need to copy
the php-web.js and php-web.wasm to the demo directory.
$ cp build/php-web.* demo/public/
Then to build the preloaded data:
docker run \
-v $(pwd)/demo/src:/src \
-v $(pwd)/demo/public:/dist \
-w /dist \
soyuka/php-wasm:8.2.9 \
python3 \
/emsdk/upstream/emscripten/tools/file_packager.py \
php-web.data \
--use-preload-cache \
--lz4 \
--preload "/src" \
--js-output=php-web.data.js \
--no-node \
--exclude '*/.*' \
--export-name=createPhpModule
Then attach the php-web.data.js to the demo/public/php-web.mjs:
sed '/--pre-js/r demo/public/php-web.data.js' demo/public/php-web.mjs > this-has-preloaded-data-php-web.mjs ; mv this-has-preloaded-data-php-web.mjs demo/public/php-web.mjs
And finally open a web sserver in the demo directory:
$ php -S 127.0.0.1:8000 -t demo/public