narf's Forum Posts

  • 8 posts
  • alspal, youre a genius ;D thanks

    and newt, not really, i just want my game to be easily moddable after the final product. you know, like an official game, like liero and such

  • will definitely not suffice*

    sorry xP

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • So I loaded 4 frames into a sprite that has a platform behavior added to it. I noticed that after the frames were loaded and if the collision mode is set to "per pixel" it goes to hell and has no collision data whatsoever. any ways to get around this?

    I am temporarily using the "bounding box" collision type, but that will definitely suffice for much longer, because the bounding box is much bigger than the actual character.

    any help much appreciated, thx [:

  • Setting 22 values in an event doesn't sound like it would cause lag, how many bullets do you need to make per tick? Maybe you need to optimise other parts of your code?

    it doesn't cause much lag if i'm using a simple weapon such as a pistol or a rifle, but if i use a rapid fire multiple shot weapon, it might have to assign 4 * 22 PVs every other other frame, which does build up and cause lag.

    Once a pv is changed in a layout there's no way to remember what its original value was.

    What you could do is use global variables, or better yet the hash, or ini object to store the original values.

    22 pv's is a lot to deal with all the time, you might consider a different approach by grouping variable types by common use.

    For example, an apple can have many different variables, red, green, sweet, tart, etc. But you dont just say I want a red apple, you call it by name IE Red Delicious, or Granny Smith.

    Now to use that in say something like an ini you would name a bullet as an ini group, and then if the bullets name/ group is used you can get its variables using for each item in group.

    I'm not trying to reset each PV to its original value, but rather trying to change the value that the PV starts as when the object containing the PV is created, I'm just wondering if there is a way I could do this because I already have all the PVs created and etc. It would just be annoying to start my whole weapon system over and use .ini files. Although it is an absolutely genius idea and I would have never thought of it, not to mention I'm trying to use mainly outside files for in-game content such as maps, animations, etc. And If I used your .ini file weapon system idea I could potentially save previously generated weapons for future reference which I guess would be nice.

    Thanks for the help! :D

  • This is an optimization issue.

    My game randoms generates weapons, like in borderlands, but each weapon has much more attributes than just "Damage", "Accuracy", and "Fire Rate", for visual effect and diversity. I currently have twenty two attributes, and for each attribute, the value must be written to the bullet in a private variable for every time a bullet is fired. And as you can imagine, if the weapon is a quickly shooting, multiple shot weapon, it causes quite a bit of lag when firing because for each bullet created it must have 22 values written to it.

    My question: is there any way that you can reassign the default values of a private variable? That way I would be able to make the values only be assigned one time; when you switch weapons. Then every bullet would already have the appropriate values for their private variables when they are created, and would not need to be assigned 22 new ones.

    Any help would be much appreciated.

  • oh tight. thats easy enough. thanks ;P

  • are you planning on adding per pixel physics collisions?

  • Anyone happen to know how to make a single layer immune to camera movement? i think i've seen the option before i just can't find it again. I'm making a side scrolling zombie shooter but i can never get the HUD layer to stay with the camera, it just stays behind in it's original position.

  • 8 posts