Ashley's Forum Posts

  • There is a bug in Safari that it cannot load sound from the offline cache. There is no way to get sounds to play offline: either you disable the offline cache so sounds can play but it won't work offline, or you enable the offline cache so it works offline but sounds might not play.

    It is however already fixed in the latest iOS 9 betas, so it should be fixed from iOS 9.

  • The engine doesn't know ahead of time what kind of scaling or zooming will be used. If they are only ever used small, it will waste memory preloading images which are too large, and if they are always scaled up a lot, they will still appear pixellated. Also any kind of image processing on startup could make the loading take far longer.

  • A PNG file is just a PNG file. There are no "fast" or "slow" PNG files. They are all the same. The software you use to create PNG files doesn't matter.

  • There are a few problems with SVG support in C2:

    • as people have mentioned, it can seriously degrade performance. Textured sprites are super fast to draw. Normal sprites are always a box with 4 vertices. A single SVG object could involve hundreds of vertices, having an equivalent performance impact as hundreds of sprites.
    • there are not currently any good libraries for drawing SVG in WebGL, the main renderer for C2 games. Even browsers themselves have patchy support for rendering all the many features of SVG in web pages. Writing such a library when none exists is a significant project, and it's hard to justify it when it could take a great deal of work and end up slowing down games.

    I think it's possible to render SVGs at a fixed size and then just use them as a WebGL texture, but this could still be slow when scaling objects gradually (every size change requires re-rendering the SVG then uploading a new WebGL texture to the GPU), and it would still use lots of memory (the same as if you just used a normal texture in the first place). I'm not sure that really has any benefits.

  • We do not ourselves impose any restrictions on the type of content you publish with Construct 2. It is a tool, and it is up to you what you use that tool for. However some content may be illegal to publish, and other content may have restrictions and regulations around how and where you can publish it, but that is a problem for you at the time you decide to publish.

  • It should be a simple matter of setting it to the middle of the viewport as the posts in this thread already suggest. Check the origin is in the middle. If it doesn't work please post a minimal .capx with nothing else in it other than the object, with 50 events and lots of objects it's hard to prove it's not something else you've done that is breaking it.

  • See Construct 2's export-time optimisations. It's by design that Construct 2 imports everything in your project as PNG, and recompresses it when exporting. This makes it pointless to do any compression yourself before importing. If you want to set an image to JPEG, choose the JPEG option in the Image Format dialog in the Image Editor, and the image will be recompressed to JPEG on export.

  • A more general way to look at it would be:

    Set X to Function.Call("func", Y)

    This would be run in the following order:

    1. Call "func" with parameter 0 being Y

    2. Run events for "func", which set a return value

    3. Set X to the return value

    The function has no idea what happens to its return value. It's used by whatever called the function.

    So in my original example, both X and Y are the "experience" variable. If you wanted the return value to go somewhere else, you'd use a different action and cut and paste the Function.Call(...) expression in to one of its parameters.

  • I'm not sure exactly what you need, or why there needs to be a new feature to do it. I don't see why you can't just have an event like:

    Ship: set instance variable "experience" to Function.call("calculateExperience", Ship.experience)

    So you retrieve the experience, call a function, return a value and assign the returned value back to the instance variable all in one action.

  • Moved to Website Issues, FAO Tom

  • This is a typical problem caused by having the wrong MIME types set. Double-check them. Also check the browser error console for information about precisely what is going wrong.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You should definitely import files as project files and request them via AJAX. Pasting large amounts of data in to expressions has significant pitfalls and also requires extensive escaping of the data to stop the double-quotes ending the string, which is a really tedious problem to fix.

  • I always ask to see CPU-bottlenecked .capx projects. Usually either nobody sends me any, they send such appallingly inefficiently designed games it is obviously just bad design, or they are actually GPU-bottlenecked. Please do send any good examples of CPU-bottlenecked games, so I can investigate if our engine needs optimising. I rarely see such examples though, which is why I have concluded most games are not CPU-bottlenecked.

    TheRealDannyyy - if a game runs at 15 or 30 FPS that could easily be due to GPU bottlenecking, or using software rendering due to poor quality drivers (in which case native engines would be susceptible to crashing, failing to work at all). Neither of those cases is much better by moving to a native engine. Anyway, if Canvas+ works better, that's not a native engine either, it just highlights that perhaps there is some issue with Cordova/XDK, and they can be improved, I don't see why this requires a native engine to solve.

  • paradine - as I keep saying, many games we see are GPU bottlenecked, so would not run faster in a native engine.

  • I think you're confused what each option is for. The Windows 10 export makes a Windows 10 Universal app, which is a whole new architecture for apps and works differently. If you want an EXE file, you still need to use NW.js.