mh11's Forum Posts

  • 14 posts
  • emoaeden I appreciate your help, but that doesn't really work. Only the most left moving part collides with obstacles, the rest just went through. That's what I was trying to solve. I already tried pinning.

    quoting myself from the first post:

    [quote:2ux5l8tu]Problem 1: Pinned sprite losing its collision behaviour. Maintaining its relative position no matter the enviroment.

    + there are other problems with pins as already said.

    Sadly neither joints can't really solve this. Surely not without some serious plugin I'm not aware of. + with dozens or hundereds physics object glued together with joints, there would be huge performance issues I guess. I though about one or two workarounds, but they are far from perfect and often also impossible.

    I'll rather think of other gameplay. I'm not even sure, the final game would be fun. I was aiming for the prototype first, but suprisingly got stucked on technical stuff. I guess C2 can do amazing things, but I chose one of the rare examples which are hard or impossible to do.

  • R0J0hound I haven't mentioned that there. I just found out. Maybe I'm wrong, I'm pretty new to C2. Whenever I want to make a joint or apply force with regular physics I can't see how to address specific instance in the event. It always applies to all of them. I couldn't find anything on that topic via google either.

  • Well I think I chose the wrong tool for this particular idea. C2 seemed to have everything I need in simple and quick-learned package. Yet physics is not one of them. I've just realized I can create instances on the fly, but there is apparently no way to refer them from the physics engine. Well, my bad. I should have tried free edition first.

    I don't want to give up on C2 though. GM would take me a lot more time to get familiar with. That's why I ditched the idea of learning Unity in the first place. I have experience in coding in some languages but nothing suitable for games, plus it would take me ages to make something professional looking and fun to play. I like how you can make a lot with just several events, that would normally require tons of lines. As a game designer, graphic designer and programmer in one person, C2 is maybe one and only way to make game(s) in reasonable time and without spending months or years getting familiar with it.

    I'll try to re-think the whole concept without physics, but it will most likely destroy the whole gameplay. I've seen some very complex games made with C2, so I guess if I avoid physics for the time being, there shouldn't be "anything" that I couldn't do with C2. My OT stops here.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I need two things that C2 Box2D can't do and Chipmunk sadly neither, at least it seem that way. I just want to make sure.

    1. Setup collision polygon during the gameplay (i.e. by event, programatically).

    2. Apply force from multiple points inside the sprite which need to be setup/adjusted during the gameplay, not before.

    The reason I need this, is the physics wrapping object that would wrap multiple adjacent squares as one. Moving dozens of joint squares might bring a huge performace issues + it doesn't work as intended anyway. If anybody is interested there i complete question:

    If there is a way to achieve this with the Chipmunk I would really like to hear it. I should have tried that before buying the license =( I thought changing things like image points or collision polygons via events is the natural thing to do.

  • Post a CAPX and I'll give it a shot

    I like the idea of my workaround, there would be one physics object rather than dozens. Yet I already got stucked just thinking about it. There seem to be no way to set or move image points dynamically during the runtime. So I could hardly apply force simultaneously from different points of one sprite. I haven't tried to googled a dynamical change of collision mask yet, but I'm affraid it will be the same problem as with image points.

    Here's my capx:

    http://saix.cz/mechl01.capx

    IN THE CAPX, there is a force only on left square and a PIN -- right square ignores collision. There's also deactivated JOINT -- but those squares stopped collided with each other.

    Anyway, I don't think any of those two ways are good for performance as the number of connected items will grow. I think I really need to work on that workaround, but I'm not sure it's possible with C2. That would suck, I bought C2 for this particular project.

  • 6 am in the morning, I need to go to sleep, but I think I might have the workaround, one of them anyway. I'll try tomorrow though.

    Make a pin chain out of all the parts and pin the last one to transparent rectangle that would wrap the whole object.

    Then apply several forces from different points of the wrapper sprite to simulate forces on the parts.

    Only thing I need to figure out is to change the collision mask of the wrapper to custom polygon druing the gameplay. I hope that's possible. Still learning my way. I actually start using C2 only today. So I'm sorry if I shot my question too early. I should have slept on that, before running into despair

  • EDIT: I have changed the subject, so I can extend my question, sorry about the abbreviations.

    My question was originally about pinning physics sprites together the way lego cubes are connected; meaning - you can apply force on one or more sprites and the final object behave as one solid object while still has physics properties. The parts would be arranged during the gameplay. I ran into problems solving this either way (PINs, JOINTs).

    But as I was thinking more about the issue, I realized it would have horrible performace consequences even if I make it work. There's where my workaround comes to place (lower in this thread; basically wrap all the square sprites by one invisible sprite with multiple image points and collision polygon). The problem is, it seem impossible to do in C2 which I bought especially for this project.

    I would need to be able to move or set image points within the sprite programatically AND change the collision mask polygon also programatically, i.e. during the gameplay. I can't see the way to achieve that.

    I could premade matrix of 100x100 image points manually and use only some of them, but phew, sounds dull and time consuming. If C2 won't crash on me first.

    I guess changing the collision polygon to trace the borders of all squares during the gameplay will be the same problem as I couldn't find or google the way to change those properties programatically.

    I have also added a simple capx example as requested (see the whole thread).

    Original message:

    (please read to fully understand)

    Canvas:

    2 adjacent physics sprites

    there's a separate force on both of them

    Aim:

    I need to keep them "locked" together like lego parts are.

    Approach:

    • PIN Problem 1: Pinned sprite losing its collision behaviour. Maintaining its relative position no matter the enviroment. Problem 2: If sprite is pinned to movable but sitting sprite, the pinned sprite can't be moved as it's pinned down. I need all the pinned sprites act as one physics object. Imagine lego parts pinned together. No matter which part(s) I apply the force, the whole thing need to act as one object.
    • JOINT Joints doesn't seem to have either of the problems but there's one new. Attached objects collide with enviroment, but don't colide with each other and therefore re-arranging the whole group. I tried to prevent this behaviour to no avail.

    I almost feel like there's no other way to make the physics work as intended, but that seem to me hard to believed.

  • Done, I just thought there's no reason to bother staff with the silly stuff like this =)

  • I bought some graphics assests here from Scirra store for myself only. I'm sole developer, but checked the "business organisation" in checkout as I plan to sell my game eventually and pay my taxes.

    But now, when I finally bought personal license for the C2 and read the licence carefully, I realized I shouldn't have checked that while I was buying assets before. Does that make any difference? Or the checkbox has only meaning while buying C2 (not the assets)?

  • Thank you for the tips, I'll sure have a look at them once I get some knowledge of C2. Haven't done anything yet and already dealing with perfomance issues, lol. But I had to be sure to choose the right tool. Currently I don't have knowledge of any language useful for making games these days. C2 might be my fastest ticket in.

  • Phew, thank you, but that raise more questions. Now, when I know what to look for, I see NW.js is also used as one and only way to make Windows executable. I though, C2 is producing actual standalone binaries for the Windows, plus maybe with some dll dependencies, DirectX etc. Though this suggests, the game will always run through intermediate code using NW.js as the wrapper, which is basically the Chrome. However, as the NW.js seem to be the only way to make Windows executable and I've seen some pretty complex games made with C2 that had no issues with the performance, I guess it's alright not to worry about the performace beforehand.

  • Hello, all videos I've seen are using the browser to preview the game. I suppose there is a way to compile the game as standalone Win EXE in the full version. Is there also the way to preview the layout during development as desktop binary rather than HTML5? I expect there will be huge performance difference between two of those when it comes to heavy projects. Running preview only in browser could be a big problem at some point. I couldn't google the answer for it and I'm not feeling like buying the full version just to test that. Can anyone confirm the feature or point me to answer? Thank you.

  • if you add the file to the project it will compile with your out put files.

    So instead of reading the file during the runtime I can import the file during development process. Sounds good. Thank you for prompt help.

  • Hello, I have no previous experience with tool like this. I'm deciding whether it's good fit for my game project. Since my game will be based on text structured in XML file, I'm worried about being the main game value way too exposed for any capable user.

    Can construct compile external resources such as XML into EXE?

    Or obfuscate the external XML file? I thought about using PHP's base64 and couple more string function to obfuscate the plain text. So only the one who knows the exact sequence of used methods could read the file. But that would require having the same string function in Construct to reverse the process and load as normal XML. Is that possible with Construct?

  • 14 posts