mintPIXEL's Forum Posts

  • Hi guys,

        Im trying to save a bunch of object locations(x,y) to an array but I cant figure it out. Basically I have it set up to have a slot for every object being saved, and its 2 deep., one for x, one for y. But I cant figure out how to send the x,y coordinates to the array for each object? I figure on using the UID of each object(they are all the same object) to determine the slot. Can I do this?

    Thanks

    Adam

  • Hey man, thanks again.

    Its still not pulling off the effect Im looking for. Let me try to explain like this.

    Layer 2 "top" Has a star sprite

    Layer 1 "mid" Has a black tiled background

    Layer 0 "background" Has a picture of clouds.

    What I need is for the star on layer 2 to "punch" a star shaped hole in the "mid" layer that shows through to the "background: layer. So I could have many star sprites that show through to the cloud layer, but keeps the mid background black where there is not a star. Hopefully that makes more sense.

  • maybe the easiest way is to use the Canvas plugin by R0J0hound, and do a simple paste to cut it.

    Cool. I checked it out, and I kind of understand. I can get it to cut it, But how would I have the objects moving? I add 8 way to them and the cutout wont move.

  • Hi there,

        I was wondering if there is a way to make a cookie cutter like effect.

    Like, if two objects overlap, one masks the other and shows the background? A kind of opacity mask. I would need all objects on a layer to be a "cutter" and an object on a separate layer to be the cookie. thanks!

  • Optimisation: don't waste your time. If your game already runs 60 FPS, it's pretty much just a waste of your time to try and optimise it. C2's collision engine is pretty good, and objects which are not overlapping their bounding boxes can be discarded from collision checks in virtually no time, so trying to reduce that further with a timer will probably just have no effect and unnecessarily complicate your events.

    Node-webkit uses the Google Chrome browser engine. So it ought to work identically to Chrome...

    Cool, thanks for the article. But that is part of the problem, Im checking for tons of collisions constantly. And my computer is a bit powerful, so Im worried on the average computer it might be slow. At any given time I have 100-200 bullets and several "baddies" Like I said, it runs great. But Im wondering what would be smoother. Ill just do some experimenting haha. I was also wondering if there was a way to find the Minimum Specs needed to run? A lot of games give those details, and Im not sure how to go about figuring out how low you can go haha.,

    As for Node, thats strange, when I run in chrome its flawless.. But node does the freeze/stuttering thing from time to time. Not sure what the issue would be.

  • Hi everyone.

         I'm working on my first "big" project with construct 2. And I have a couple optimization questions. The first one is what is better.

    Just using the when this object collides rule, or using a timer to say that every 0.02 seconds if object collides?

    I'm making a very, very collision heavy game. And so far my performance has been very good. Getting a sold 60 fps. But I want to know what is more efficient for slower machines?

    What are the draw backs to both? I know the collisions are not as accurate if you use a timer, but I don't need them to be. It just seems to me checking for collisions 20 times a second would be less processor heavy than checking every tick. Am I wrong? Missing something maybe

    Second question: When I export to Node Webkit, it runs at a solid 60fps as well.. But out of no where, and in random spots it just seems to freeze for a couple of seconds. It doesn't seem related to the action on the screen, because it happens during down times as well. This does not happen in the browser. Any ideas what could be causing this?

    Thanks a ton!

    Adam

  • Thanks a ton for the help. I used a slightly modified version of that to get it working. You're a life saver haha.

  • Yeah, Im missing something still haha. I normally can whip this stuff right out. I dont know why this is stumping me.This is what I have.

    dropbox.com/s/uk5mch0zkhqjumm/Capture.PNG

  • Well, now Ive run into a different issue. If both kinds of enemies are on the screen, it just fires both projectiles. Did I mess something up, or is there a way to fix this?

  • Ok, I figured it out. I was correct, I was missing something super simple. Thanks a ton!!

  • I feel like I'm missing something incredibly simple ha ha.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Simple, make instance variable for the enemies and check them on the Turrent before shotting.

    Ok, wait. That seems easy enough. But since I'm targeting a family, how do I have it check what its targeting?

  • It would take a lot of CPU horsepower. You would need to sample at about

    8K samples per second (about AM radio quality). Analyze the last seconds worth of data 15 times a second, and then determine the rhythm, I would do that with finding the power (sum of selected amplitudes).

    What you are trying to do is reasonable but it takes CPU power and a fairly sophisticated algorithm.

    Other interesting effects are changing the color of the bullets based on the power at different frequencies. Do a fast fourier transform to get the spectrum, then analyze the power of each frequency, use that to to set the color of the shooting.

    Eric

    Haha, that seems way more complicated than I would be able to pull off in time. Cool ideas tho.

  • Hey guys, so I'm adding some turrets to my game. And I get the basics of how they work. Very cool.. But something I'm trying to do I cant figure out. I want to shoot a different projectile depending on what enemy is targeted. Is there a way to do this? Basically I have it locked on to a family of enemies, but I want it to check if the enemy is a person, or a vehicle, and shoot the proper projectile. Can this be done?

  • Hi there, Im thinking of making a shooter that interacts with the background music(tempo controls shot speed etc) and I was wondering if there is an easy(easier) way of making it than hand programming? Im assuming not, but I wasnt sure of any audio plug ins that have been created for music games or anything like that.

    Thanks for any info,

    Adam