Savvy001's Forum Posts

  • Hi All.

    I have read multiple topics on this subject, but not a single one of them gives a step by step explanation of how to get .ttf fonts to work in the CocoonJS Launcher.

    I also saw Ashley post a reply: (You just need to import a TTF file to your project files, then when exporting to CocoonJS C2 automatically puts it in a Fonts subfolder.)

    But how do i import the file?

    Noob here asking the obvious, but cant find a way on my own.

    So if u have the answer, then please give a simple step guide, as in.

    A:

    B:

    C:

    Result = fonts visable within Cocoon Launcher.

    Thanx for helping!

    Kind Regards.

    Savvy001

  • To empower Ashly's post. found on page 4. of this topic

    Hi All!

    I am working on a game called SuperNinjaBall.

    And i am developing it for Iphone 5, using cocoonjs.

    My game is running at 40 fps which is perfectly smooth.

    It has all the graphics and sounds it "needs".

    Multiple sounds playing at the same time.

    Particle effects, that i can tweek to do all kinds of things.

    Paralaxing backgrounds.

    Great texts popping up everywhere in different collors for score's.

    I can tell u from experience that i was lucky this game runs smooth.

    That is because i had the basics for this game laying around on my hard drive.

    At first i build a version on the pc which "when i ported it to my laptop" ran really slow.

    Then i rebuild the whole thing on the laptop making it become fast again.

    After that i ported it back to the pc and the fps was really fast.

    This is where my "luck" came in.

    Because i did it this way, the resources i used for the game where based on a "slow" laptop.

    So anything above that standart would speed up the game significantly.

    Then after a few months i got my Iphone5 and downloaded cocoonjs.

    Now at this point it is good to know that i was testing a bunch of my games on cocoonjs before i tested SuperNinjaBall.

    I simply forgot i had it!

    These other games where all build on my pc, not counting in for performance, because my pc is powerfull enough.

    These other games where giving a fps rate of aprox 5 to 10.

    That, is not do-able even on a Iphone5.

    So remembered SuperNinjaBall and loaded it up into cocoonjs, and instantly got a big smile on my face.

    Not only did the fps show a great 40, the game seemed perfect for the responsive touch of this Iphone.

    Everything was just in place.

    So i started to recap on what made this different with all other games i had build.

    The simpel answer is, build something fast, on a slow computer.

    That slow computer forces u to learn the magic of minimalistic game designing.

    Then when u go to a faster device, u have some "overhead".

    This overhead is what u can use for some "graphics" magic.

    For my next game, i would start building it using cocoonjs.

    Only testing it with that.

    This would enshure me to get an even faster fps.

    Why..

    Because i would learn to understand the max potential i can get on the device i am building for.

    And "That" is what its all about.

    Using Cocoonjs from step 1, i can constantly monitor the fps and tweak the game design.

    So as for SuperNinjaBall, i was lucky: But i learned allot about the minimal side of developing.

    From this moment, fast games will not be build on luck, but wisdom.

    I hope this post give's u some inspiration.

    The short rule is: Learn the boundaries of the "space" u are workinig in.

    Only then u can tweak that "space" to its max!

    But always keep some overhead for "peaks" in the system!!

    Thinking, that all "Spaces" u are working in should be the same "is" understandable, but look around u in every day life.

    The "diversity" is what makes performance better each day.

    A rule of thumb that can be applied to everything, thus being html5/devices/cars/phones, or even your tasty sandwich ;-)

    Kind Regards.

    Savvy001.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • septeven

    Thank u 2 for all the thought and work u put in to helping and building.

    Kind Regards.

    Savvy001

  • Pode

    That is suc6 u have earned!

    Congrats on that.

    And we are just glad with the time u already spend on construct2.

    Kind Regards.

    Savvy001

  • Hi All!

    I am testing my app in the chrome bate version on my nexus7.

    The game runs smooth. Jippy!

    However i dont get any audio?

    And running the same game in firefox on android does give me audio.

    Does anyone have any answers/experience with this?

    Kind Regards.

    Savvy001

  • cvp

    As far as i know, u need to type the name of the file (in the app u have build).

    Then the plugin can reach that file in the dropbox and download it.

    Thats also how i use it.

    Kind Regards.

    Savvy001

  • septeven

    Is it possible to add a expression so we can set a textbox to " the amount downloaded/uploaded".

    That way the user can see the downloading/uploading process.

    At this point i can only show them: is uploading/downloading.

    And download/upload complete.

    Is it possible?

    Kind Regards.

    Savvy001

  • NRABrazil

    My app is on my own hosted site.

    cvp

    Thanx, your answers are correct. <img src="smileys/smiley32.gif" border="0" align="middle" />

    Ps: having the user of your app upload more images later on gives a problem as the app must know the image names.

    As in wich ones to load as URL.

    How would u overcome this using the Dropbox plugin?

    Kind Regards.

    Savvy001

  • cvp

    Well that will only work if the user would upload his images first via your app.

    But as that is not the way u need it, i think its a dead end "for now".

    Kind Regards.

    Savvy001

  • NRABrazil

    Thats correct.

    When a user starts my app, the app connects to "their" dropbox, not mine.

    Once they have logged in, they are asked for permission to connect this app to their dropbox account.

    When they click "allow" the app restarts and now the dropbox plugin is connected.

    From that point on the plugin stores information in the users own dropbox.

    This makes it possible for players or app users to store their complete savegame online, and vice versa to download it anywhere else.

    So anything u put into the webstorage, u can save/backup and do all kinds of fancy stuff with.

    In my current understanding, this plugin combined with the webstorage is the best option to give players/users truly a savegame.

    Its a relief to know i can simply delete my browser cashe, knowing that 2 clicks later im downloading my savegame again!

    Ps: thanx for your tip to towards cvp

    That is indeed the best option for him.

    Kind Regards.

    Savvy001

  • cvp

    Could u explain what the exact thing is u want to do.

    "using the images already in the dropbox" is a bit vague.

    To speak clearly: is it your intention to enable user content.

    Or do u, as the developer want to store all images in a dropbox yourself?

    Kind Regards.

    Savvy001

  • cvp

    The thing is that any normal image that is in the dropbox can't be displayed in your app.

    Construct2 gives u the possibility to load an image from a URL or URI.

    That being said: Dropbox needs permission from the user side to enable u to download.

    So just pointing the "Load from URL" (which is build in action in the event editor) to dropbox will not work.

    Correct me if im wrong on this matter.

    So if u want any image to be loaded into your game.

    Then u have to A: Put a premade .txt AsJSON with all your images in it in your dropbox.

    Or B: Go with the method i presented in the .capx

    Method B: is in short, load image into game/then upload webstorage to dropbox.

    Then later on u can download it again from dropbox back into the game.

    Thats 1-up for multi platform gaming ;-)

    But this method is based on user content for games.

    However u could also use it to build your base64 image collection.

    Which u can then download in other games.

    Hope this clarifies it a bit ;-)

    Kind Regards.

    Savvy001

  • Ashley

    Its not about smart use.

    Its about user content. (loading the face's of friends and all kinds of stuff)

    The users can upload their own images into the sprite instances using the Drag&DropZone plugin provided by Pode.

    Then with the dropbox plugin provided by septeven they can upload/download their complete webstorage: wich is growing bigger with more images each time they add new ones.

    For each image they upload, a new sprite is spawned and the image is set.

    But because of the fact that i cant spawn clone's of sprites, i am limited to instance frames for setting the uploaded image per sprite.

    So if i would give the main sprite 200 image frame "slots", but the amount of sprites eventualy reaches above 200.

    Then there wont be anymore frames left for the user to upload his images to.

    And i just dont want to limit the users because of a "estimated" pre-set amount of animation frames.

    I hope i explained it well?

    Kind Regards.

    Savvy001

  • cvp septeven

    Here u go. <img src="smileys/smiley20.gif" border="0" align="middle">

    Dropbox Image Example

    All the logic is in the capx.

    If there are any questions i'l help gladly.

    Ps: In the Capx The Sprite has a variable called Name.

    That is important if u want to save images under different names for different sprites or sprite instances.

    This way u get a nice list in the webstorage easy to retrieve.

    The image variable in the webstorage is always saved as "custom image".

    But saved under the name of the sprite.

    So u could have;

    Sprite name = John

    Webstorage = John & "custom Image"

    Sprite name = Pete

    Webstorage = Pete & "Custom Image"

    Etc

    In the end your dropbox will have a .txt file with the complete webstorage in it, including the images.

    This makes it super for games with user content.

    The nice thing about the dropbox plugin, is that when your app is approved by dropbox.

    The player of the game uses their own dropbox to save the data!

    The plugin just uses your dropbox secrect, letting dropbox know its your app that has connected with the players own dropbox.

    Kind Regards.

    Savvy001

  • cvp

    You could use the base64 technique that Pode has already build plugins for.

    Meaning.

    In my app i use the "drag & drop zone" plugin to get images into the frame of a sprite via the load from URI event.

    Then at the same time i save that base64 image string into the webstorage under a custom key.

    I upload the contents of the webstorage via the dropbox plugin to dropbox.

    Then i can get that same "savegame" with the images on any other computer.

    I simply download the savegame with the dropbox plugin again.

    And on download i set the base64 images back to the sprites.

    If u want images from dropbox, then base64 is the way to go.

    Combining the dropbox plugin septeven build with the plugins Pode build is key.

    And very simple to set up.

    Hope this helps

    Kind Regards.

    Savvy001