drmidnight's Forum Posts

  • well my game is a "catch stuff as they fall" game and there are other stars too so I'm setting it up where I ad one to streak everytime you catch a 1 pt star but its reset to zero on other stars and space junk.

    Edit: IT WORKED!!!!!

    Now I just want to ask how can I give ten bonus points for every ten one point stars that are caught.

    Basically the same way. Just create a variable that is increased by 1 every time a star with a value of 1 is caught, then when that variable = 10 give them 10 bonus points and reset it.

  • Well, physics collisions are accurate. The problem is with the normal collision/overlaping check. What would be nice is to have physics objects as detectors/triggers. That way we would have accurate detections either upon collisions, or while overlaps.

    I am not sure what is the purpose in your gameplay, if you are trying to simulate penetration damage. I did some checks and came up with a basic capx that does detect all collisions, perhaps it will be of some use to you. Perhaps not. Here it is never the less

    Thanks for the example, but this is similar to what I was already doing. The problem is if you increase the impulse or make the board any thinner it will start to miss collisions.

    I ended up settling for an invisible cage around small objects that is much larger than the object itself, and then getting the distance and moving the impact point to the object. It works fine for what I wanted to do.

    There isn't really any gameplay purpose, just a prototype for ballistic behaviour that I wanted to mess around with. I'm going to put it aside for now and revisit it later after some other ideas.

  • Well look at the math. If an object is going faster than 60 pixels per second, and your solids are smaller than 60 pixels, then there's a high probability it can skip the object.

    You're just not going to get pixel perfect collisions in a javascript engine running v synced at 60 fps.... with crappy garbage collection.

    Makes sense. I guess I could try doing an invisible cage object that is much larger and then offset the impact point.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Something like this?

  • If you are using the bullet behavior, there isn't much you can do. If you are using the physics behavior, perhaps setting the "bullet" property on the bullet sprite might improve things out. Although a quick test I did with the bullet sprite set to fired with an impulse of 1000, worked perfectly, without even having to set the bullet property to "yes". In fact I don't think that the physics behavior allow for that kind of high velocities. 1000 impulse has the same speed as 10000 or 100000000....

    Oh well...

    I have the physics property set to bullet and it still fails to register hits that fall out of the "step" range and increasing the stepping does nothing.

    What is odd is I am only applying an impulse of 0.6......

    I think I might just write a custom behavior to do a trajectory/ delayed hitscan and do away with the bullet all together.

  • Instead of having the score reset when it hits the ground, just create a streak variable( -1 for off 1 for on) and have the cumulative variable reset when the streak variable is off.

    I'm not sure how your game is set up, but when you miss a star just have it set the variable off or just have it reset the cumulative variable. It should be pretty easy to set up from the example I provided.

  • No problem, you could also do a streak variable if you don't have a ground object.

  • Here is a simple example, left click to spawn a dot , arrow keys to move the player.

  • Have a variable that is incremented each time a player catches a star and have it add to your score each catch and reset to 0 when you miss one.

    You could also have an instance variable on the star itself which will increment by 1 each time a new one is spawned if the player is on a streak.

  • I was messing around with a "realistic" bullet penetration prototype and currently the detection of the collisions is less than desirable. Currently it completely bypasses any object smaller than the green box and will sometimes even skip it at its current size.

    It runs fine locally at mostly 60fps, but this is just a messy prototype so don't expect the best performance. Firing too fast seems to wreck the fps in some cases also sounds might repeat or not play etc etc.

    I have tried altering the stepping of the physics object, but this seems to have no effect.

    I saw a posted example of pixel perfect collision detection, but unfortunately the performance was lackluster and used a messy loop that caused the cpu to hit 100% after 50+ shots.

    Not looking for a concrete example, but anyone that can point me in the right direction would be much appreciated.

    Trying not to get too heavily into the math side of things, but I'm thinking custom movement and some trajectory equations might have to happen.

    Test:

    WASD = Move gun around

    R = reload

    X = clear all lines/magazines

    Left click = fire

    B= Enable blood

    https://dl.dropboxusercontent.com/u/14181859/bullet%20Test/index.html

    EDIT: Updated the example to adjust velocity and fixed it so no matter what angle you shoot it should go out the right side.

    Green = less than 50% the original speed

    Yellow = between 90-51% original speed

    Reload your cache or load it in a incognito tab to see changes.

    Still can't get the collision to work right on thin objects, but I am working on another prototype using custom movement and some trajectory formulas.

    Got it to be a little more accurate but not much.

  • If you are looking for simple waypoint movement, check out

  • Fixed a couple issues with my monokai theme I was noticing while using it the other night.

    Save as XML

  • Updated my color theme to the newest beta. Thanks for the improvments to the theme editing Scirra <img src="smileys/smiley32.gif" border="0" align="middle">

    I will be making some adjustments as I work with it since I probably missed a couple things, but it should be good for now.

    Save as XML

  • Are you asking about my theme? What's the issue?

  • Hi, I'm Corey. I used to be a web developer/graphic desinger a couple of years ago and I have always messed around with game development and I thought I would look into HTML5 for a full scope game. I have been using javascript on and off for the past 8 years and in my long search to find a nice engine/framework I came across Construct 2 and loved how quickly you could get ideas down and playable, and also how extensible it can be.

    I tested the free version for about half a year and then finally bought a license when I started to run into limitations. I have been developing a cross-platform game for the past couple months and I have loved every moment of it.

    The documentation is wonderful and the Javascript sdk has allowed me to implement multiple custom plugins, some of which I will release once I have completed my current project. It's crazy how easy it is to throw a prototype together and it really speeds up development. I'll probably never go back to developing purely in Javascript.

    Keep it up Scirra! Looking forward to updates and new features.