Nepeo's Forum Posts

  • Disclaimer here, I haven't tried this before. But maybe something like:

    Keyboard.IsPressed("up arrow") and Player.IsOverlapping(Ladder)

    => Player.Platform.SetEnabled("disabled")

    => Player.Tween.MoveTo(Ladder.BBoxTop - Player.Height * 0.5)

    Player.Tween.OnComplete

    => Player.Platform.SetEnabled("enabled")

    Edit: just gave this a whirl and it seems to work, you cant jump off the ladder but maybe you could cancel the tween and reenable the platform behaviour if the left or right arrow key is pressed?

  • Ashley They do yes, but they are treated quite similar to normal saves which is why I didn't mention them ( you can view, open and delete them in the browser save/open dialog ). There should only ever have 1 autosave file per project as it overwrites previous versions when it autosaves, so a user would have to have a lot of large projects to generate 16GB worth of saves. I expect the "serialized value too large" error is being caused by the autosave when it's trying to save to indexeddb ( but there is no space ). At the moment when experiencing an unknown save error we quite often spit out the internal cause, I've been meaning to change this but it makes passing known error messages more complicated.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Construct stores several types of data locally, mostly in indexeddb ( which for the uninitiated is persistent database managed by the browser that is saved locally on the computer/tablet/phone ).

    1. Itself: Construct caches the files to run itself locally so that it can run offline, which typically doesn't take up that much space. I believe we cache the last 5 versions that you have visited, but Ash will have to confirm that
    2. Demo projects: the projects that you can view on the start page are downloaded and stored in indexeddb as required.
    3. Browser saves: when you save to "the browser" it goes in indexeddb
    4. Recent exports: recent exports are viewable in the export manager and are saved in local storage, up to 10 exports are held and the oldest is deleted if you have more
    5. NWJS files: when doing NWJS exports the files required to build that version are downloaded and stored in indexeddb. These are quite large, so it makes sense to store them locally instead of downloading them each time.
    6. Layout: in construct layout customisation is split into 2 parts: overall and project. The overall layout ( sizes of bars and positions ) is stored in local storage, project is stored in the project file itself.
    7. Recent projects: a list of recent projects and where they are saved is stored locally, so we can show you the recent project menu

    Just to reiterate all this data is stored locally on your computer so we have no access to it. Most of the large things on the list (NWJS files, recent exports, Browsers saves) have menus you can view them, how much space they are using and have options to delete individual items. Hopefully this will help you narrow down what is using all that space. You can also clear the layout customisation in the settings menu, but that is unlikely to regain you any space.

    We don't directly move objects to the disk as any sort of optimisation, but we make heavy use of "Blob" objects. Blobs are similar to files, but just loose ( not in folders or any kind of filesystem ). Due to the way they are designed the contents of the blob don't have to be in RAM, so some browsers may transfer blobs (temporarily) that aren't being actively used to the disk to reduce memory pressure. We don't have any control over this process, but I imagine it's unlikely to cause any storage issues. It also won't be included in the storage quota for a domain, or be deleted when you use "clear site data".

  • I'm fairly confident of where it is failing, but I don't have a reproduction to test it. I'll put in a patch which I hope will fix the problem in the next release, if it's still happening after that then let me know.

  • are you perhaps using import to replace the array files, or otherwise modifying the array files outside of the editor?

    I think the array editor may be experiencing a mis-match between the uistate data and the dimensions of the array.

  • Gillis PRNGs are basically just a (incredibly long) sequence of random looking numbers, given the same internal state asking for 100 numbers will always give you the same 100 numbers. But if you put in an extra request for a number it throws everything off by 1. You would get the values 1-100 instead of 0-99. So if the predictability of the value is important to your game you have to be careful about how you change the order and number of random number requests you make.

    Creating an array of random numbers ( referred to as a permutation table ) can help. The coherent noise methods ( classic2d, etc. ) use a permutation table of the values 0 to 255 in a random order (see Fisher-Yates shuffle).

    value = table.get(x % 256) + (y % 256) value = table.get(value % 256) + (z % 256) value = table.get(value % 256) return value

    For anyone not familiar the % sign is the modulo operator, it keeps the value between 0 and 255 in this situation.

    8 % 256 = 8

    256 % 256 = 0

    300 % 256 = 44

    514 % 256 = 2

    An alternative is to reset the state of the PRNG to it's initial value before each batch using

    AdvancedRandom.SetSeed(AdvancedRandom.Seed)

    That is quite slow, so try and not use it on your hotpath. It involves hashing the seed, regenerating the PRNG state and recreating the permutation tables. If enough people need that I would consider adding an action that specifically resets the state, but faster than the above method.

  • The version of the Android Emulator you are using doesn't support webGL or webassembly. This is an issue with the Emulator not the runtime, all modern Android devices support those features.

    When possible we always recommend developers use a physical device for testing, for exactly these reasons.

    I've been doing some background testing around this, it looks like there is some progress on this but I'm not sure when we will see it working. There is a issue you can track at https://issuetracker.google.com/issues/37129533

    In the latest version of the emulator it supports webGL version 2 but not 1. Unfortunately we're only using webGL 1 on Android because of webGL 2 being very buggy on Samsung devices, so we need webGL 1 support. It apparently supports webassembly but I haven't tested this. When running webGL 2 it appears to fail after a few frames. It claims to have no performance caveat, but then chromium prints to the log that it does have a performance caveat and is running using a software renderer. So all in all it's a bit of a mess.

  • Hi it sounds like the data editor is experiencing some issues opening that array, and is attempting to fallback to the text editor.

    Could you file a bug report for me with a project that reproduces the issue?

  • This might be a bit more practical than your looking for, but it's one of the less dry programming books I've read

    http://gameprogrammingpatterns.com/

    You can buy a copy as a physical/electronic book or use the free web version. It's loosely based on a ( very dry ) book called "Design Patterns: Elements of Reusable Object-Oriented Software". Each chapter covers a common pattern that can be applied to game programming. While it includes example code it is also very well described, often with nice hand drawn diagrams. So you can pretty much ignore the code if your not versed in Java and just focus on the ideas.

    After reading the chapter on interpreters I was able to create a simple programming language and runtime just based on the books explanation ( not copying code from the book ). This spun off into 2 years of side projects on programming language theory. So it was somewhat of a revelatory book for me.

    You may not discover anything particularly relevant to actually writing games using construct in the book, but I'm sure it will help your understanding of how things generally fit together ( or how they should ). The whole idea behind the original "Design Patterns" book was that pretty much every programming solution can be broken down into a small set of patterns, so once you learn the patterns and how to apply them you can solve most issues.

  • Hey RamblingIndie can you post this on our bug tracker https://github.com/Scirra/Construct-3-bugs/issues and I will help you there.

  • There's a few methods you can do it by. The bare bones approaches involve you using a static hosting provider, these are services where you upload some files and they are just served to anyone visiting the address. You pay something like 10 quid a year for a domain name, and then whatever the provided charges. Some services like AWS only charge you for bandwidth usage, which for a low traffic site can be in the pennies each month.

    If you are less fussed about what domain name you have then you can create a website on GitHub for free using GitHub Pages. The domain name will be something like accountname.github.com but it there's no fees and you get HTTPS on your site ( something kotaku themselves haven't sorted out ).

    As for the content; you can write every HTML file by hand, but this is very time consuming and can distract from the actual content writing. To make it easier you can write it in a language that converts to HTML, I'm quite fond of markdown. It's quite simple, provides basic formatting options ( headers, italic, images, links, etc.) and you can find different themes for it. Also there's quite a few tools for editing and previewing markdown around.

    If you want a more "batteries included" option some companies offer a simple service for creating websites; you pay them a monthly fee, choose a template and then edit your website using their browser based tools ( so no HTML required normally ). I'm constantly seeing wix advertised online, but I've never used it. Wordpress also offer this service I believe.

  • tarek2 the game preview window in C3 shares a process with C3 itself ( at least in the current version of Chrome ) so if you game hits a bug that freezes the preview, or your game is very resource hungry, it will cause the editor to slow down/freeze. I think this is what is referring to.

  • I cringe a bit whenever somebody mentions jQuery...

    Imported the project into C3, removed the jQuery requirement, remapped some functions to the C3 versions and fixed the asset imports so that they work in preview ( probably not in cordova though ).

    https://www.dropbox.com/s/u5kdslb7cpv52hw/3D%20Hacks.c3p?dl=0

    I presume the example is using the runtimes webGL context, rendering to a framebuffer and then somehow hacking it into the runtimes rendering code? You could probably work this into a plugin, which would be a bit less hacky.

    It's cool, but probably brittle. AYou shouldn't really be using internal APIs, they are likely to change. Still fun to play around with though.

  • hypnorabbit

    Take a look at the demonoire demo, it uses 2 separate tile maps. One invisible one for collisions and another without collisions for the background. It's quite a flexible technique, if a little time consuming. But at least you can use flood fill etc. on large blocks. It's also easier if you put them on separate layers, to make selection easier.

  • The iframe plugin is only available in the new C3 runtime. Projects imported from C2 use the C2 runtime by default. With the latest stable release ( r131 ) of C3 new projects will use the C3 runtime by default which is why you are seeing it with a fresh project but not the one imported from C2.

    Check out our blog post on what the new runtime is, and how to switch to it here https://www.construct.net/en/blogs/construct-official-blog-1/launching-the-new-construct-3-runtime-1048