Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - tristonhopkins

Pages: 1 2 3 4 5
I'm trying to understand how to implement your advice but I can't figure out how to get it to not add the distance to every light source.  I only want them added to the total if the player is within their radius.  I'm also trying to add in such a way that the center of a light source equals 256, for example, and the edge of the radius of the light source equals 0.  Outside of a light source should always equal 0.  I'm rattling my brain trying to figure out how to get it to work right.

Not sure if it'll be of any help but here's an attempt at showing what I'm talking about.  The area in the middle of the lights, since they're overlapping, should be added together.  At least, when the player is within that area, of course.

So for my current project, shadows and light are a huge gameplay aspect.  I need to be able to detect when the player is in an area that is lit up (a radial area defines the light source, so a radial area would work best for detection as well) and some of the lighted areas overlap.

I'm trying to use distance to the center of the light source to define the "light value", because the farther from the center of the light source, the darker the light is.  When the player is within two areas that overlap, I need it to calculate the distance within both areas, again, the light value, and then put that into one number that I can use to determine how visible the player is.

I tried using the basic [absolute value of [(Actor1 X - Actor2 X) ^ 2]] + [absolute value of [(Actor1 Y - Actor2 Y)] ^ 2]] for each light source and then adding them into a game attribute, but the number just continually increases, and I would like to be able to define the detected area the same way I use the draw circle block for the light source (ie: a radius of 32 would be the same in both)

I really hope I'm making some sense, and if not, please let me know where I need to elaborate.  Thanks! :)

Archives / Re: Isometrics for iOS
« on: October 08, 2012, 01:22:44 am »
This isn't really feedback towards Stencyl.  You'd likely have better luck finding help in either the Developer Exchange or Resources board.  Also, if you're feeling adventurous, I'm sure you could adapt the current Flash kits for iOS!

Ask a Question / Re: Blend modes?
« on: October 03, 2012, 07:59:00 pm »
I've done something similar on a project in the current version of Stencyl, in design mode, by using the draw blocks to draw the shapes that represent the light sources, on top of a drawn box that represents "darkness", and applying blend modes (specifically overlay) and opacity changes to the drawn shape.  It's not perfect, but it works.  And it supports multiple light sources.  And it's better than making a large scene sized actor with a transparent hole in the middle. :P

I want to eventually manipulate box2D in code mode to take the collision shapes of objects and tiles from the scene editor and use them for shadow casting, but it's currently a bit over my head.. @_@

And then I have to figure out how to determine when specific objects are in the shadows or in the lit areas.  I really need to figure out how to manipulate box2D without writing solely in code mode.

Windows / Mac / Flash / HTML5 / Re: Dwarf Miner [WIP] [On Temporary Hiatus]
« on: September 27, 2012, 04:44:21 am »
Also I'm developing this one from scratch with mobile platforms in mind.  I can't afford iOS Pro or an Apple Developer license currently but I hope that if this other project ever is finished that it makes it's way onto mobile.  That would be my goal for Dwarf Miner as well, but I kind of detest platformers on touch devices. :/  I'd have to get it to work just right, else it'd be a waste of time porting it.

Windows / Mac / Flash / HTML5 / Re: Dwarf Miner [WIP] [On Temporary Hiatus]
« on: September 27, 2012, 04:32:52 am »
Ooh, that looks sweet. Like, a dwarven Oregon Trail?
Bingo.  :D

Windows / Mac / Flash / HTML5 / Re: Dwarf Miner [WIP]
« on: September 27, 2012, 01:47:34 am »
Just popping by to let everyone know I'm not dead.  However, as some may have suspected, Dwarf Miner is on a temporary hiatus.  I'm going to try to work on it again once Stencyl 3.0 comes out.  I started development on it when I was extremely new to Stencyl, and there are some things under the hood that I'm not happy with.  I'm considering starting the whole thing over from scratch with a clearer idea of what the game will be in mind.  Anyways, don't forget about Dwarf Miner just yet.  It's a pet project of mine that I definitely aim to finish.

While I haven't worked in Stencyl in a couple of months, the most recent thing I've done with Stencyl was starting work on yet another dwarven themed game.  It's simpler than Dwarf Miner in some ways and more complex in others. For those interested I've included a screenshot!

