genbatzu's Recent Forum Activity

  • katzin I think it's the same issue I had. You use the same button for both actions (volume on/off). On the first touched command the "VolumeVariable" goes from 0 to 1, as expected, but then it automatically triggers the 2 command, because VolumeVariable=1 is now true, and the action for this condition is to set VolumeVariable from 1 to 0

    this here is similar to "Pixel perfick"s solution and works, but it's not perfect

  • Thank you all for the replies!

    Paradox & Aphrodite

    "else" is greyed out, I tried to use it, sorry I should've mentioned it, even after deleting the sub-conditions (which I think are the reason else is greyed out) http://abload.de/img/musicsoundonoff_greyekkupm.jpg

    [/img.]

    //"edit": creating the whole event from scratch allows me to set "else", however, the positioning seems odd to me, because it's not "linked" to the above event by the typical "line"

    //edit2: oh I see where the "else" should be positioned now =)

    like this?

    however, it's not working always, sometimes it changes to correct 0/1, sometimes it doesn't change at all, after further testing, it changes to 0/1 after 4-5 clicks on the button

    pixel

    I tried your approach and it worked =)

    May I ask why you're using webstorage for the control of the music/sound ?

    Sure! It's to remember the settings, so even if the player quits the game, he comes back and his settings are the same.

  • hi there construct2 community!

    My 1st game is nearing completion and I began to add sounds and music into it.

    So far so good, but I've ran into an issue with a toggable on/off button for sounds and music

    I tried the following solution:

    2 Local Values (WebStorage.LocalValue("xxx"), both wit 0 (sounds/music off) and 1 (sounds/music on).

    If the player clicks on the "XXX off/on" button the sound/music localValue is changed to 0 or 1, depending on what it was before.

    It will look like this:

    (ignore the "MusicOnOff/SoundOnOff" is visible/invisible part, this is only a button-was-pressed feedback for the player and works as intended)

    next step is to let music/sounds only play when LocalValue=1, this is rather easy and works.

    My problem is: Both Local Values don't change on button pressed! They go from 1 -> 0, but not back to 1 if I press again. Even after switching the layout or restarting the run/debug layout the values won't change on button clicked.

    I've tried different things allready, but none works :(

    Help would be much appreciated!

    greetings

    batzu

    //edit1: if I switch the order of the Local Key "SoundOn" = 0 and Local Key "SoundOn" = 1, and same for Music, it changes from 0->1 but not back.

    I assume if I press the "SoundOnOff" button it runs through all of the sub-conditions, so first it will change form 0 to 1 and then immediately back from 1 to 0 or vice versa, depending on which condition comes first, because the 2nd condition immediately is true ._.

    So what I need is a way to "check" what value the local key has.. I thought the way I did it worked

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I've no idea how I should test this, and the 4 step how-to on the download page doesn't help me either ._.

    is there a beginner friendly way to test this?

    Currently I'm exporting with CocoonJS and have the problem of long loading times and lags. (as discussed here)

  • thanks Vuuv, then I'll stick with CocoonJS for now and have to figure out how to minimize it further. It's kind of crazy what ideas one can have when needed ^^

    cut my tiled background into 3 parts, removed 2nd part and replaced it with background color, no visual difference but saved memory, reducing the animations also helped and is not really noticable

  • thanks for the infos Ashley!

    I got the Approx. Download down from 3.3MB to 1.3MB thanks to changing it to png8 and jpg. However, as you said, it had no impact on the memory usage.

    I had a (very) quick look at Crosswalk and it seems to only supports Android?

    Ejecta looks really interesting, do you have an estimate, when "soon" is for this exporter? =)

    How is PhoneGap? In one of your tutorials you said that Games can be very slow with it

  • thanks vtrix, but the game should work completely offline <img src="{SMILIES_PATH}/icon_e_wink.gif" alt=";)" title="Wink">

    back to the PNG32/8 issue.

    All(!) of the images are in PNG-24, which is at least for 80% of them not needed, since they look the same in PNG-8, we tried it yesterday and are going to convert every image from 24 to 8 now, on an original image (still with 7016x4961px) the size was reduced from 2.2MB to 900KB.

    I'll post here the final result after all image reductions are in place

    /edit: ok, looks like construct 2 saves all images always in png-32, but has an option to change that at export

    for all who might stumble upon something similar:

    (https://www.scirra.com/manual/129/image-format)

    (https://www.scirra.com/manual/48/image- ... ons-editor)

    (https://www.scirra.com/blog/66/image-co ... onstruct-2)

  • What I've heard about some weakness about CocoonJS is that CocoonJS has been designed to load all the files when application starting. So I think there's nothing you can do unless Ludei updates their system.

    However, you can try resizing your images to be smaller, dropping the quality of them(like converting PNG-32 to PNG-8), or optimizing your game in other ways(Event optimizing, grouping, etc)

    thanks for the answer.

    I allready resized the images, since my first version was really unoptimized, with an approx. download of ~25mb and memory usage of ~280mb (according to construct 2) Now I'm down at 3.1MB download and 46.1mb memory usage. I don't think I can minimize the images any further, otherwise they would have a very bad quality on iPhone and iPad.

    I'll look into the conversion from PNG-32 to PNG-8, although I've currently no idea what "PNG-Version" my images have.

    When I thought about minimizing images I always gone straight for the resolution/pixels

  • Hi there!

    I have 20 images in my game which are used in a gallery and on the score screen. They are quite memory consuming on my iPhone 4 (via CocoonJS Launcher App, using Canvas 2D/WEBGL).

    my layout buildup is like this:

    title screen -> game screen -> score screen -> game screen or title screen

    gallery screen (via menu button on title screen)

    option screen (via menu button on title screen)

    hidden layout to initial spawn all highscore screens, otherwise I cant let them spawn in my gallery

    currently the game loads every single file (*.png) on start of the game, even if the highscore images arent used in the first 2 layouts (title screen -> game).

    This makes the game extremely laggy. If I remove all highscore images from the game it runs smoothly, so the problem is definitely with the images. strangely enough the gallery navigates without lag.

    Is there an option, that the game only loads the images when it is supposed to do it? ( gallery and score screens, NOT the beginning of the game)

    I also placed a "On Start of Layout => HighscoreParent -> Destroy" to every layout, but nothing changed (as expected)

    gallery image usage:

    score screen image usage

    thanks in advance for help! (=

  • Feel better?

    yes! thank you for the explanation

  • Hi there!

    I know a better place might be to ask Ludei directly, but it's always good to have a 3rd party opinion.

    I just read the Terms of Use for CocoonJS and stumbled upon these section:

    [quote:a0tijwfr]License Grant. By uploading User Content via the Services, you expressly grant, and you represent and warrant that you have a right to grant, and do so grant, to Ludei, a royalty-free, non-exclusive, worldwide license to use, reproduce, modify, publish, list information regarding, edit, translate, and make derivative works of all such User Content and your name, voice, and/or likeness as contained in your User Content, if applicable, in whole or in part, and in any form, media or technology, whether now known or hereafter developed, solely for use in connection with the Services. The foregoing provision does not apply to any User Content you upload, or any part thereof, that constitutes Ludei Marketing Materials as defined below. Ludei owns and reserves all right, title, and interest in Ludei Marketing Materials.

    By posting User Content to the Website, you expressly grant, and you represent and warrant that you have a right to grant, and do so grant, to Ludei a royalty-free, sublicensable, transferable, perpetual (for the duration of the applicable right), non-exclusive, worldwide license to use, reproduce, modify, publish, list information regarding, edit, translate, distribute, publicly perform, publicly display, and make derivative works of all such User Content and your name, voice, and/or likeness as contained in your User Content, if applicable, in whole or in part, and in any form, media or technology, whether now known or hereafter developed, solely for use in connection with the Services. The foregoing provision does not apply to any User Content you post, or any part thereof, that constitutes Ludei Marketing Materials as defined below. Ludei owns and reserves all right, title, and interest in Ludei Marketing Materials. If you delete User Content from the Website, we will use reasonable efforts to remove it from the Website, but you acknowledge that due to caching or references to the User Content, the User Content may remain available.

    my scenario will be something like this:

    • creating HTML5 game with Construct 2
    • optimize for iOS
    • upload to CocoonJS
    • upload to AppStore

    Since I'm not an english native speaker and kind of a beginner in terms of law and stuff I would like to ask this community here if I have to worry about my games if I upload them to CocoonJS, that they might just steal them and totally get away with it, because of these TOUs?

    If I'm totally wrong, can someone please explain this part of the TOUs to me? =)

    help would be much appreciated!

    greetings

    genbatzu

  • on your layout set unbounded scrolling to yes.

    and this might help also:

    BR

    perfect, thanks a lot! =)

    I was totally focussed on the main project settings and haven't thought about looking into each layout >.<

    also thanks for the link, will go through it when I've time, the pictures with the resolution helps a lot!

genbatzu's avatar

genbatzu

Member since 7 Feb, 2014

None one is following genbatzu yet!

Connect with genbatzu

Trophy Case

  • 10-Year Club
  • Email Verified

Progress

11/44
How to earn trophies