matthewcpp / framework64 Goto Github PK
View Code? Open in Web Editor NEWAsset pipeline and minimal framework for building N64 games with libultra
License: MIT License
Asset pipeline and minimal framework for building N64 games with libultra
License: MIT License
I am attempting to build the simple_scene demo. I am building on Windows 11.
To do this I:
I get the following output:
[main] Building folder: mygame
[main] Configuring project: mygame
[proc] Executing command: /usr/bin/cmake --no-warn-unused-cli -DCMAKE_BUILD_TYPE:STRING=Release -DFW64_PLATFORM_N64:STRING=ON -DCMAKE_EXPORT_COMPILE_COMMANDS:BOOL=TRUE -S/workspaces/mygame -B/workspaces/mygame/build_n64 -G "Unix Makefiles"
[cmake] Not searching for unused variables given on the command line.
[cmake] Configuring for Platform: N64-libultra
[cmake] -- Configuring done
[cmake] -- Generating done
[cmake] -- Build files have been written to: /workspaces/mygame/build_n64
[build] Starting build
[proc] Executing command: /usr/bin/cmake --build /workspaces/mygame/build_n64 --config Release --target all -j 18 --
[build] [ 82%] Built target framework64
[build] [ 83%] Building C object src/CMakeFiles/simple_scene.dir/flame.c.obj
[build] [ 87%] Building C object src/CMakeFiles/simple_scene.dir/ui.c.obj
[build] [ 87%] Building C object src/CMakeFiles/simple_scene.dir/game.c.obj
[build] [ 89%] Building C object src/CMakeFiles/simple_scene.dir/__/lib/framework64/src/n64/main_n64.c.obj
[build] [ 91%] Building C object src/CMakeFiles/simple_scene.dir/asm/asset_data.s.obj
[build] /workspaces/mygame/build_n64/src/asm/asset_data.s: Assembler messages:
[build] /workspaces/mygame/build_n64/src/asm/asset_data.s:7: Error: file not found: /workspaces/mygame/build_n64/bin/simple_scene/assets/assets.dat
[build] make[2]: *** [src/CMakeFiles/simple_scene.dir/build.make:167: src/CMakeFiles/simple_scene.dir/asm/asset_data.s.obj] Error 1
[build] make[2]: *** Waiting for unfinished jobs....
[build] /workspaces/mygame/src/flame.c:4:10: fatal error: assets/assets.h: No such file or directory
[build] 4 | #include "assets/assets.h"
[build] | ^~~~~~~~~~~~~~~~~
[build] compilation terminated.
[build] make[2]: *** [src/CMakeFiles/simple_scene.dir/build.make:63: src/CMakeFiles/simple_scene.dir/flame.c.obj] Error 1
[build] /workspaces/mygame/src/ui.c:3:10: fatal error: assets/assets.h: No such file or directory
[build] 3 | #include "assets/assets.h"
[build] | ^~~~~~~~~~~~~~~~~
[build] compilation terminated.
[build] /workspaces/mygame/src/game.c:3:10: fatal error: assets/assets.h: No such file or directory
[build] 3 | #include "assets/assets.h"
[build] | ^~~~~~~~~~~~~~~~~
[build] make[2]: *** [src/CMakeFiles/simple_scene.dir/build.make:102: src/CMakeFiles/simple_scene.dir/ui.c.obj] Error 1
[build] compilation terminated.
[build] make[2]: *** [src/CMakeFiles/simple_scene.dir/build.make:115: src/CMakeFiles/simple_scene.dir/game.c.obj] Error 1
[build] /workspaces/mygame/lib/framework64/src/n64/main_n64.c:4:10: fatal error: assets/assets.h: No such file or directory
[build] 4 | #include "assets/assets.h"
[build] | ^~~~~~~~~~~~~~~~~
[build] compilation terminated.
[build] make[2]: *** [src/CMakeFiles/simple_scene.dir/build.make:128: src/CMakeFiles/simple_scene.dir/__/lib/framework64/src/n64/main_n64.c.obj] Error 1
[build] make[1]: *** [CMakeFiles/Makefile2:180: src/CMakeFiles/simple_scene.dir/all] Error 2
[build] make: *** [Makefile:84: all] Error 2
[proc] The command: /usr/bin/cmake --build /workspaces/mygame/build_n64 --config Release --target all -j 18 -- exited with code: 2
[driver] Build completed: 00:00:03.006
[build] Build finished with exit code 2
I have verified that no assets.h file gets created anywhere in the repository.
The following is the output to my "npm run prepare-game-assets n64", which completes without error:
PS C:\Users\Tim\mygame> npm run prepare-game-assets n64
> [email protected] prepare-game-assets
> node lib/framework64/scripts/PrepareGameAssets.js n64
No target specified. using default target: mygame
Processing Mesh: penguin/penguin.gltf
Processing Image Atlas: fire_sprite
Processing Font: Consolas.ttf
Processing Level: simple_scene/simple_scene.gltf
Here is my assets.json:
{
"fonts": [
{
"src": "Consolas.ttf",
"size": 12,
"name": "Consolas12"
}
],
"images": [
{
"name": "fire_sprite",
"frameDir": "fire_sprite",
"hslices": 10,
"vslices": 1,
"frameSize": "128x128",
"resize": "320x32",
"format": "rgba32"
}
],
"levels": [
{
"src": "simple_scene/simple_scene.gltf",
"typeMap": 0,
"layerMap": 0
}
],
"meshes": [
{
"src": "penguin/penguin.gltf"
}
],
"layers": {
"default": 1,
"ground": 2,
"wall": 4
}
}
And finally, here is my src/CMakelists.txt
set(src_files
flame.h flame.c
chase_cam.h chase_cam.c
player.h player.c
ui.h ui.c
game.h game.c )
create_game(
TARGET simple_scene
SOURCES ${src_files})
Following the quickstart guide, I complete all of the steps up until the call to "npm install" to install the asset pipeline dependencies. It fails at that point.
Below is my full terminal output as I attempt to follow all of the steps of the guide. You will notice that after the call to npm install, I run ls on the folder that it attempts to rename, and that folder does not exist.
I am not a web developer, and I am not familiar with node.js beyond the very basics, and so I'm not sure how to get you more useful information.
tim@tim-System-Product-Name:~$ git init mygame
hint: Using 'master' as the name for the initial branch. This default branch name
hint: is subject to change. To configure the initial branch name to use in all
hint: of your new repositories, which will suppress this warning, call:
hint:
hint: git config --global init.defaultBranch <name>
hint:
hint: Names commonly chosen instead of 'master' are 'main', 'trunk' and
hint: 'development'. The just-created branch can be renamed via this command:
hint:
hint: git branch -m <name>
Initialized empty Git repository in /home/tim/mygame/.git/
tim@tim-System-Product-Name:~$ cd mygame
tim@tim-System-Product-Name:~/mygame$ sudo npm install @matthewcpp/framework64-cli
added 126 packages in 11s
7 packages are looking for funding
run `npm fund` for details
tim@tim-System-Product-Name:~/mygame$ npx framework64-cli create
Creating framework64 game: mygame
framework64 project directory: /home/tim/mygame
Check for git repository in /home/tim/mygame: OK
Add framework64 submodule
Add framework64 submodule: OK
Initialize framework64 submodule
Initialize framework64 submodule: OK
Create initial commit
Create initial commit: OK
Downloading and configuring starter project from: https://github.com/matthewcpp/framework64-starter/archive/refs/heads/main.zip
Downloading and configuring starter project from: https://github.com/matthewcpp/framework64-starter/archive/refs/heads/main.zip: OK
tim@tim-System-Product-Name:~/mygame$ npm run configure-environment-n64-modernsdk
> [email protected] configure-environment-n64-modernsdk
> node lib/framework64/scripts/ConfigureEnvironment.js n64-modernsdk
Configuring for: N64 Modern SDK
Copy: /home/tim/mygame/lib/framework64/config/n64.modernsdk/n64.modernsdk.devcontainer.json --> /home/tim/mygame/.devcontainer.json
tim@tim-System-Product-Name:~/mygame$ npm install
npm ERR! code EACCES
npm ERR! syscall rename
npm ERR! path /home/tim/mygame/node_modules/@matthewcpp/framework64-cli
npm ERR! dest /home/tim/mygame/node_modules/@matthewcpp/.framework64-cli-tUHhLoq2
npm ERR! errno -13
npm ERR! Error: EACCES: permission denied, rename '/home/tim/mygame/node_modules/@matthewcpp/framework64-cli' -> '/home/tim/mygame/node_modules/@matthewcpp/.framework64-cli-tUHhLoq2'
npm ERR! [Error: EACCES: permission denied, rename '/home/tim/mygame/node_modules/@matthewcpp/framework64-cli' -> '/home/tim/mygame/node_modules/@matthewcpp/.framework64-cli-tUHhLoq2'] {
npm ERR! errno: -13,
npm ERR! code: 'EACCES',
npm ERR! syscall: 'rename',
npm ERR! path: '/home/tim/mygame/node_modules/@matthewcpp/framework64-cli',
npm ERR! dest: '/home/tim/mygame/node_modules/@matthewcpp/.framework64-cli-tUHhLoq2'
npm ERR! }
npm ERR!
npm ERR! The operation was rejected by your operating system.
npm ERR! It is likely you do not have the permissions to access this file as the current user
npm ERR!
npm ERR! If you believe this might be a permissions issue, please double-check the
npm ERR! permissions of the file and its containing directories, or try running
npm ERR! the command again as root/Administrator.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/tim/.npm/_logs/2023-07-01T05_33_35_454Z-debug-0.log
tim@tim-System-Product-Name:~/mygame$ ls /home/tim/mygame/node_modules/@mathewcpp
ls: cannot access '/home/tim/mygame/node_modules/@mathewcpp': No such file or directory
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.