Ashley's Forum Posts

  • You do not have permission to view this post

  • No worries :)

  • I'll see if I can get mouse wheel events in the next build.

  • The resolution does not depend on the physical size. In fact, you should not use a specific resolution at all. Just set 'Fullscreen in browser' to 'On (scale mode)' in project properties, and the canvas will scale up to fit whatever size it is.

  • Hi all,

    Graphics card drivers are a bit of a problem both for Construct 2 and HTML5 in general. In Construct 2 old drivers can cause crashes and glitches. For HTML5 in general, many ordinary users have out of date drivers, and this causes their browser to revert to software rendering making the game run slowly for them. If they updated their driver the browser might enable hardware acceleration then the game would run super fast... but most people probably have no idea how to do that. I reckon this is the #1 problem with HTML5 performance on desktop.

    So I've done a little side-project to create a tool called the Graphics Driver Updater. This is a really simple program that tells you what your graphics card is, how old the driver is, and gives you a relevant link to go update it. It's designed for non-technical general users so it has a little bit of explanation and is meant to be as straightforward as possible.

    Here it is:

    <font size="5">Download the Graphics Driver Updater (beta 2)</font>

    (last update: 25th February 2012)

    Could you all give it a spin and let me know how it works for you? I'd love to get feedback on if you think it's clear, simple and straightforward. It should also accurately detect your graphics card and the driver date, but let me know if anything seems amiss. Also if detection fails you'll see a "Sorry!" message - would be interesting to know what your setup is in that case.

    Also I haven't tested on XP so would be reassuring if someone on XP could give me the thumbs up it works.

    If it all goes smoothly, I'd like to release this as an open-source general purpose tool. Any games or apps that need up to date graphics card drivers could use it. Also, if people complain to you about your HTML5 games being slow, you can send them to this tool so they can easily update their drivers, which is the most likely thing to make HTML5 games go faster. It's probably much better than trying to get an ordinary user to figure out what their graphics card is.

    The situation with graphics card drivers is total shambles. Many are poorly engineered or simply broken and many manufacturers do nothing to help people update them. It's been a huge pain in the ass while developing Construct 2 and will surely cause more problems in future for other people, especially in HTML5 performance, so I hope this tool can help make life easier for some others out there, because the people responsible for graphics drivers are not doing great IMO.

  • Does it work if you disable minification? If it does, usually it means a third party plugin is broken and does not work with the minifier. If you can reproduce this with no third party plugins, that proves it's a Construct 2 bug, otherwise I must assume it's a broken third-party plugin.

  • This is a bug in the function object. The way triggers work is triggering "On function" with fn_name = F1 triggers both "On function F1" and "On function F2", with the intent that only "On function F1" returns true. In "On function F1", which is first in the event sheet, "Call F2" sets fn_name = F2 and again Construct 2 triggers both "On function F1" and "On function F2", and this time only "On function F2" returns true. However the value of fn_name has been overwritten, and now execution returns up the stack and Construct 2 is still triggering all "On function" events for the original "Call F1" action. Since fn_name was overwritten to F2 in the nested function call, it should trigger "On function F2" with fn_name = F1, but it's now F2 which returns true and incorrectly runs the event.

    Relevant part of the plugin:

         FunctionKlassProto["_CallC2Event"] = function(name)
         {
            this["fn_name"] = name; // *** overwrites a single value
             this["plugin"].runtime.trigger(cr.plugins_.Rex_Function.prototype.cnds.OnFunctionCalled, this["plugin"]);
         }; 

    Instead you need a stack of state like the event system uses: you need to push the function name to a stack, trigger, then pop the function name from the stack. In 'OnFunctionCalled', only compare to the name at the top of the stack.

  • Can you reproduce this in a new project?

  • Please see how to report bugs. We really need a repro .capx made from scratch for issues like this. Otherwise it could just be an issue in your events.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • The preview and export should look the same, yeah, but it's probably the fact non-fullscreen preview mode centers the canvas in the (non-scrollable) window for more convenient testing, and this is ideal for games and no game would ever have a non-fullscreen canvas bigger than the window. Can't you work around it by using a temporary smaller canvas during testing?

  • I'm not sure this is a situation we can support - the canvas is not designed to be bigger than the window, and if you use a fullscreen-in-browser setting there's no good way to integrate with the browser scrollbar. To be honest Construct 2 is designed as a game creator and not a website creator, so I don't want to get involved in adding features to design websites. You should be aware of severe shortcomings from designing websites like this: it's often inaccessible, will not be viewable on old browsers, it's unsearchable, untranslatable, does not integrate with browser forward/back, has no URLs to specific pages, cannot copy/paste text out the page, Google cannot index it so you'll get a rock bottom pagerank, etc. etc. Many of these issues cannot be fixed at all. Because of this I don't recommend making websites in Construct 2 and we probably won't fix any issues that crop up in trying to make websites. I highly recommend going back to HTML!

  • Go2Holidays - I think I've managed to fix audio in PhoneGap for the next build. Note that android_asset is specific to Android so it will break iOS, I've added an Android-specific check in my version. Also the Audio object has a pretty complicated caching/audio recycling engine which your code does not take in to account, I'd recommend waiting for the next build where it should work!

  • Do you have any preload on start of layout though? It might accidentally be playing preloaded sounds.

  • Try creating the object in the middle of the circle, then using the 'Move at angle' action to move it a distance at random(360) degrees.

  • Apple prevent HTML5 games playing audio without user input, apparently to prevent web pages wasting cell bandwidth. Try publishing via appMobi to get sound working better.