nusbaumc's Forum Posts

  • Me too, got about a dozen over the last 2 days.

    Unsubscribed from promotional e-mails, will see if that helps.

  • Things I would like to see, or if they're already implemented, things I would like to know how to do!

    1) Shared layers. They would be like event sheets where you can define a layer (and what's on it) once and then put it as many layouts as you want. This would be enormously useful for things like game menus or other common overlays.

    2) True inheritance. Families are good start, but we can't make subfamilies.

    3) Support for some common UI elements (scroll bars, dialog boxes, etc), outside of clunky javascript calls that aren't customizable and don't integrate well with the project.

    4) Support for vector-based sprites such as lines, splines, circles, etc.

  • Hello!

    For the game my collaborator and I are considering I want to use tilemaps, but there's a background layer that doesn't clip, a same-z-order layer that does clip, and a foreground layer that doesn't clip. I know I need to use 3 tilemap objects but I want them all to use the same image in such a way that it doesn't use three times as much memory.

    If this isn't possible then the layers won't be able to share tiles (or at least can only do so minimally) and this will make our game not look as good.

    Thanks!

  • Wow very good Dragon generator!, one thing that image loading 50 images of 1500 scares me, can't create something to just show the %? and also an image showing something while loading?

    Very good music in dragon blaster by the way

    Thanks

    I updated the background loader to use a progress bar and not show the total number of images. It also auto-hides after a few seconds after loading is complete. I hope this is less scary

  • http://www.dragonflame.us/cad.php

    A 3-month collaboration between myself and Cryofaze of DeviantArt. You can make your own dragons, save them, export them, share them with your friends <img src="{SMILIES_PATH}/icon_e_smile.gif" alt=":)" title="Smile">. Keeping the memory footprint to a minimum while using over 1500 different dragon parts and an approach based on stacked 600x600 pixel layers turned out to be the hardest technical challenge, which I addressed using an external preloader and fetching images from the server instead of building everything into the project.

    This is our second Construct 2 collaboration (http://www.dragonflame.us/dragon_blaster.php being the first). I think we'll try a real game next, though it may be a few months.

  • I have a directory that I put all my Construct 2 PHP in. It has this in its .htaccess file and it works just fine.

    <IfModule mod_headers.c>

    Header set Access-Control-Allow-Origin "*"

    </IfModule>

  • You don't load an image from an Ajax request, you just get the URL. You can use standard URL encoding to pass any parameters you need to to the server.

    I doubt your third-party is going to let you run XSS anytime ever so as a workaround you can have them fetch the image from your server via a PHP script that gets it from the other server. It may lag a bit more than usual but it should work.

  • So, from what I understand, everything on a layout is loaded when the layout is. A project I'm considering would use semi-random levels and the way I was considering doing it was having one (or a few, one for every tile set) layouts that would dynamically configure themselves. Obviously I don't want a bunch of sprites loaded that aren't being used, so I was thinking of putting all these sprites in a separate layout and then instantiating them when needed.

    Would this work how I think it will? Thanks!

  • I made a boss for our Dragon Blaster demo (http://www.dragonflame.us/dragon_blaster.php - press Y 3 times to skip to the boss and again to cycle powerups) that has a number of scripted attacks. I'm at work right now so I can't go into a huge amount of detail, but the way I did it was that I gave him a bunch of instance variables so he could keep track of his current state. One of them was his current attack, and on every frame that would activate a specific segment of event script that would execute that action.

    To expedite this I gave him a couple of generic abilities, the first being simply to shoot at the player if a particular instance variable was set and the second being to go to a specific screen coordinate and then set the current action variable to a given value when the boss reached the destination. So that way I could set up things like "Go to the middle of the screen and then move XXX" where XXX is next event in the chain.

    Every move would terminate by setting the current move variable back to an idle state. The only thing that move did was select another move at random from the current list (he has different moves in his two phases), making sure that that move wasn't the same as the move he just did so he never does the same thing back to back.

  • I haven't tried anything like this yet, but you should be able to use the Browser object to execute Javascript to draw directly on the Canvas. I think this the only easy way to do any graphics that aren't strictly sprite-based.

  • Have you tried enabling cross-site scripting in the directory you are trying to pull images from? You can do it in .htaccess with

    Header add Access-Control-Allow-Origin "*"

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • How IP works online, de jure

    The first-sale doctrine does not apply to purely digital goods. Licences are always non-transferrable unless you know for sure otherwise.

    How IP works online, de facto

    The only way to own anything digital is to make it yourself or steal it. I don't condone the second route, we've come a long way since the bad old days of the 90s.

  • I ran into this problem recently myself.. had my project up to 750 MB. It builds up a complex, but static, image using really big (600x600) stacked layers, each with one sprite on it.

    What I did was instead of having every possible image be a different animation, and thus always be loaded into video memory, each part of the image had 1 frame that was loaded from the server (via Load Image from URL) when needed. I wrote a preloader (actually, a PHP script that generates a preloader, but I digress...) that I plugged into the index.html that Construct 2 generates when you export your project and now it still works just fine but only uses 35 MB of video memory.

    So.. the moral I guess is if you're using too much memory there's ways you can work around it. Most laptops and desktops won't really care until you get up over 500 MB. I haven't done anything for mobile yet but I know they have a lot less RAM in general.. you need to think about memory management from the beginning.

  • I don't use the built-in behaviors, so this is how I would do it.

    One way to write the wave equation is:

    D(x,t) = A sin(kx - wt + [theta])

    where w = 2(pi)f

    D is the displacement from the center, k is the spring constant, x is the x position on the wave, w is [2*pi*f], f is the frequency, t is the time, and theta is the phase angle.

    Since we're only concerned with one spot on the wave and not the entire thing we can let theta be zero and x be pi/2 (the maximum of a sin wave). However, if you had multiple objects you wanted to randomly wave together but not in perfect sync the easiest way to accomplish this would be by playing with the phase angle.

    Now, for the behavior you asked for, I think the easiest approach would be to vary the spring constant k and not the time t. All you would need to do is solve the wave equation on every frame (remember to use a proper delta-time value and calculate the current time rather than just counting frames) and move your object to whatever displacement you come up with. When you want to change how fast it's moving you can change the spring constant k value (which isn't so constant in this case....) and it'll start moving at the new speed on its own.

  • I have some radio-style buttons in my current project. The absolute easiest way is, in psuedo-code

    function onButtonClick

    • all buttons Set unchecked

    button0 -> onClick

    • Function.Call("onButtonClick")
    • button0 set checked
    • radio variable - set 0

    button1 -> onClick

    • Function.Call("onButtonClick")
    • button1 set checked
    • radio variable - set 1

    etc