Ashley's Forum Posts

  • Woops, fixed those icons...

    XAudio2 is coming along nicely, and should be implemented in the next 0.98 build, but that might be a while away yet.

  • What's wrong with the screenshot you posted? I don't know what it's meant to look like, so maybe some comparisons?

    You could also try just using unbounded scrolling and setting your own limits manually (eg. ScrollX < 0: scroll to X = 0 etc). That might be a bit easier to set up.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • What's this about multi-monitor support? you think you'll keep trying to make it work? I use 2 monitors so this would be incredibly cool.

    What sort of thing was it? like layout editor on one screen and events on the other?

    No, for the runtime. If you have multiple monitors you can already take advantage by snapping out the project/layers/animator/resource bars and leave them floating on another screen. You could do the same with the properties bar, but for convenience you probably want to leave it docked.

    Runtime multiple monitor support would theoretically mean you can go to fullscreen mode on both monitors and show different parts of the same layout, eg. map on right monitor, gameplay on left. Or, simpler, just duplicate the same view on both screens so you don't have a garbled desktop on the other one. The documentation for DirectX multiple monitors is so-so though, and after a lot of tweaking, I just couldn't get the existing rendering code to work with multiple monitors.

    By the way, can someone confirm redownloading 0.97.5 fixes the startup errors?

  • Download 0.97.5 again now - it should fix this.

  • OK folks, download it again if you have already and it should fix the 3D box and Template errors. Delete Template.csx from Plugins\ and Plugins\Runtime if you're installing over the old folder, it's an unused and broken plugin.

  • I can't reproduce any of the bugs in 0.97.5...

  • Try deleting sections of your events (after a backup!) and finding what the culprit is. Is it still the for-each events? If so, how many of them are there and what do they look like?

  • Ah, I think 3D box is relying on the latest D3DX perhaps - if you've been cancelling away the DirectX 9 updater in the installer, try letting it run this time - it should fix 3D box. I'll put up an update which doesn't require this soon, but in the mean time that should fix it.

  • If you resize the window, DirectX has a hard-coded linear-filtered stretch it does. I don't know why they designed it like that but you can't change it as far as I know. I would recommend Deadeye's solution with Unbounded scrolling: zoom in the display 2x with point sampling. With unbounded scrolling you might be able to go running off the side of the screen, so make sure you add your own scroll boundaries (a wall the player can't run past for example).

  • You won't use either of these in a 2D game, so you can continue to use Construct like normal. I'm going to release an update soon that should fix it...

  • This .cap may not act like you want but it is not a bug. The 'Destroy' action simply sets a flag and continues to work exactly like normal. At the end of the event list, objects marked 'destroyed' are then really destroyed. It has to work like this unfortunately - the runtime needs to know that objects exist until one point. It also needs to be like this to give plugins a chance to remove references to the object that is being destroyed - otherwise these plugins would crash and there would be no way to fix it!

  • You can't have multiple instances of the same object in a container - but you could do that if they're all different object types.

    As faggatron said, you should be able to do it with a single for-each: the 'Turret UID = Ship UID' condition has an internal for-each - it will test every turret and pick the ones whose UID is equal to the current Ship's UID. Conditions like this are much faster than using another for-each condition, though (it's optimised C++ code instead of a condition doing the iteration).

  • Bleh, I'll try and sort out 3D box and re-upload it... 'Template' shouldnt even be there, left it by accident

  • Download 0.97.5 now

    A fairly small update - a lot of us have been busy. I spent a while trying to get some multi-monitor support as well, but I just couldn't get it working...

    Directsound is deprecated in this build and will be replaced as soon as possible with the XAudio2 plugin, since Directsound is not properly supported on Vista. You will have to recode all your audio events for the new plugin. Inserting Directsound or opening an existing .cap with Directsound will prompt a warning.

    Full changelog:

    General

    • [ADD] 'Is group enabled' system condition
    • [FIX] Crash closing projects
    • [FIX] 'Get object count' system expression inserted the expression "ObjectCount" which was invalid. The correct expression is "TotalObjects"; this has now been corrected.
    • [FIX] '&' can now be used in comments
    • [CHANGE] Layer parameters in system ACEs re-titled to "Layer name or number" to clarify that you can refer to layers by their names as well as numbers.

    Plugins

    • [FIX] 3D Box issue
    • [FIX] Crash setting mesh distortion on Sprites
    • [CHANGE] Sprite mesh distortion 'set displacement at': opacity is a value 0-100 like the rest of Construct; was previously 0-1, multiply your current value by 100 to correct your opacity values
    • [CHANGE] Sprite mesh distortion 'set displacement at': x, y, u and v displacement were using texture coordinates, which was not a useful way to use mesh distortion. These have now changed to take a value in pixels. Old applications using mesh distort need to multiply these values by the object width for X and the object height for Y in order to restore the same functionality as before.

    Runtime

    • [ADD] Debugger: warning when referencing nonexistant layers or event groups in system ACEs. Should pick up any errors caused by typos.
    • [FIX] Crash with incomplete containers in layout editor and one of the missing objects had a behavior
    • [FIX] ScrollXLeft, ScrollXRight, ScrollYTop, ScrollYBottom gave wrong values when passed a layer parameter
    • [FIX] Debugger: warnings sent on start of layout are now shown correctly
    • [FIX] Debugger: window moves to upper left of screen instead of sitting on top of the runtime window
    • [FIX] Behaviors + mouse & keyboard object input no longer responds when window has not got focus
    • [FIX] Crash using load/quickload when the save was on a different layout
  • - Alot of my variables go into an unnecessary amount of floating point digits (i only really need it to 2 decimal places or maybe even 1) Is there a way to set variables to have a maximum amount of DPs?

    This will have no impact on performance at all. The floats are always calculated to the same precision, but to display fewer decimal places, use the FormatDecimal system expression.

    [quote:1gux5b5x]- Alot of For eachs.. In some events i have for each object "Ship" for each object "turret" in the same condition. I found this is the only way for it to work... Does this sound inefficient?

    Yes - nested loops can be very CPU intensive. If you have 600 Ships and 600 Turrets and you do:

    + For Each Ship

    + For Each Turret

    -> Actions

    You are requiring that the actions are run 600 x 600 times, which is 360,000 times (over a third of a million). Repeat this a few times and you're asking the CPU to run millions of iterations!

    Only do loops like that if it is absolutely necessary. What are you doing that requires that code? Often, there are much more efficient solutions.

    [quote:1gux5b5x]- How do you use the profiler? Could that help me?

    The profiler object can be used to time regions of events. All you need to do is call the Begin action, run some events, call End, then the Get Seconds expression returns the number of seconds spent on that code.