You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
All that asset loading does is put entries in the Q.assets[assetName] hash, so it's not a problem if you want to work around this (I'm working on some minification code that does this automatically), the easiest way is just to add some stuff directly onto that assets hash:
The way I've done it in production games is to create a separate Quintus module that has your data in it:
// in mygame_mydata.js
Quintus.MyData = function(Q) {
Q.assets['sprites.json'] = { ... json data ... }
... set more assets ...
}
// in mygame.js, make sure your HTML loads mygame_mydata.js
var Q = Quintus().include("Sprites, Scenes, ..., MyData");
// You'll now have your assets preloaded and can use offline without a server
This is something worth noting in the guide - I'll add it in.
I don't like json load model for sprite or level.
It possible use array or other ?
With json you can run game only in server really ?
Thank you.
The text was updated successfully, but these errors were encountered: