mindfaQ's Recent Forum Activity

  • Noone claimed otherwise.

  • The person uses Firefox 39.0. I am confused as well, but saw the result with common jpg compression artifacts, although in the end it was .png format. I don't suppose he lies to me.

    (note: with Paster it works fine, pictures are transparent. There I have the problem that I need to use a sprite font instead of the text object, which introduces other problems (for example not being captured, when not on screen at the point of dropping the objects to the paster canvas; and worse scaling)

  • Hello guys,

    so I noticed Rosetta Code recently and thought it could be a cool learning opportunity to do / achieve different tasks in Construct 2 that are given on that site. Short explaination: Rosetta Code is a collection of tasks. People are encouraged to try and solve the tasks with a programming language of their choice. Afterwards people can easily compare the approaches you can take with different language to solve a problem. Now Construct 2 isn't its own programming language, but instead based off JavaScript. However that doesn't mean we can't look for some simple events to do the tasks, instead of pasting the js into the browser execute function <img src="{SMILIES_PATH}/icon_e_smile.gif" alt=":)" title="Smile">.

    Everyone is invited to participate, it will be interesting to see what you guys can come up with.

    List of the more interesting tasks:

    http://rosettacode.org/wiki/Category:So ... mming_Task

    I'll start with:

    100 doors

    24 game (note: uses the eval()-function of JavaScript, since I did not want to script an additional calculator)

  • v1.0:

    https://copy.com/KCTlxMno6FGbhQto

    a small fix to the text displaying that I noticed.

  • Hello, I might need help with the canvas plugin.

    I've written an app that uses the plugin. A layer with some sprites on it is pasted onto the canvas. Then I use the browser object to download the picture:

    invoke download of url... canvas.imageUrl .... name "pic.png"

    For me it works perfectly fine, I get an image with the sprites on it and proper alpha channel. For another user it gives a png, but it is not transparent and shows compression artifacts that are common for jpg compression. Is it possible that a different (maybe older, out of date) browser would handle the canvas.imageurl as .jpg somehow out of compatibility reasons?

  • Local Storage since Web Storage is deprecated and not in favor of google playstore etc.

  • Not really.

    If you want users to be able to store some level data etc on your servers, then you need to work with a database and for example send the data to it by calling a php script that does the data entry into the database.

    If you want to store it locally without any sharing between users, you can use the localstorage. In this case it would make sense to combine the map editor and game itself into one app, since then it would use the same local storage.

    If you want users to be able to share their creations you would need a database again, except if you are going for an inconvenient solution like users needing to copy and paste long strings of text into their game.

    At least that are the options that I see.

    Node Webkit has a file writing function, but it did not work for me, so meh... won't cover that here.

  • Use ajax to read a project file (or file selected with the file chooser) into a variable.

    Let's say you have a simple csv:

    1;2.1;3;4
    1.1;2;5;8
    3;1;-1;6[/code:34zgy6k5]
    
    each line is a row obviously and colums are separated by ;. This is pretty standard a pretty standard .csv format.
    If you read the file with ajax you then can parse it into an array with a simple nested for loop.
    
    Example code:
    [img="http://666kb.com/i/d06a0iuzer52d2ae4.png"]
  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • can also rename it to .capx

  • It is not wrong to ask questions, but I would encourage people to try and solve the problem on their own or with existing web resources first.

    You can actually learn other things that might come in handy another time, while searching for the solution to a problem you have . The manual also covers a lot of things.

    Imo it is good to formulate questions in a way that makes them more generally appliable to different scenarios. Good questions imo are ones that apply to many different scenarios and focus on one specific point instead of a wide system of interwoven interactions, thats only applyable to a very specific project you might be working on. It certainly takes skill/experience to isolate and describe a problem as naked as it can be. This is not meant for the opening poster of this topic, but more a general comment about asking coding questions.

mindfaQ's avatar

mindfaQ

Member since 12 Oct, 2013

None one is following mindfaQ yet!

Trophy Case

  • 11-Year Club
  • Coach One of your tutorials has over 1,000 readers
  • Email Verified

Progress

13/44
How to earn trophies