Metallian 94's Recent Forum Activity

  • During the development of my project, I have received multiple times the warning message of reaching over 1 Gb of memory. Since the first time, I had it I ve been trying my very best to make my graphics consume as little as possible. But now I have reached a point which made me really question the scale of C2 projects.

    I could spent hours on doing research about this, but Im quite frustrated about this and as before I wouldnt understand a quarter of the words Id read, so Ill just ask this simple question for simple answers.

    So right now my game takes about 750 mb of memory. The window is HD sized 1920, 1080 and all the objects fit in it, the larger one being imported as raw data from Spriter. As speaking of the major assets, the hero and the enemies, there are eight of them, eachs pixel size is inside 400, 400, each has about six animations, each animation has 10 to 15 frames. Then theres a bunch of small stuff like projectiles but they dont have animations and arent really consuming much.

    This is my game so far, but If I want to finish the game in the scale Ive planned, Ill soon face 1 GB again. So since the game is already nearing the gigabyte, based on what I described about my content, is it really too much? Is that warning coming just because C2 devs assume the games are going to be mobile? Mobile devices arent my concern, I aim only on PC. Or is it really that I have underestimated the C2s project scale and it just cant handle more than a gigabyte. If we take 2D games like Dust an Elysian Tail, which is 1.3 Gb, does that mean I cant make a game like that?

    I dont mean offence to C2 or its devs. I love C2s programming system. I will probably never learn written coding, because I struggle understanding it and it overwhelms my mind way too much. C2 is a solution which will allow me to make games all by myself. Im just frustrated right now because I had a big vision for my project and seek simple answers to ease my head a bit.

  • This turned out to be worse than I thought. Yesterday I imported a few small spritesheeted objects and C2 didnt keep me on track on the gained memory usage until the next time I opened the project. As the last time before closing C2 it showed 750mb (which made me assume my memory usage was allright), now it showed 950.

    The conclusion is that Id actually need to use the runtime animation importing on everything from now on. Until now I planned to use it just on bosses due to their size, but it turns out I cant.

    So if I have this runtime error now with just ONE object, I would import all the other assets scmls and the game would become completely unplayable.

    This just raises the question, how does one even make a HD Graphics game with C2? So if people are planning to make big games, they will have to use pixel graphics? Thats not an option for me, I have never drawn pixel graphics and I dont even like them much.

  • I think Im getting close to finishing all the necessary features of my game in order to be able to soon stop figuring out programming and just focusing on pure level design and object placement, but since Im working on this all by myself and I dont know anyone who uses visual game engines, there are still issues I cant solve by myself.

    So i tried to make the first boss battle. At first I imported the dragons animations as Spritesheets, but the beasts size caused it to take way too much memory. I then decided to import the animations directly from the software I made them on, Spriter. Using the runtime features, I imported the animation files scml and scon, as in the first method described here : https://brashmonkey.com/forum/index.php ... Bconstruct

    I then programmed the boss. At the first opening both inside Construct 2 and that of an exported C2 file, the code works just as it should, but If the layout has to be restarted, I receive this message

    After clicking Ok, the programming of the boss stops working correctly. Throughout the layout there are invisible point objects in which I have programmed that, every time the dragon collides with one, she will fly to the next one and excecute one of her attack patterns. Basically a circular continuous movement and attacking based on pathfinding behaviour and collision detection. So after I click Ok and the layout restarts the dragon will stop moving after reaching the first waypoint and will just play the default animation. The difference of this happening in the engine and in the game export is that in the latter I dont receive the error message, but still the behaviour goes wrong. Both in C2 and the export I can undo the problem by closing the game window and opening it again. It works first, but fails if the layout has to be restarted in that same game/window opening.

    Has anyone else had this? Can someone help?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Thank you both for help, blackhornets reply solved it! While fixing it as you told, I finally got the way how timers work. I had difficulties understanding them and avoided them but not anymore. Ill also keep in mind what you said about Trigger once and Wait, that was also new.

  • Hi, I faced two problems during the development of my big project. Basically both of them solve a problem of the other, but then add in their own flaws.

    I recently made changes to this event handling enemy deaths, because I tried to make a system, where every time I kill one enemy, 1 point is added to a special meter variable. This caused the first problem: on each enemy death, instead of adding just one, the special meter variable added an enormous amount of numbers, much more than it shoud have. I figured out that it was probably because the event was of the kind which has to be told to trigger once.

    I added this trigger once condition you see in my code and it solved the counting confusion. However it created a new issue.

    Now whenever, I faced a bigger amount of enemies (around 10), at some point they stopped being destroyed. I took a look at the debug and according to it, the enemies did take damage, but it had went under zero and added minus values, without destroying the enemies.

    As you can see in this pic, when I toggle disabled that "trigger once" it solves one problem and adds another and when I enable it, the same happens the other way.

    I dont know which way I should fix and stick into, but I hope youll be able to help me with either one.

  • It seems I fully solved the problem! Along with using On destroyed to make multikilling functional, I also found out that the extra number was a result of C2 being unable to catch up with my events, it was solved by adding a "wait 0.2" action.

    Thanks for all the help Plinkie!

  • Did you mean an "on enemy destroyed" boolean instance variable for enemies, that would be set true every time the enemy hp goes 0 and Id replace the 10th, 11th etc events conditions, with ones that say: if that boolean is set and without trigger once conditions with it?

    Because I tried that and without the trigger once conditions, the counting of WEC at one enemy kill starts to be repeated and gets messed up, but when I put the trigger onces back, it counts normally but again doesnt recognise idividuals, when killing multiple enemies at the same time.

  • Theres still something wrong with this. So once the other issues were fixed, I faced problems with getting WaveEnemyCounter to work. Originally I had set it to the number equal to the number of the enemies, subtract 1 whenever an enemy is killed, and once it would reach to zero Id change the wave (along with its variable, ArenaWaveCounter).

    First everything seemed to be right. As I killed enemies of wave 1, the number went down (there are only 2 enemies in the first wave but still), but once it reached zero, the debug showed that WEC had turned to -1. To fix at least the problem, I decided to turn the enemy counting logic upside down, meaning that instead of setting it to a higher value and subtracting from it till zero, I would set it to zero to begin with and add to it, making the wave transition to happen when WEC is something like 2. But turning the logic upside down, did so as well for the problem I had. Now for some reason when its time for wave shift WEC becomes 1 in debug.

    It means that at the beginning of any counting situation, C2 thinks I killed an enemy, before I actually did anything. I came up with one solution. Because C2 will add that extra number anyway, I kinda fooled it By setting WEC to -1, when its time to change the wave.

    It works for now, but I dont know will I be able to lean on it in the future and will it cause problems perhaps? I still want to understand where that extra number is coming from, if some of you know the answer.

    Another problem I faced, made me question is making a system like this even possible at the end. When I kill 2 enemies at the same time, C2 counts it as only one for WEC. Killing multiple enemies at the same time is very common in this game as its built around combat and being unable to count it right breaks the whole arena system. Can I overcome this somehow?

  • Now I get it! It didnt even pop to my head that if the value is 0 to begin with, it affects the group instantly especially since I also didnt tell C2 to deactivate all the groups at the start. Thanks a lot!!!

    Now Ill still need to get WaveEnemyCounter to work, because killing enemies wont subtract from it for some reason. Looking for solutions will be easier now that two beasts have felled.

  • I setted the trigger once actions and it stopped the spawning madness. Thank you! One problem solved, two more to go.

    XD I was too nervous to notice that typo until now.

    I still dont know, why the spawning happens before I hit the switch. Isnt the default value supposed to be the one showing at the beginning of my event sheet (that is 0)?

    I did notice something strange anyway. The debug layout said, that ArenaWaveCounter was already 2(???) and it really was so. The guys of the second wave waited there patiently for my arrival at their line of sight. Also hitting the activator does actually spawn the first waves enemies, but its no use, while the second is already on.

  • Hi! Im working on a game for my studies and faced a problem, along the way. So...

    What Im trying to accomplish?

    A battle arena system, in which after you enter a certain zone, enemies will appear. Once youd defeat them, a second enemy wave would start. Then after that a third one etc. until all waves have been defeated

    What I tried to make it work?

    First of all, I made two global variables: Arena Wave Counter, which indicates the current wave number and Wave Enemy Counter, which indicates the number of the enemies of each wave. At the end of the corridor, that leads to the battlefield, theres an object, which when the player collides with, is supposed to launch the first wave. Around the zone, there are portals, of which each of them is supposed to spawn an enemy, one at a time, when the wave starts. To indicate when enemies of the current wave are defeated, for the next wave to start, I simply put a value at Wave Enemy Counter just before the wave group activates and that value is as much as I create or spawn enemies for that wave. The way, the value changes is that, whenever an enemys HP reaches zero, it subtracts one from the Wave Enemy Counter. Once it reaches zero, I set a value that represents the next wave, activate the group of that wave, set the number of the next waves enemies and deactivate the group of the wave I just finished. For details, I added these pics of my code.

    What went wrong?

    First of all the enemies are spawning before I touch the corridor fence, secondly for some reason, hundreads of enemies are spawning instead of the few, I told the system to be created. I dont understand at all with what logic these atrocities happened.

    So Id be really grateful for help for fixing this code, or for creating the arena system, with perhaps a completely different way.

Metallian 94's avatar

Metallian 94

Member since 13 Oct, 2016

None one is following Metallian 94 yet!

Trophy Case

  • 8-Year Club
  • RTFM Read the fabulous manual
  • Email Verified

Progress

10/44
How to earn trophies