When I Run Graphics On HTML5 I Get Lags
Monkey Forums/Monkey Programming/When I Run Graphics On HTML5 I Get Lags
| ||
I mean I move a sprite or image and It stops moving smooth and starts move in fragments. Im using chrome browser. ive tried it also with out debug mode and still the same. any idea? another quastion can you save a text file while compiling to html5 there is loadstring but there aint savestring command |
| ||
I mean I move a sprite or image and It stops moving smooth and starts move in fragments. Be sure to have no other tabs open in chrome. Or processes with heavy load on your system. Does the same happen when compiling to flash? can you save a text file while compiling to html5 You can use SaveState() for this. |
| ||
but on SaveState you cant define a file name right? also whrere does the file get saved ive looked on the data file and nothing there also what is the name of the file that savestate creates? |
| ||
but on SaveState you cant define a file name right? No. also whrere does the file get saved Depends on which platform and which browser is used. See first post here: http://www.monkeycoder.co.nz/Community/posts.php?topic=485 also what is the name of the file that savestate creates? Just use LoadState(), you dont't need to know the name. |
| ||
No-one can diagnose a performance issue from the information you've given. If you want help then you will have to post the code. If you don't want to post code then the best advice that can be offered is that you should learn to use the profiler in Chrome. |
| ||
I see its no big deal any way atm since my target will be android so a few lags wont boder me at this faze. I dont mind putting my code btw there is nothing special about it But about the save string i have aproblem since i need it for a data base load and save and i need to edit the saved file with txt editor. |
| ||
Then you will need to either: 1. Use a target that supports reading from and writing to local files, e.g. GLFW. Or 2. Become familiar with the local storage mechanism for the state string under HTML5 on Chrome and edit that file. Hint: they're sqlite database files stored in the Chrome LocalStorage folder wherever your OS stores such data. Or 3. Write your own storage backend for the HTML5 target. |
| ||
Oh, there is another option, which is to use a text/json/xml file with the LoadString function and then simply print any edits to the console on the HTML5 build and manually paste that back into the file. It's not the greatest work-flow in the world, but it gets the job done if you must have an editor running in HTML5 and don't want to write your own output backend. |
| ||
Load state and save state are good for saving high scores and player details. but how do i save game data like maps etc... |
| ||
but how do i save game data like maps etc... You cant in HTML5... just in GLFW (or stdcpp) using the os module in Monkey. |
| ||
now i got it thanks btw sorry for noob quastion but what is glfw anyway |
| ||
Other way is: put result of your map data to console and then copy/paste to txt file. |
| ||
what is glfw anyway GLFW (GL framework) is an open source OpenGL library, which Monkey uses to create OpenGL apps for Windows and Mac. |