gamepopper's Recent Forum Activity

  • Hey, not sure if this has already been mentioned. But found a bug.

    Game freezes if you try to save a game state with a canvas object. You can avoid it by adding a "No Save" Behaviour to the canvas object.

  • I have a game that have an effect object that I use, and no matter how much I reduce the amount of checks and loops needed for it to run, it'll run fine on a Desktop PC with a reasonably sized CPU and a good GPU, but runs slow on an ultrabook with less than 2 GHz processor and a moderate GPU. I also have this issue if I have a WebGL enabled project with a few WebGL effects where it runs fine on the same desktop, but runs at less than 30 fps on the same ultrabook.

    However, if I disable WebGL for the game, it runs smoothly on both machines. While it makes the effect object unusable (so I have it disabled), but I want this game to run on as many PCs as possible. The problem is that there is no action to disable WebGL.

    I can understand why that isn't possible mid-game, so is there any way I can choose whether or not to Enable WebGL when I boot up the game, or at least a way to disable all effects, regardless of where they are?

  • Hey, do you think you know a way to make whatever you draw in a canvas object an alpha mask? So instead of primitive shapes both it and anything overlapped by it are fully transparent?

  • It's usually referred to as "shadow casting". There are a number of examples on the forums if you search.

    Heres one. http://www.scirra.com/forum/capx-yet-another-shadow-caster_topic75045.html

    Thanks for the link, while it's good, I don't want to cast shadows, I just want to block out the light, I also want it to only to only show light from within the cone of view.

    At least now I have a way of drawing primitives thanks to the Canvas Plugin now. <img src="smileys/smiley1.gif" border="0" align="middle">

  • I've tried making a 2D forloop, but doing a 2D for loop for over a million elements doesn't appear to be a good idea. :/

    <img src="https://dl.dropboxusercontent.com/u/30381754/2D%20Forloop.png" border="0" />

  • What I want is to have a cone (or triangle) will draw wherever the Line of Sight is facing, not just that but also change shape depending on if it's being blocked by a solid object or something.

    Something similar to this:

    <img src="http://img14.imageshack.us/img14/1595/after.png" border="0">

    So far I've used a graphic for the job, which works except when there is a wall that's only one tile wide:

    <img src="https://dl.dropboxusercontent.com/u/30381754/LineofSight.png" border="0">

    I was thinking that it could be done with primitives, or going through the viewport position in a for loop and drawing a pixel if in line of sight, but neither appear to be included into Construct2 for some reason.

    Any ideas?

  • That fixed worked for me as well! Thank you. I had a panic attack when my controls suddenly stopped working.

  • It would depend on the date. If it was a weekend meetup I can easily go. I could go on weekdays, but with my placement it means I'd be stretched for time. :/

  • also don't you just wish you could know the guy(s) who programed zergling AI to help us out:P?

    HAHA that would help. The annoying this is that I've had this problem with XNA, but I was able to solve it easily because I could access individual instances for calculations, for example:

    if (gameobject[x].isOverlapping(gameobject[y]) && x != y)

    {

       gameobject[x].X = gameobject[y].X + ((gameobject[x].width/2 + gameobject[y].width/2) * sin(angleBetween(gameobject[x], gameobject[y]));

       gameobject[x].Y = gameobject[y].Y + ((gameobject[x].height/2 + gameobject[y].height/2) * cos(angleBetween(gameobject[x], gameobject[y]));

    }

    This isn't the exact code I used, but it's very similar to what I had.

  • spongehammer Sargas

    While the RTS method works, I'm working on a game that doesn't have the objects close in formation. The objects go towards a player, so if they are far away, they won't go near the player because they stay in formation.

    cvp

    I never realised you can pick out instances like that. I got a method that kinda sorta works like this:

    +Sprite1: On collision with Sprite1

       +System: Pick Sprite1 instance 0

          Move Forward 5 pixels

       +System: Pick Sprite1 instance 1

          Move Forward -5 pixels

    Everynow and then they go over each other but most of the time they don't.

    Sargas Your method does a good job, although I noticed some times the objects struggling to move when bunched together. :/

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Also trying the "On Collision" Trigger, it just stops both of the instances. Having them stop or even bounce back a few pixels would be great, but I cannot seem to access specific instances if I'm testing collisions of two of the exact same instances. :/

  • Well experimenting with the physics behaviour does stop them from overlapping, but they slide all over the place, not to mention it would mean applying physics to all the walls as well. :/

gamepopper's avatar

gamepopper

Member since 6 Feb, 2013

None one is following gamepopper yet!

Connect with gamepopper

Trophy Case

  • 11-Year Club
  • Email Verified

Progress

12/44
How to earn trophies