Search the Community

Showing results for tags 'save'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • HTML5 Game Coding
    • News
    • Game Showcase
    • Facebook Instant Games
    • Coding and Game Design
  • Frameworks
    • Phaser 3
    • Phaser 2
    • Pixi.js
    • Babylon.js
    • Panda 2
    • melonJS
    • Haxe JS
    • Kiwi.js
  • General
    • General Talk
  • Business
    • Collaborations (un-paid)
    • Jobs (Hiring and Freelance)
    • Services Offered

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Website URL


Twitter


Skype


Location


Interests

Found 15 results

  1. for example i have: html button <button id="objButton" onclick="fileExport()"></button> result of var objtext = BABYLON.OBJExport.OBJ(OBJexport); // this is *.obj file syntax with meshes from scene what syntax should i use inside fileExport function, that popup window savefile in browser? I have syntax with link a href which work , but i need use button, because the program gui with buttons usually, but not with text links. this is a href syntax: function download(text, name, type) { var a = document.getElementById("a"); var file = new Blob([text], {type: type}); a.href = URL.createObjectURL(file); a.download = name; } after this, click link and can save file. I need button way. If possible not way where button press call a.click()
  2. loading a text file in phaser with typescript is trival with a simple: this.game.load.text("reference", "url") however attempting to write or modify external text files appears to be way more complicated. I'm guessing this is for security reasons, but still don't see why there can't be a "game.write.text()" method or something similar?
  3. charlie_says

    Phaser export image sequence

    Hi, Having had the most cursory look, it seems that you can export an image from Phaser (I've not tried it, but it seems you can.) I need to create an animation, that will be far easier to create via code, but I wondered about exporting multiple images from phaser? Anyone tried this? Or, something like this? Other thoughts?
  4. Hello Experts I need your Best Guidline I need to know Is it possible to take 3d Model Canvas Screenshot ? And How Its Work can u show me demo ?
  5. Hi everyone, I have now been stuck with a problem for a while and figured I would ask here to see if anyone knew how to fix it. I have a scene where you can dynamically add your own images to it, that will than be transformed into a material with the images as the diffusetexture. The transforming happens by using the raw image data to create the texture with the function: BABYLON.Texture.LoadFromDataString - it looks something like this: material = new BABYLON.StandardMaterial("imageMaterial", scene); var imgTexture = new BABYLON.Texture.LoadFromDataString("data:" + Math.random(), RAW IMG DATA, scene); material.diffuseTexture = imgTexture; This all works fine, the problem that I am having is that I want to be able to save the scene and load it again later. But it seems the the SceneSerializer doesn't save the texture/material information (the raw image data), so that when I load the scene I get the error: Materials: Name: groundMaterial babylon.custom.js:5 Uncaught TypeError: Cannot read property 'width' of null at E (babylon.custom.js:5) at n.createTexture (babylon.custom.js:5) at new i (babylon.custom.js:11) at babylon.custom.js:11 at Function.t.Parse (babylon.custom.js:2) at Function.i.Parse (babylon.custom.js:11) at Function.t.Parse (babylon.custom.js:2) at Function.r.Parse (babylon.custom.js:17) at Function.t.Parse (babylon.custom.js:14) at Object.load (babylon.custom.js:28) Looking at the saved serialized scene, I can also see that it is not saving the raw image data, so I have customized the serialize() function to find and save the data when the scene is saved, then the idea was to unpack it when it loads somehow. But I still can't stop the above error from happening. Is there anyone that knows a good way to do this or a fix to how I'm trying to do it? In short: I am trying to save and load a scenes that have material/texture that I created from my own images. But the loader and saver, doesn't seem to recognize/save the custom material properly. Thank you!
  6. Finders_Keepers

    LocalStorage not persistent

    I want to know how to keep the localstorage save data persistent in my game. If i reset my device the locally stored data is lost Eventhough i'm not clearing the cache. I'm trying to save highscore and stuff. How do i keep it persistent should i keep some log on the server? I'm running the game on Chrome fyi
  7. I recently started developing a game using Phaser. one of the things i want to do is make a map editor that can turn a tilemap object into json when you're done making a the level. the json output should then be able to be loaded in the actual game. i tried turning the tilemap object into json using JSON.stringify(map), but i just got an error telling me it has circular references. so my question is: how do i export a tilemap to json from WITHIN phaser (if it is possible)? i found alot of people talking about the map editor called "tiled", but please understand that i wanna make my own tool and i'm not up for learning tiled or any other map editor if i can avoid it. if any of you guys know how to do this please let me know. this problem is VERY annoying because i already got the editor working ~80% like i want it to .
  8. nuvorm

    html5 explosion generator

    Hello All, A few years ago i created an explosion generator in flash that was well received by the community of indie developers. Since the days of flash are over i wanted to make a better version using html5. At first i was using just software rendering and canvas, which was kinda.. eh.. slow. I switched to the pixi lib using web-gl and the particle batch renderer improving performance about 1000%. It has a few options to play around with. You might want to check it out at: http://www.explosiongenerator.com It has the option to save the images as transparent png's in a zip for use in texturepacker. Cheers, Wouter
  9. Hello Everyone ! We are launching GameZyme's closed beta; we provide a wide array of services from an unified crossplatform api and backend; user authentication (social login, or email + password), player saves, global and social leaderboards, a domain whitelist to protect yourself from pirate portals, the ability to define game variables and retrieve them from the server (for example, this would allow you to change the amount of "player lives" across platforms, without pushing new binaries to the appstore/google play). The platform will have no cost for beta users until November 2016 (after that, we will move to a pricing structure similar to Digital Ocean's), the idea is to polish our current features, and develop features that you need. If you are interested, request beta access here: http://www.gamezyme.com/#request Also, you can download our Javascript SDK from Github: https://github.com/GameZyme/js-sdk GameZyme Javascript SDK Initialize To use GameZyme, you must have an account (sign in here), and a game set up on the dashboard. Then you just need to add the SDK and your game's public key to your HTML. You can get your game's public key in the Settings - Basic section of our dashboard. Example <head> <!-- Host it locally --> <script src="/js/gz.min.js"></script> <!-- Or Get it from an external source --> <!-- <script src="https://rawgit.com/GameZyme/js_plugin/master/dist/gz.min.js"></script> --> <script> var publicKey = "<YOUR GAME'S PUBLIC KEY>"; Gamezyme.init(publicKey, function(result) { // Connection suceeded console.log("Connected and ready!"); }, function(error) { // Something went wrong console.log("Something went wrong! \n" + "Error detail: " + error); }); </script> </head> Game Using the GameZyme's dashboard you can set variables that can be retrieved from your game in the Properties - Gamevars section. .getAllVars(callback) Retrieve all game variables set in GameZyme's dashboard. Example var gameVars = {}; Gamezyme.game.getAllVars(function(response) { gameVars = response.result; }); .getVar(key, callback) Retrieve a single variable set in GameZyme's dashboard. Example var key = "boss01_health"; var value; Gamezyme.game.getVar(key, function(response){ if (typeof response.error == 'undefined') { value = response.result; } }); Server .ping(callback) Get server Status Example Gamezyme.server.ping(function(response) { if (typeof response.error == 'undefined') { // everything's fine } }); Player These methods are related to the player's information. Here you can login, logout, save player data, among others. .forgotPassword(email, callback) Send an email to the player with the steps to recover his/her password. Example var email = "email@example.com"; Gamezyme.player.forgotPassword(email, function(response) { if(response.result === "success") { //Email sent console.log("Check your email to recover your password"); } }); .getData(callback) Gets the player's peristed game data Example var playerData = {}; Gamezyme.player.getData(function(result){ if(result.status === 'success') { // Successfully retrieved data console.log('Data retrieved'); playerData = result.response; } }); isLoggedIn(callback) Check if the player is already logged in Example Gamezyme.player.isLoggedIn(function(result) { if(result.response === true) { // This means the player ir already logged in console.log('Player already logged in'); } }); localLogin(email, password, callback) If a player has an account, use this function to login into your game. Parameters email and password must be Strings. Example var email = 'foo@bar.io'; var password = 'foobar'; Gamezyme.player.localLogin(email, password, function(result) { var error = result.error; if (error) { // Maybe there's an error with his email or password console.log(error.message); } else { // Player logged in successfully console.log(result.response); } }); .localSignUp(email, password, name, callback) Use this function to register a player with an email, a password and his/her name. All these parameters must be String Example var email = 'foo@bar.io'; var password = 'foobar'; var name = 'Scott C. Alves'; Gamezyme.player.localSignUp(email, password, name, function(result) { var error = result.error; if (error) { // Probably the player exists console.log(error.message); } else { // Player signed up successfully console.log(result.response); } }); .logout(callback) Use this method to logout the player. Example Gamezyme.player.logout(function(result){ if(result.status === 'success') { // Player logged out console.log('Player logged out'); } }); .me(callback) Retrieve information about the player. Example var player = {}; Gamezyme.player.me(function(result){ if(result.status === 'success') { // Successfully player info retrieved console.log('Player info retrieved'); player = result.response // Player's email console.log(player.email); // Player's identifier console.log(player.identifier); // Player's name console.log(player.name); // Player's typeIdentifier (local sign-up or facebook) console.log(player.typeIdentifier); // Player's profile picture (Only available if the player's typeIdentifier is "facebook") console.log(player.urlProfilePicture); } }); .openPopupLoginFacebook(callback) Open popup for Facebook login Example var btnLoginFacebook = document.getElementsById("fb-login"); btnLoginFacebook.onclick = function(e) { Gamezyme.player.openPopupLoginFacebook(function(result) { var error = result.error; if (error) { console.log(error.message); } else { console.log(result.response); } }); } .saveData(callback) Persist the player's game data Example var data = { currentLevel: 5, money: 3200, score: 5000, }; Gamezyme.player.saveData(data, function(result){ if(result.status === 'success' && result.response === true) { // Data saved successfully console.log('Data saved'); } }); Leaderboard In GameZyme we handle 2 type of crossplatform leaderboards: Global leaderboard and Friends leaderboard. Using these methods you can show both leaderboards. .getFriends(options, callback) Get the player's friends leaderboard (currently we only support Facebook friends) Example var options = { order: 'DESC' // This accepts only 2 strings: 'DESC' and 'ASC' }; Gamezyme.leaderboard.getFriends(options, function(result){ if(result.status === 'success') { // List retrieved successfully console.log(result.response); } }); .getGlobal(options, callback) Gets all players leaderboard Example var options = { limit: 10, order: 'DESC' // This accepts only 2 strings: 'DESC' and 'ASC' }; Gamezyme.leaderboard.getGlobal(options, function(result){ if(result.status === 'success') { // List retrieved successfully console.log(result.response); } });
  10. Hi, I was just wondering how, in theory, you could incrementally load part of a scene that is changed in game and saved out? i.e. Load map, build things, save map. I've read the docs and seen that there is a way to do incremental loading, but that is using a piece of software that I won't have on the server. Can I save out the blocks of the scene into a certain json format? Thanks for your help
  11. Hi, guru's! Please help me, if possible I make saver for scenes. And mett problem: After loading property of Mesh geometry sets in undefinded and scene.gScene.getGeometries() returning empty array normals, positions, indices, etc for meshes in .babylon file is present. also its information duplicated in [geometries] section as "geometries":[{"vertexData":[HERE]} geometryID property for meshes is setup too. And for geometries too. But, after loading meshes in scenes dont have geometry property and scene haven't any geometries. Please help my, i'm in deadlock.
  12. Kobaltic

    Is there a save function?

    I was wondering if a save function has been added to Phaser or if anyone has one available?
  13. TheRegge

    Saving tilemap data to database

    I am making a relatively simple game using Phaser.Tilemap... I need to save the tilemap data to a sql database. Any idea how to go about that? I am aware of localstorage, but I need a permanent data save that can be share across sessions and users... Also, when I try to use: myTileMapName.dump();also,I get hundreds of '.' characters printed to the console... nothing else... I am confused. Any help very appreciated.
  14. would the space saved from having a spritesheet of letters be worth all the trouble of working out ways to place them or just have a spritesheet of all the words you'll be using? what would you guys deem more efficient? space saved/time saved ratio edit 1: yes i know that it depends on how many words are used.
  15. seiyria

    Preferred way of saving data?

    Is there a preferred way of saving and loading data from within Phaser? I couldn't find a class in the docs that would seem to reflect something like a data manager (and a quick forum search turned nothing up), so I wanted to double check and see how others do it.