Construct Limits

This forum is currently in read-only mode.
  • As far as I can guess now Construct can afford 1500 objects or 20 000 000 bites file.

    Dear Arima - even division of events to multipal event sheets does not help any more. The program closes when something is added....

    May be it will be better with the new computer....

  • Before you get a new computer, could you list the specs of your current computer? I'm not 100% sure that a new computer will do much to help. My reason being that I spent over �2000 on a new computer last year (two graphics cards, a quad core i7, 16GB RAM, solid state drive) and I often run into slow-downs in my Construct game. I use quite large textures, and if I concentrate too many of them in one area, all interactive with my main character, my frame rate is cut in half.

    I think it's highly likely in my case that Construct is the bottleneck, and not my computer. I just want to make sure this isn't the case for you too before you rush off to spend a lot of money on something that might not work.

  • Silver, thanks for helping,

    Intel(R) Core (TM)2 Duo CPU T5750, 2GHz, 2GB OM

    All my characters are alike and are "living" under the same formulas, not too complicated. The only trouble is they too numerous(

    That is the system message - "An invalid argument was encountered" (5 times) and the Construct shuts down. That happens when I click on the included (empty) event to copy the separately made character events in within.

  • Hmmm, then I'm not sure. A new computer might well help, but I have no idea how much. Have you tried running the .CAP on a friend's computer to see if the issue exists on different hardware? If you're okay with uploading it, I could always try loading the .CAP on my computer for you too.

  • Dima111 - it sounds like you've encountered one of the dreaded memory leaks. Does the problem happen immediately after startup and loading the file? Because if you're willing to upload it, that might help one of the people maintaining construct classic fix it.

    However, I'm almost entirely sure you're incorrect about construct being able to handle 1500 objects. The fact that you have 1500 objects, from my experience, is why you're getting that error message about invalid arguments. The more objects construct classic has, the quicker the memory leak will crash the program. I'm almost positive that the memory leak is involved with the image editor and how many objects, and possibly animation frames, a .cap has. The only way I've managed to get around it is to repeatedly close and reopen construct after editing a few animations to reset the memory leak.

    I hate to say it, but I think you're trying to make a game that construct classic simply can't handle. Why do you need so many objects?

  • Dear Arima,

    Dear Silver,

    Thanks for trying to help...

    Please give me your e-mails. I suppose you are honest people - I did much as for the game - and I trust you.

    My characters are warships - they are about 60 now in the game - I have planned 400. And every ship has guns (every gun is a sprite) and some ships have up to 60 guns. Also I am to show the ship figures - ammunition, crew, speed, qn-ty of guns, etc. That gives something about 20 text fields per ship. That's why 1500 bjects. In fact I need much much more - 10000 objects...((((((((

  • You seem to not have a grasp on creating multiples of the same Sprite through events. YOu can have a single text object and create "instances" of it and they write completely different texts. Also, I'm gonna assume the ships don't animate, which would make it even easier to just have one sprite and then 400 animation frames within it, the animations having a speed of 0, and then you just change the animation frame per ship (or weapon).

    You probably just need to mess around with Construct a lot more to actually learn it. Try smaller projects, or at least prototype experiments.

    Also, Arima, if you've once had event sheets that take MINUTES to open, I probably have no serious memory leak issues to worry about for quite a long while, haha. Nothing I've opened in Construct has taken me longer than a second or two.

  • Konjak,

    That's great - you grant the hope) You are quite right - I am absolutely far of using the same sprite through events.

    Where could I find the info how to use "instances"? Or could you please post the respective cap? Please - teach!

    I will rush to optimize the game!

  • As far as I found in the Forum - instances are the pasted (not cloned) copies of one object? And the only difference between them is in properties by animation frames number?

    Konjak - you are quite right - the gun sprites are not animated.

  • In the event sheet editor you can use the System object action Create Object to spawn a second instance of whatever you would like.

    You can even configure it with unique values if you add the settings right after the action that makes it (eg:

    -Create "Sprite" on layer "Objects" at 0, 0

    -Sprite: Set color filter to Red

    -Sprite: Set private variable "Life" to 100

    But, if you want to create multiple sprites at once, you need to do it like this:

    -Create "Sprite" on layer "Objects" at 0, 0

    -Sprite: Set color filter to Red

    -Sprite: Set private variable "Life" to 100

    -Create "Sprite" on layer "Objects" at 0, 0

    -Sprite: Set color filter to Red

    -Sprite: Set private variable "Life" to 100

    as any settings after the "Create" action will apply only to the newest sprite you made.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • OK! Got you!

    And in that case - the special feature, let's say - the name of the ship and the number of the ship gun - I can write in the private variable (after the "Create")?

    Which event is responsible for the GunSprite creation - the ShipSprite appears on the Screen?

    In that case what if it is (I mean - the GunSprite) completely destroyed? Everytime the ShipSprite appears on the screen - the GunSprite will ressurect...   

    Or Always - in that case (as far as I can guess) all my 10000 sprites that are not destroyed will be computed?

  • Now my "gun work" algorythm is (the ship name is AAAA)

    When AAAAGunSprite1 overlaps Enemy

    When Enemy: Do not Pick closest to AAAA X,Y ---> Enemy private variable "AAAA" set to 0 (means that the Enemy ship is not under the AAAA fire)

    >> Nothing happens

    When Enemy: Pick closest to AAAA X,Y => Enemy private variable "AAAA" set to 1 (means that the Enemy ship is under the AAAA fire)

    >> Every 10 (let suppose AAAAGunSprite1 gun rate) => AAAA "Ammunition" private variable subtract 1 (AAAAGunSprite1 shoots)

    >>>> Random (1 to 100) (let suppose - AAAAGunSprite1 shooting accuracy)    /and/    if the Enemy private variable "AAAA" = 1 (the Enemy is under AAAA fire)    /and/   if AAAAGunSprite1 overlaps Enemy (the Enemy is in the AAAAGunSprite1 range)   /and/   if Enemy is detected(discovered) (overlaps another Sprite - DetectionSprite)    /and/     the Enemy is closest to AAAA     =>   the Enemy recieves 1 hit.

    What will it be in that case for created instances?

  • Yep, you can configure the object as much as you like with actions after the create action and it will only applied to that instance.

    That second set of events should work with all of your instances already I believe.

  • Jayjay,

    A bit simplier question)))

    I have 25 destroyers that are alike each other and every destroyer has 1 (suppose) gun. So all 25 guns can be instances of a single GunSprite. Am I right?

    To differ the 25 instances from each other need I to create for my GunSprite the PV "Ship name" and after "Create" to write in the Instance PV - AAAA, BBBB, CCCC etc?

  • Jayjay,

    A bit simplier question)))

    I have 25 destroyers that are alike each other and every destroyer has 1 (suppose) gun. So all 25 guns can be instances of a single GunSprite. Am I right?

    To differ the 25 instances from each other need I to create for my GunSprite the PV "Ship name" and after "Create" to write in the Instance PV - AAAA, BBBB, CCCC etc?

    Absolutely, you can match them up with a private variable on each (eg: "ShipNumber" on ship and on GunSprite, then have conditions saying "GunSprite: Value "ShipNumber" = Ship.value('ShipNumber')" and then do positioning events)

    Or you can use containers. Add the GunSprite object into the container of Ship in the object properties (in layout editor), and whenever you create one of the objects its pair will be created too. Plus, any event relating to one Ship object will automatically refer to its specific GunSprite too!

    Edit: Careful with containers, if you destroy one of the objects in a container their pairs are destroyed too, same with creation. However, each group of objects (Ship and GunSprite) will act separately from other groups.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)