Comments (7)
Composer tools as well as MIDI conversion tools are not ready, yet. Meanwhile, you can find the modified MIDI converter for Windows here: https://github.com/VUEngine/VUEngine-Core/blob/master/lib/utilities/MIDI-Converter.zip
For PCM sound, you need a .pcm file to convert a WAV file. The WAV file needs to be preprocessed to be mono and of a bitrate of 8 kHZ or less. Here's a sample: https://github.com/VUEngine/VUEngine-Showcase/tree/main/assets/PCM
Note that PCM is very heavy on hardware and can thus not be used during gameplay.
from vuengine-studio.
Hi, ultrasuperpingu! Thanks for trying VUEngine! It's good to hear that everything worked without problems for you so far. May I ask, out of interest, which OS you are on?
The documentation is indeed lagging behind a lot, sorry about that.
I'll quickly give you a high level view of graphics in VUEngine in general here. Hopefully I'll find the time later to translate that into proper documentation. ;-)
The following isn't a complete overview, but we hope that this helps a little bit. Don't hesitate to fire any other questions and feel free to point out anything that may make the response too complex. 😛
Anyway... the main concepts used are those of states, entities and components.
States & Stages
The engine has a state machine that has to enter a user defined state at the start of the program. This is done with the line Game::start(Game::getInstance(), GameState::safeCast(AdjustmentScreenState::getInstance()));
in source/game.c
.
AdjustmentScreenState
is the state that the engine enters when the program starts and it eventually makes the engine to enter the VueMasterState
state. It is a GameState
and all of these have a Stage
instance, which is a Container
that... contains Entities, the game entities. Stages and Entities are defined in structs called Specs
(from specification), which hold the configuration values for each. For example, VueMasterState
loads the stage defined by VueMasterSt
.
Entities
If you check VueMasterSt
's definition (in assets/stages/VueMasterStageSpec.c
), you will find an array of its children (VueMasterStChildren
) which contains a single child: VueMasterImage1Entity
. This is the specification for the single Entity
that is loaded in the VueMasterState
's stage.
Sprites
By checking assets/images/VueMasterImages/VueMasterImage1/Spec/VueMasterImage1Spec.c
, you will find that VueMasterImage1Entity
has a list of Sprites, which are the objects used to display images, called VueMasterImage1Sprites
. It is an array that holds references to 2 Sprites:
VueMasterImage1LeftSprite
VueMasterImage1RightSprite
A Sprite
holds information about how to display a Texture
and a Texture
has a reference to a CharSet
. All of these are abstractions of the underlying VB's graphics hardware. There are 2 Sprites because we have a stereo image, hence, 1 image for each eye.
Image conversion
VUEngine Studio uses a program called "grit" for converting images into the c files that you are asking for, containing arrays that define tiles and maps that reference those tiles. These are then used by CharSets and Textures respectively. In this example, they are VueMasterImage1Charset
, VueMasterImage1LeftTexture
and VueMasterImage1RightTexture
.
In the assets/images
folder you'll find a few .image.json
files. These contain the image conversion configuration. Basically, the image converter searches for all of these files in the project and converts the images referenced under images
with the given settings.
Replacing an image in VUE-Master
Let's now replace image 1 with your own. These are the steps.
Note that images must be in PNG format and should use an indexed 4-color palette in the following order: Black, Dark Red, Medium Red, Light Red. Example palettes in various formats can be found here: https://github.com/VUEngine/VUEngine-Core/tree/master/lib/palette.
-
Replace
VueMasterImage1L.png
andVueMasterImage1R.png
inassets/images/VueMasterImages/VueMasterImage1
. -
Run the image conversion. There's a widget in the right sidepanel of the editor, which holds a button to start the conversion and lets you see some logs.
-
The engine needs to know how many tiles it has to load, so open up
assets/images/VueMasterImages/VueMasterImage1/Converted/VueMasterImage1.c
and copy the tile count, found in line 5, to the respectiveCharSetROMSpec
found inassets/images/VueMasterImages/VueMasterImage1/Spec/VueMasterImage1Spec.c
(line 41). -
Build & enjoy.
Note that the VB is limited to 2048 tiles. Minus a few for the font to display the current image's number (15, I think). If your converted images require more tiles, you have to reduce visual complexity and convert again.
from vuengine-studio.
Great,
Thank you very much. I missed the Convert Image Panel :). I did a small gba game and the engine used grit too so I'm a little familiar with it but I didn't know how to launch it. I thought it was included in the build process...
Now I have to look closer to your explanations about stages, entities and sprite :)
Seriously, your answer really helps. I think it would be useful to add this (maybe in a faq section) in your documentation.
I'll try to integrate my stereo animation in the VUE-Master (I guess not before this week-end) and I'll be happy to share this experience if you will.
Thanks a lot for your help :D
EDIT: I'm using Windows 11
EDIT2: Just tried quickly, it worked. I now have to fix some issues on my images. Thanks again
from vuengine-studio.
Awesome! I'll leave the ticket open until we incorporated the info into the docs. Maybe others will find it useful as well. :-)
from vuengine-studio.
Ok, great.
I just had a little problem when trying to add a 50 frames animation. Default maximum is 16 frames, so I changed the maxFramesPerAnimationFunction in Engine.json and the __MAX_FRAMES_PER_ANIMATION_FUNCTION in config.h in the engine-core (and clean and rebuild).
Hoping it can help somebody :)
from vuengine-studio.
Hi,
I post this question here because I think it's also a "Getting Started" improvement need :)
I try to get sounds in my project and I have issue to find documentation about it. I had no problem to use the files provided in example projects but how can I "compile" my own files ?
For Midi, I saw in the generated files they was produced by a modified version of this software : https://www.virtual-boy.com/tools/midi-converter-and-player/downloads/
but I didn't find the "modified version". I guess I can modify the file this tool generated to get it work but if I can find the "modified version", it would be easier...
And for Wav files, I didn't find any information to know how to compile it and the documentation is empty on this subject.
Can you tell me the tools I need and where to find them ?
Thanks :)
from vuengine-studio.
Thanks a lot for the quick reply :)
For PCM sound, you need a .pcm file to convert a WAV file. The WAV file needs to be preprocessed to be mono and of a bitrate of 8 kHZ or less. Here's a sample: https://github.com/VUEngine/VUEngine-Showcase/tree/main/assets/PCM
Ok, my files were stereo 44k. I switched them to mono 8k (32bits float). I tried to modify the pcm files and to close and reopen the IDE but it doesn't seem to convert it. Do I need to launch some command ?
Edit: Just tried the Midi Converter but when launching MusicPreCompiler.exe, there is no GUI and launching it in command line doesn't display usage text. I tried MusicPreCompiler.exe myfile.mid, it does log "Precompiling music for: myfile.mid" but I can't find any generated file...
from vuengine-studio.
Related Issues (20)
- Folder-scoped preferences not properly supported
- Encoding problems when creating project from template HOT 1
- Ensure libgccvb compatibility
- Add VR support
- Running emulator does not honor changing of build mode HOT 1
- Code generator: generate all does not generate FontSpecs
- "Add Folder to workspace" does not work as intended
- Image converter doesn't work as expected when defined the "rle" flag.
- Emulator should check if ROM exists HOT 3
- Test Framework
- Issue building new project with template barebone HOT 7
- Improve Translations Editor
- Git executable error HOT 2
- Rumble effect editor does not support firmware 1.1
- Opening large files renders the frontend unresponsive
- Appears to be not very well optimized for multi core architectures
- Can't compile projets on Windows HOT 3
- Incorrect config.make after removing unused Plugin HOT 2
- Building Base Project Fails for MacOS M3 Max HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vuengine-studio.