AdamD's Forum Posts

  • 7 posts
  • Thanks for the comments and feedback everyone.

    I've put up the source code for the LightingTest, there are some changes that address some of the criticism. Apologies for the complexity (it isn't a simple approach), maths is not one of my strengths and I had to fumble through it a bit. You can download it from: adamduncan.com/LightingTest/source.zip

    I've only just discovered that R0J0hound made an example of cast shadows and posted it in the following thread: scirra.com/forum/dynamic-shadows-now-possible_topic56174.html. I recommend looking at it if you're interested in drawing cast shadows in this way (using the canvas plugin). It turns out R0J0hound does it much better than me and I feel like a bit of an idiot now that I've seen it. What I wanted to achieve was a bit more complex and I'm glad that I've solved the problem on my own though.

  • Hey, I've played through the game a bit more thoroughly now, it's really cool. I agree with some of what has already been said in the thread but I'll reiterate.

    I like the feel of the game as a whole, the environment and enemy designs are great, the different waves are interesting and it is fun and fast paced. I do agree that the weapon randomisation is a bit frustrating but I also understand your design dilemma. Typically this would just be resolved by having a weapon for a limited time (e.g. ammo or just timer limited), it's always worth experimenting with different approaches though.

    I don't mind the bouncing projectiles, they seem to fit with the quirkiness quite well. However, what I'd like to see is a bit more feedback as they seem to bounce harmlessly off of enemies. I think it would help the feel of the game if you seemed to be harming your enemies, there isn't really that sense of feedback/reward when you take down a big enemy.

    The controls feel good to me (I had no trouble navigating the world), and it's an individual and interesting take on a classic genre. With a touch more feedback it could feel really satisfying to wade through the weird and wonderful enemies. Good work.

  • I've put the .capx file for the flashlight demo online so that you guys can take a look at it. It is at: adamduncan.com/Flashlight/source.zip

    You'll need to add R0J0hound's excellent canvas plugin to run the examples: scirra.com/forum/plugin-canvas_topic46006.html

    I'll put the lighting test source code up soon too, I just want to see if I can fix a couple of issues with it.

  • Thanks for all of the comments and feedback guys. Sorry it has taken me a while to respond, as SecondDimension mentioned, I've been away and without internet access for a few days.

    robin Sommer - I've been toying with the idea of a light based game but don't have any plans as of yet.

    sqiddster - This isn't a shader (that would probably be a more efficient way of doing it), I'm just using some maths and the canvas plugin. I should've mentioned the canvas plugin in the original post as it is brilliant.

    Venivididormi - I plan to post the .capx at some point (once I've cleaned it up a bit). It is math/loop heavy, I'm sure there is probably an easier way to do it but basically I project out the polygon away from the light source and draw it using the canvas plugin.

    Sylvain - Will do, once I've cleaned it up a bit.

    lemo - Thanks for the feedback. You're correct, the effect is highly exaggerated but perhaps I can explain my decisions. Firstly, shadows become exponentially bigger as the object casting the shadow gets closer to the light source. I've just exaggerated the effect because in the final version there will be fall off from the light which will blend with the shadow being cast (i.e. outside of the range of the light you won't be able to see the shadow). In the case of overlapping shadows, it is a problem as you note which is due to a glitch caused by multiple light sources. With multiple light sources you do get an overlapping shadow effect, see some examples: tinyurl.com/cd6o7yw and tinyurl.com/cqs7g8u. Although you can't see it, there are multiple light sources, close to each other, to create a soft shadow effect. I was just trying the effect out and need to fix it to get it to look right.

    AnD4D - Thanks for the comments. In response to your question in the other thread, I use a lot of sub-events, local variables and functions in the files. So I spread the effect out over quite a few events. If I were to compress it down then I think that the flashlight would be around 30ish events and the lightingTest would be about 60-70.

    spongehammer - Yes, there are actually multiple light sources all close together in the LightingTest example, I was playing around with creating a soft shadow effect.

    - As I mentioned above, I'll post the .capx files as soon as I've cleaned them up a bit. They require the canvas plugin to be installed.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • This is really cool. I've just posted my experiments in lighting with C2 here: scirra.com/FORUM/topic67369.html. Apologies if that just shows the URL and not a link you can click, I have BBcodes enabled but it doesn't seem to be working for me (no idea what I'm doing wrong as it previews perfectly).

    I'm very impressed that you're doing the effect in just 7 events, I'm obviously doing it the hard way as mine are a lot more than that. Good work <img src="smileys/smiley1.gif" border="0" align="middle" />

  • I used the 'insert hyperlink' option for the post above, for some reason it didn't work and just posted the full url. Sorry about that, it also seems to have deleted the sentence with the second example in. Obviously I'm doing something completely wrong (I don't post on forums much). I'll try to post the flashlight example here: adamduncan.com/Flashlight.

  • Hi there,

    I'm new to C2 and have been playing around with it a bit over the last couple of months. I've created a couple of dynamic lighting/shadow casting tests with it that I wanted to share.

    <img src="http://www.adamduncan.com/LightingTest/screen.jpg" border="0" />

    The first is a shadow casting example (looks and runs best with a WebGL enabled browser), drag the circle at the centre of the light around to see the effect: adamduncan.com/LightingTest.

    The first demo is pretty processor intensive (ideally needs to be run in Firefox or Chrome to see the effect at its best) and neither example has be optimised or anything. I was just playing around to practice with C2.

    Any feedback is welcome.

    Edit: the .capx file for the flashlight demo is at: adamduncan.com/Flashlight/source.zip

    Edit: the .capx file for the lighting test is at: adamduncan.com/LightingTest/source.zip

    Apologies for the complexity of it. I've since discovered a good example done by R0J0hound in this thread: scirra.com/forum/dynamic-shadows-now-possible_topic56174.html. I recommend looking at it as it is much cleaner and nicer than mine (didn't see it until after I'd done my examples).

    Also, many thanks to R0J0hound for creating the canvas plugin that made these examples possible. To run the .capx files you'll need to download it from: scirra.com/forum/plugin-canvas_topic46006.html

  • 7 posts