NastyManatee's Forum Posts

  • 10 posts
  • Hey all,

    I'm trying to create an RTS style game where I can select multiple units and move them around.

    I have selection all worked out fine, and movement seems to be okay (I am using car movement to prevent overlap of the units when moving).

    The one thing I am having a problem with is unit behavior once a location is reached.

    Since all the units are trying to go to the same destination, once they are basically in the destination area, they keep pushing each other around trying to get to the destination point.

    In reality, I want it to be that once they get as close to the destination point as possible, they all stop trying to move.

    My attempts to achieve this:

    1.) Once the units are within a specific distance of the point, stop moving (I have a bool for "Active" indicating that they should or shouldn't try to keep moving). This works well for small groups of units, but if I have a large group, the same behavior happens on the edges. If I scale the range up to accommodate large groups, the units never actually reach the destination point, so it seems really broken.

    2.) What I want to do: If the unit collides with another unit that is inactive, it becomes inactive. That way, if I have the first unit become inactive once it gets very close to the goal, the rest of the units should also become inactive upon collision, kind of in a chain reaction. It sounds great on paper, but I don't know how to do this! The problem is that if I have a condition for "if unit collides with unit", I cannot check if the collided with unit is inactive, since all logic binds to the colliding unit.

    Does anyone have any insight on how to do this? The game seems really broken when the units glitch out in an attempt to get closer to the destination any time you move several units.

    Thanks!

  • I am running the r87 beta in Windows 7 on an x64 laptop.

    After installing r87, I could no longer get projects stored in .capx format to launch in Chrome through the "run layout" command.

    To be more specific, a browser tab will open, but nothing will load on the page (just blank white). I looked at the browser console, and no errors seemed apparent. The only thing that seems odd is that (in the Network developer tool) it appears that jquery-1.7.1.min.js keeps firing off a _reloadpoll_ GET request every couple of seconds (even though they keep getting a 200 OK response back).

    Even more odd, after trying to run a capx game in Chrome and failing, caproj games also won't run (they will run if I don't run a capx game first, though). Restarting Construct 2 seems to fix this.

    If I set the games to run in other browsers (such as IE or Firefox), this doesn't seem to be an issue. Again, this only happened after installing r87.

    I'll keep looking into this to see if I can find more details.

  • I just discovered this and was about to reply so myself! My bad.

  • Thanks for the suggestion, that's what I've been doing = ]

    I figured HTML 5 had limitations in this area. Figured I'd ask since I'm not that familiar with the platform.

    Speaking of distance-based solutions, though, it would be great to have a simple System function in for distance between two objects. It might be a one-off for comparison of two values, but I find myself having to do the algebra a lot.

    BTW, Construct is fantastic. I work professionally in game production, and this might be my new favorite prototyping tool for game ideas just for the sake of how easy it is to get an idea up and running.

    I'll try to spread the word!

  • Maybe this is possible already, but if not, sound sources would be a great addition to Construct 2.

    I'm currently creating a game where you build and place autonomous robots in the (rather large) world. To make these robots feel alive, I've given them sounds. The bad part: even if the robots are off screen, I hear their sounds, making the game very chaotic (and even confusing) rather quickly.

    Thanks for your consideration!

  • First off: specs. Standard edition, Windows 64bit, on a Macbook Air (yes, Windows on an Air). Video card is a Nvidia GeForce 320M.

    I've been working on a platform game where you have a jetpack. Since platform and physics don't play nice together, I couldn't use forces for the jetpack, so I just decided to adjust gravity instead.

    What I noticed, though, is that if you set gravity to, say, -300, when SPACE is pressed, and then have another event to set gravity to 300 when SPACE is not pressed.

    What I find is that the not pressed event never picks up, as shown in the .capx below.

    Download Here

    This bug only occurs, though, when the values are exact opposites. If you set gravity to -299 on SPACE pressed, and 300 when not pressed, there is no problem, and we get the expected behavior. It's almost like there is a check for identical value before the system tries to swap gravity, but the check is only comparing absolute values.

    Hope this helps!

  • I should have added: standard edition, 64bit windows.

  • I'd attach a .capx, but it's not really relevant.

    For some reason, in r82, when I try to edit the Y size of my layout (using the menu on the left of the interface when the layout is in context), I keep getting a check failure, and it is impossible to change the Y dimension of my layout.

    The particular crash report is:

    ---------------------------

    Construct 2 Check failure

    ---------------------------

    Check failure! This is probably a bug:

    Unknown layout property modified!

    Condition: false

    File: Bars\PropertiesBar - Layout.cpp

    Line: 217

    Function: void __cdecl LayoutPropertyChangedHandler::OnPropertyChanged(const class std::basic_string<wchar_t,struct std::char_traits<wchar_t>,class std::allocator<wchar_t> > &,const class std::basic_string<wchar_t,struct std::char_traits<wchar_t>,class std::allocator<wchar_t> > &,const class std::basic_string<wchar_t,struct std::char_traits<wchar_t>,class std::allocator<wchar_t> > &)

    Build: release 82 (64-bit) checked

    Component: Construct 2 IDE

    (Last Win32 error: 0)

    You are using a 'checked' release of Construct 2, intended for testing, which causes certain errors to be reported this way. Hit Ctrl+C to copy this messagebox - it's useful information for the developers, so please include it with any bug reports! Click 'Abort' to quit (unsaved data will be lost!),'Retry' to turn off messages for this session and continue, or 'Ignore' to continue normally.

    ---------------------------

    Abort   Retry   Ignore   

    ---------------------------

    Cheers!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Well, of course I just figured this out.

    To anyone interested:

    I used the same jump count instance variable, but I set it to 1 on jump. Instead of decreasing by 1 when the player's velocityY is 0, I now:

    Check for collision with the level objects. I ensure that the objects are below the player before setting jump count to 0. I also ensure that the difference between the X values of the player and the object are close (this prevents wall scaling).

    Cheers!

  • Hey all,

    I'm new to Construct 2, and I'm taking a stab at my first real game (after playing with some of the examples, making a few prototypes, etc.). First of all, this is an awesome engine and an awesome community, so thanks to the Scirra crew for making this!

    So, my problem: I have a rolling-platformer type game where I am solely using the "Physics" behavior, not "Platform". The player is a rolling ball, and they can collide with objects (like moveable crates) and platforms (not moveable).

    I want to enable jumping in this game (it's the only real action controlled by the player). Currently, I give the player a neg. Y impulse on key press. However, with this method, if you mash the key, you can do infini-jump, and I want to restrict the player to single jump. That said, I want the player to be able to jump again after they have collided with an object below them (this is key, I don't want you to be able to infini-jump up walls).

    My current implementation is to give the player an instance variable for jump count, defaulted to 0. The player can only jump when jump count == 0. When they jump, I set jump count to 2, and subtract 1 from this value any time the player's velocityY is close to 0 (-1,+1). Ideally, 1 is subtracted at the peak of the jump, and again on ground contact, and this works well in basic terrain situations.

    This does not work well, however, if the player lands on a crate that's on an incline, a sloped platform, etc. It seems like jumping should be possible in these situations, but it's not since the Y velocity hasn't leveled off to 0.

    Is there a better way to restrict to single-jump? I know Platform behavior gives recognition when a sprite touches platforms, is there anything like this for Physics behavior?

    Thanks!

  • 10 posts