digitalsoapbox's Forum Posts

  • >

    > > Is it possible to save 20 snapshots on disk, load them after into a tilemap and so get a snapshot from this and print or save as image?

    > >

    >

    > You could use the Canvas or Paster plugins to composite all of the snapshots and then save the results to a single file.

    >

    It seems promising. Can I find any example about of how to composite images with Canvas or even Paster (though I have never used this plugin)? Do you have one?

    You just need to move each image to a different x/y position and paste into the Canvas/Paster object. They need to be on-screen and visible to paste, so you could write a function to put all required images side by side, then create a Canvas/Paster object and set the size/resolution large enough to cover all of the images, set the viewport to the same size, paste, then save the file.

  • Is it possible to save 20 snapshots on disk, load them after into a tilemap and so get a snapshot from this and print or save as image?

    You could use the Canvas or Paster plugins to composite all of the snapshots and then save the results to a single file.

  • Thanks! It needs a bit more work before anything is ready to release. I'll be working through it on and off for awhile, but I'll post updates here. I want to make the lighting easier to work with and see if there's a way to preview some of the effects in the editor.

  • Pretty sure Edge still doesn't fully support WebRTC, which is what the native Multiplayer plugin uses.

  • A few months ago Ashley made a post on how to handle multiple lights in a single layout (for reference: https://www.scirra.com/tutorials/5005/multiple-colored-shadow-casting-lights)

    This approach may work for some, but I found the method described to be extremely limiting, due to a number of factors:

    • Not all lighting necessarily needs to be realtime, and lights that are just used to set mood would be wasting processing time since they re-render every frame for every light.
    • Dealing with a lot of lights becomes extremely cumbersome as more layers are added.
    • Because of limitations in how C2 handles shaders in WebGL, if a developer wanted soft lights, they would have to apply a blur effect to a LOT of layers, destroying performance.
    • Any visual effects lighting, like the flash of an explosion of a player throws a grenade, would have severe limitations, due to needing to juggle layers, with the number of available layers creating a hard limit on how many lights could be used.
    • If all stages take place in a single layout (eg. loading multiple tilemaps within a single layout for various stages), the layer management issue becomes very convoluted to manage, and has a hard limit on how many lights can appear in any stage - and hard limits are bad.
    • In a production environment where you may be working with a team, it simply isn't an option to expect level designers or artists to have to work in the same program/files as the developer. This is a reality of game development that gets ignored a lot, but that doesn't make it any less true.

    So, with that in mind, I set about creating a way to manage multiple C2-native Shadow Lights on as few layers as possible. There were some issues initially because of a bug in the tilemap collisions, but Ashely has fixed this in r240 beta and I've been able to make some progress:

    Using a simple test layout:

    Which looks like this in the browser without lighting being applied properly because they're all on the same layer:

    And looks like this in the browser with my solution applied. So far, I've ended up using 3 layers for background, foreground and VFX lighting. Static lighting only needs to render once, eliminating any overhead from having to redraw multiple shadows & layers every frame, and dynamic lighting only has to render when it's being interacted with, such as the light moving/rotating or objects that cast shadows overlapping it. VFX lights render for a single tick and then are removed, so they don't really impact performance very much at all:

    Play with the example yourself (arrows move/jump, ctrl/shift shoot and drop grenades respectively):

    https://dl.dropboxusercontent.com/u/14245368/C2/LightingTest/index.html

    It's not quite ready for use in a production environment, and it needs a lot more flexibility to blend well with artwork and provide the kind of features people typically expect from a lighting system, but as a proof of concept created in a few hours it shows what might be possible. It DOES currently involves the use of the Paster plugin, which is unavoidable; rendering to a texture quickly is really a feature that should be native to C2, but somehow it isn't, which seems like a huge oversight, so there's no way to do it without any 3rd-party add-ons at this time. Some of the shaders could also be optimized if there were a way for the shader to sample the screen at a lower resolution, but I haven't been able to get that to work in C2 at all (which seems like a bug in C2).

    I think there's a lot more optimization that can be done, so I'd be curious to hear what kind of performance you're getting if you're on a PC with a slower GPU/integrated graphics.

    The end goal is to create a flexible lighting system that's easy to use. I'll update this post as I tweak things and to flesh out what's going on behind the scenes a bit more.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • >

    > Couldn't hurt to hear what Ashley has to say about this. When I gave it a try a few months ago I had C2 running in a browser on the console just fine.

    >

    You can also enable devmode in any console now and test your game. I think there's a tutorial somewhere in the forums but basically you export is as a Windows 10 UWP app, open it in Visual Studio and send it to the Xbox One.

    I've tested my game and it ran great. It's too bad it's going to take so long for them to add UWP games support...

    Yep, same, but I didn't spend a ton of time w/ it outside of a test on the units I received from MS through the IDsgr@XBox program. Photon multiplayer worked as well.

  • > The question here is who is responsible for compatibility. And since it's Microsoft's platform, that falls on Scirra making their product compatible - though they'd need info from MS on what needs to be done. I think Ashley mentioned something along those lines in this thread awhile back.

    >

    Below is the rest of the conversation from today.

    > Unfortunately Construct2 is not compatible with Xbox One, and to my knowledge there are no plans for compatibility in the near future. You might be able to wait it out until Windows 10 compatibility has been completed, but this also may be a while. So sorry I don’t have better news

    >

    > Thank you for the information. Is it because of the engine itself or just the lack of a plugin to handle xbox live features? Let's say they add plugins with your API to the engine. Would it then be possible to publish using construct 2?

    >

    > Hi,

    >

    > Unfortunately it is the construct 2 engine itself, so there is no workaround. So sorry I don’t have better news!

    >

    Couldn't hurt to hear what Ashley has to say about this. When I gave it a try a few months ago I had C2 running in a browser on the console just fine.

  • [quote:25budiru]Unfortunately Construct2 is not compatible with Xbox One, and to my knowledge there are no plans for compatibility in the near future. You might be able to wait it out until Windows 10 compatibility has been completed, but this also may be a while. So sorry I don’t have better news L

    I got this message today from my Microsoft contact which I've been working with for months. Really disappointing :/

    The question here is who is responsible for compatibility. And since it's Microsoft's platform, that falls on Scirra making their product compatible - though they'd need info from MS on what needs to be done. I think Ashley mentioned something along those lines in this thread awhile back.

  • As I said, I am enrolled in ID@Xbox, and the only problem is the lack of Live support.

    This has been my experience as well in talking with MS. Achievements, Friend's list, etc. support is needed, and I would guess that some information needs to change hands among the right people at MS so it can make it's way to Scirra for that to happen.

  • ThePhotons

    Should On room list/On room list update after changing Master server region? I'm adding in the ability to switch regions after being connected to the nameserver/a master server in my project and neither action seems to be triggering. Is there a way to force those methods to trigger to get an updated room list?

  • Thanks for the update! Good stuff. The changed Conditions/Actions make more sense now.

  • The flickering happens because shadows aren't drawn for tile areas just outside the viewport, which is fixed for the next build.

    The shadows look wrong though because you use multiple shadow light objects, and they only draw shadows, so by default all the shadows get pasted on top of each other. You need to use layering and blend modes to correctly render multiple light sources. See the demo that ships with C2 for an example.

    Damn, I thought I'd removed all but one light. My mistake. Thanks for taking care of the issue with the tiles outside the viewport though, it was preventing a baked lightmap solution to avoid avoid having to use multiple layers for each light from working as planned. Maybe there's a way to toggle whether or not it's drawing for all tiles, in the viewport or not?

  • This is an issue with the browsers/NWJS interacting with Windows hotkeys, not C2.

  • > Would it really? I haven't run across a device made in the last couple of years that doesn't support webgl. Allowing old technology to hold back new technology with a growing user base seems off.

    >

    Ehemmm....Canvas 2D is still supported more places & devices than WebGL than you think. I'll just tell you know, if Ashley does remove canvas2d support then anticipate the entire forum and bug section will be flooded like never before.

    > And who's to say that the new tech can't support things the old tech doesn't?

    >

    Uhmm Ehemm...Stackoverflow.

    > I'm just not following the train of thought that says "we can't do X because that would upset some people, even though not doing X holds everything back and upsets an increasingly larger number of people," but maybe I'm missing something?

    >

    Uhhhmmm.... Ashley is an entrepreneur, he thinks for the majority and as of now canvas2d is still needed by majority.

    As a game developer, i would choose to make a game that is likely to be played by majority of players than those rarely are played by gamers by interest.

    Nobody said anything about removing Canvas2D support. I said it doesn't follow to limit WebGL features because Canvas2D doesn't support them. If people want to use those features, they can use WebGL - which is supported on modern devices worldwide if we're talking about mobile, and if we're talking about desktop, limiting available features to what's available on old mobile hardware makes even less sense. I also pointed out historical precedent - in games - for shifting support from an older technology to a newer one, and how it's been done smoothly in the past (and by competing products). As for what Stackoverflow says - that has nothing to do with anything.

  • This is the kind of thing which is a lot easier to do if we drop canvas2d support, but right now I think that would upset a larger number of people.

    Ashley

    Would it really? I haven't run across a device made in the last couple of years that doesn't support webgl. Allowing old technology to hold back new technology with a growing user base seems off. And who's to say that the new tech can't support things the old tech doesn't? Software & hardware renderers co-existed in games for years until 3D accelerators became the norm, and the hardware renderers had more features than the software renderers without the world ending.

    I'm just not following the train of thought that says "we can't do X because that would upset some people, even though not doing X holds everything back and upsets an increasingly larger number of people," but maybe I'm missing something? If Unity3D argued the same thing - even back when they were a smaller company - it would never have grown into what it's become.