Windows / Mac / Flash / HTML5 / Re: Dwarf Miner [WIP]
« on: June 04, 2012, 05:41:15 am »
Dwarf Miner is a nominee in Kyattaro Games' Bundle-in-a-Box Indie Dev Grant!
You can learn more about Bundle-in-a-Box and the Indie Dev Grant at!

If you'd like to vote for Dwarf Miner, you can do so at

Thanks!  :)

I found a work-around, but I don't like it.  If any actors were inside a folder with a custom icon assigned to it, the error was occurring.  As soon as I moved the actors outside and deleted the folders with custom icons, it worked just fine.

It also appears that when selecting actor type, the folder view on the left hand side of the menu is useless.  All actors are lumped into one long list, and selecting a specific folder does nothing.

When I try to set an actor type, the pop-up menu to choose an actor type doesn't show up, and this java error shows up in my logs in reference to it.

java.lang.IllegalArgumentException: newSize must be lower than the image height
   at stencyl.sw.util.gfx.GraphicsUtilities.createThumbnail(
   at stencyl.sw.editors.snippet.vars.ActorChooser.<init>(
   at stencyl.sw.editors.snippet.vars.EditVariablePane.chooseType(
   at stencyl.sw.editors.snippet.vars.EditVariablePane.access$800(
   at stencyl.sw.editors.snippet.vars.EditVariablePane$8.actionPerformed(
   at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
   at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
   at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
   at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
   at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
   at java.awt.Component.processMouseEvent(Unknown Source)
   at javax.swing.JComponent.processMouseEvent(Unknown Source)
   at java.awt.Component.processEvent(Unknown Source)
   at java.awt.Container.processEvent(Unknown Source)
   at java.awt.Component.dispatchEventImpl(Unknown Source)
   at java.awt.Container.dispatchEventImpl(Unknown Source)
   at java.awt.Component.dispatchEvent(Unknown Source)
   at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
   at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
   at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
   at java.awt.Container.dispatchEventImpl(Unknown Source)
   at java.awt.Window.dispatchEventImpl(Unknown Source)
   at java.awt.Component.dispatchEvent(Unknown Source)
   at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
   at java.awt.EventQueue.access$000(Unknown Source)
   at java.awt.EventQueue$ Source)
   at java.awt.EventQueue$ Source)
   at Method)
   at$1.doIntersectionPrivilege(Unknown Source)
   at$1.doIntersectionPrivilege(Unknown Source)
   at java.awt.EventQueue$ Source)
   at java.awt.EventQueue$ Source)
   at Method)
   at$1.doIntersectionPrivilege(Unknown Source)
   at java.awt.EventQueue.dispatchEvent(Unknown Source)
   at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
   at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
   at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
   at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
   at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
   at Source)

It does not matter what behavior this occurs in, and only happens in one Stencyl game project.

Resolved Questions / Re: Perlin Noise Random Terrain Generation
« on: May 09, 2012, 02:34:49 pm »
Awesome work there! What's the final scene size in tiles that is being generated? That looks like more than the original 40 that you had.
Thanks!  I actually increased it to 120x120.

Resolved Questions / Re: Perlin Noise Random Terrain Generation
« on: May 08, 2012, 10:12:45 pm »
Color me impressed!

I'm glad I could help you with the array business. ;)

Haha, yes, thank you very much for your help!  You definitely set me down the right path.

I'm a bit proud of a new feature I've implemented on my local version.  Now it rejects maps if they don't fit certain criteria.  It needs some expanding upon, but it works. :D

Resolved Questions / Re: Perlin Noise Random Terrain Generation
« on: May 08, 2012, 06:37:02 pm »
And now for the fruit of my labor!  I finally have it working. :D

Resolved Questions / Re: Perlin Noise Random Terrain Generation
« on: May 08, 2012, 03:55:12 pm »
I think there is a HexToRGB method somewhere if you'd rather work with 0-255 values or something.

That honestly might be a bit easier.

Resolved Questions / Re: Perlin Noise Random Terrain Generation
« on: May 08, 2012, 03:37:20 pm »
Well when my behavior checks each x,y in my 2D array, it's passed a hexidecimal color code.  For example, everytime it's passed a hexidecimal greater than #999999, it will draw a grass tile.  Anything less, a water tile.  I have the behavior for it checking each hex in the array working just fine.  I just need to fix the part in the behavior where it draws tiles so that it can interpret the entire hex range of colors.

Pages: 1 2 3 4 5