Metallian 94's Forum Posts

  • Ok, I made an array system where the changing array values co operate with instance UIDs to determine each masks instance variable.

    However I'm doing something wrong when I'm saving the array or loading it, maybe both, I'm not sure, but either way the array values don't load. I was prepared for that arrays have to be dealt with differently than global variables when it comes to saving or loading. Here's how I tried to save and load the array. Can you help with this?

  • A solution that comes to my mind, would be adding an image point to the position where the sword hits on the attack animation's last frames and sticking a small invisible sprite in it, which would then spawn particles on enemy collision.

    Go to the hero's sprite editor and add an image point, set it in the position you want, in this case select the frame where the sword hits and set the image point to the sword's tip.

    Then create a small sprite and make it invisible from its settings.

    Every time you hit, make the hero spawn the invisible sprite to the image point you made earlier. If you want to be exact about the timing, compare the frame and select the one where the sword is supposed to touch the enemy. Start a timer, to destroy the invisible sprite some time after the hit is finished.

    Check if the invisible sprite is in collision with the enemy and if it is, make it spawn the particles.

    So basically the blood comes from the hero sprite, not from the enemy. I'm not sure how well this solution works and I haven't used particles myself before, but this is what came to my mind first.

  • Thank you for the reply!

    I know my code might not have made sense, but I wasn't really sure of any of my solutions. It was experimenting based on what I knew and understood and in the first attempt's case, I just kind of thought "For each" would individually treat each mask instance, to set each ones correct instance variable, but good to know that's not the right way.

    I can't rely in global variables alone in my case. Collecting masks does add up to a certain global variable, but I also need to have some variables that affect the masks themselves, to be able to change their states, because these are special collectables. Unlike more generic things like coins, with the masks, if the player has already collected one instance, they should not be able to collect it again (until they start a new game of course). I want each to disappear or change frame on collecting and stay that way on a loaded game.

    I will try the array next, despite being new to that feature too. I'll do research for it and combine my new knowledge with your advices.

  • Hi, I’m in a need of help. After a year long break I’ve continued my project’s development. The progress has been good, until I tried to save some instance variables for the state of collectables.

    I first tried it the same way as I previously had done with global variables (successfully), as shown in the pic below. The instance variable I’m trying to save is BmaskCollectedNum, the variable for the collectable mask’s state, which turns from zero to one when it’s collected. This solution did not work, the masks changed state would not remain when closing and reopening the game.

    Next I tried using dictionary, because it seemed a common variable saving method, based on what I read from other threads about variable saving. I’m completely new to dictionaries, so I tried to understand them by studying the code of a metroidvania game template I bought from the Scirra asset store years ago, which heavily relies on dictionaries. The result is shown below and it still didn’t work. I guess I don’t understand dictionaries enough to know how to properly use them with instance variables.

    Any help is appreciated.

    And by the way, thank you very much for helping me know how to save global variables to local storage years ago. Sorry I forgot to reply to the last post. Saving global variables is no longer a problem, now I’d like to know how to do the same with instance variables. I actually tried to start this as a reply to my previous thread from two years ago, but the site didn't let me, so I made a new thread instead.

  • You should check out this video from Jerementor's 2D platformer tutorial series. It shows how to make a pretty similar boss that moves sideways and jumps every once in a while.

    youtube.com/watch

  • Hi, I’m making a prototype base for my future game project, which currently has 457 events. It’s been going decent, until I tried to program a save system with Local storage.

    In it’s testing state the game has four levels, which are accessed through level buttons. Each one has two instance variables, ”Unlocked” (a boolean which defines is the level unlocked) and ”Level”(a number of the level layout the button leads into). In the beginning only one level button is accessible, but every time you beat a level by touching the ExitPortal, depending on the portal’s ”UnlockedLevel” variable (of the next level to be opened), a new value is set on the global variable”LevelUnlockCountGeneral”, which (depending on it’s count) opens the next level, turning it’s ”Unlocked” to positive, while the prievously unlocked levels stay open too of course. Pressing M saves by setting the key ”UnlockedLevels” to ”LevelUnlockCountGeneral”.

    My objective is to be able to save and load the ”LevelUnlockCountGeneral” as well as the instance variables under it’s control, through the main menu with the self explaining ”New”, ”Load” and ”Exit” buttons. Here’s what I did.

    I tested the game and proceeded normally, unlocking the levels. The problem came in, when I saved and returned to main menu to try loading the last state. The level buttons for the unlocked stages weren’t working except for the first, which is open by default. When I played it and touched the ExitPortal, nothing happened as if the global variable wasn’t reacting. I checked debug and reproduced the problem. It turned out that after pressing ”Load”, the box of ”LevelUnlockCountGeneral” wasn’t showing any value, but instead a word ”NaN”

    Why it’s unable to load global variables? How are they usually handled in these situations? Despite the title I'm not restricted to use just Gvariables and Lstorage, any help to achieve the right outcome is welcome. These tools are just what I used first, because I prefer to use methods which I can understand myself.

  • Ok, so I made this test in which you got a cube with a platform behaviour, cant be much simpler than that.

    https://www.dropbox.com/s/qhaqelz7u76py ... 1.zip?dl=0

    I actually was able to export this one, so I guess it proves you that I can export something. But I still need to be able to export projects, like the prievous one. I even was able to do that with my old PC.

    Ill see if I can find the older versions of my game to try and export them one by one. Those files are lost somewhere since I havent really needed them until now, as I was able to export the newer ones on my prievous PC just fine.

  • I tried the latest release without difference. The only addon Im using is Spriter, but I need that, its a requirement for my project. I tried to export smaller simpler projects too but the problem is repeated, no matter what project Im exporting. Also I could export the same ones with my old computer. The problem happened, once I used C2 on my new PC for the first time.

    I couldnt find any tech support forum, so I assumed this was the right one, but Im not here to point out a general problem on C2, since no one else has this. I just need personal help to be able to use C2 normally again.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Problem Description

    ____ Im currently unable to export my projects. Every time I export to NWJS, the export loading starts normally, but after a while my screen goes black for some seconds and I get the "Construct 2 has stopped working" message. I also tried to export on HTML5, but that didnt make a difference. ____

    Attach a Capx

    ____ https://www.dropbox.com/s/vz0csxtmezsw7bx/0511.zip?dl=0 ____

    Description of Capx

    ____ Its my project, which itself hasnt anything wrong but crashes during exporting. Its the same with any project. ____

    Steps to Reproduce Bug

      The normal steps of exporting any Project, by clicking file, Export Project, choosing any export platform that can be viewed in desktop and there it goes.

    Observed Result

    ____ The engine starts loading the export normally, but after about a minute my screen goes black for a couple seconds and I get the "Construct 2 has stopped working" message, after the short loading screen, where Windows tries to find a solution.____

    Expected Result

    ____ Id expect my projects to be exported normally. ____

    Affected Browsers

    • Chrome: (YES/NO)
    • FireFox: (YES/NO)
    • Internet Explorer: (YES/NO)

    Operating System and Service Pack

    ____ Windows 10 Home 64-bit (10.0, Build 15063) (15063.rs2_release.170317-1834)

    I attached my DxDiag.

    https://www.dropbox.com/s/jbgjgl12wrwj1 ... t?dl=0____

    Construct 2 Version ID

    ____ Release 244 (64 bit)____

  • Right! There it is. I have ignored many C2 updates, so Im not sure how compatible this is with your versions. Well Ill send a video if theres need for that.

    So some instructions: use A and D to move and W to jump. You can doublejump and control the height depending on how long you hold down W, on both the first and second jump. Move to the left on the platform and the Spriter beast should appear. Start by jumping on the blue crystal platforms, that float above her spiky tail. Dont go on the tail, because it hasnt got solids, youll fall through. From the third platform descend on her back to the upper or lower shell (dont be afraid of those spikes, I havent programmed them to hurt you yet.) Try simply standing on the back and once the rapid animation switching starts, try to doublejump multiple times. Youll see that it plays the doublejump animation (the flipping one) first, sometimes you cant perform the second jump and sometimes you cant even jump at all. By pressing G after the monster has appeared, the monster starts another animation and also starts moving/flying left. For some reason this sometimes works and sometimes not, but right now the main problem is the jumping on the monster.

    BTW that snowman is just a test dummy for all my platformer based games. Im not planning to plagiate the legendary lack of limbs feature of Rayman.

    https://www.dropbox.com/s/oxgqd9krozg3b ... s.zip?dl=0

  • Last spring I found out about the advanced scon exporting of Spriter animations, I was thinking to create a platformer with massive bosses, that would require the player to climb on them to defeat them. The technology makes C2 to treat the giant monsters parts as separate objects, for which I can individually attach "solid" behaviors, I can make some spikes on the back dangerous etc. It makes the boss basically a mass of moving platforms, that move horizontally, vertically and diagonally.

    The problem I faced is that when my character is standing on a platforms/parts surface running or standing, its gravity somehow cant keep up with the platforms movements (even when they are pretty slow). Im not completely unable to advance forward along the parts/platforms, but the issue causes my character to often rapidly switch between standing on the floor and being in the air. This shows in the animations with the standing and jumping animations switching in a flashy way, like a hundred times in one second.

    The problem ruins the way the game looks as described, but it also ruins the basic gameplay, because sometimes when I need to doublejump, Im unable to do it because C2 thinks I was already in the air, so it does the second jump first.

    I need your help.

  • Keeping it under a GB in single layouts, got it! This info helped a lot, thanks for the replies!

  • 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?