enum pirate's Forum Posts

  • Below is the capx that will demonstrate my problem. It is very simple and only has one line of code but requires the MoveTo Behavior http://c2rexplugins.weebly.com/rex_moveto.html

    Capx: https://www.dropbox.com/s/uymgjzilg8q3k ... .capx?dl=0

    The problem: I want the player to be able to move to the mouse's coordinates whenever the left mouse button is held down. This works fine but when I have the player move to a solid wall without stopping they will slide really fast against it. For some reason this only happens when the player is moving against a wall on the left or top side.

    If this doesn't make sense you have to try holding the mouse button on the very left side of the screen and when the player comes into contact with the wall they will slide up at great speed. Also, the reason I have the 8direction behavior is simply so the player interacts with solids. I have also tried rex's PushOutSolid behavior but it gives the same result.

    I want the collisions to be like it is in most top down 2d games where the player will slide against the wall at a normal speed and not jitter or go too fast.

  • > I'm going to have to agree with this. Construct 2 is great but exporting to mobile can be a huge pain.

    >

    > Speaking of which, I am planning on making a small Android game again... is the Intel XDK broken at the moment or will it interact fine with C2 to make Android games?

    >

    I don't export to mobile, but I've heard that the cranberry plugins are broken on IntelXDK and some of the official plugins (like iAP and such) only work on some platforms, so yeah, it's a huge mess..

    It's really sad that C3's focus doesn't seem to be about making exporting simple and reliable. I recently got Gamemaker Studio for really cheap and everyone seems to have no problems with exporting to mobile. Guess I'll have to move to that!

  • I'm going to have to agree with this. Construct 2 is great but exporting to mobile can be a huge pain.

    Speaking of which, I am planning on making a small Android game again... is the Intel XDK broken at the moment or will it interact fine with C2 to make Android games?

  • I am using the photon multiplayer plugin and everything works great except for this one problem I am having:

    When a user enters a room and has chosen the same userid (username) as another user it simply shows up as blank.

    Is there any way to check, upon entering a room, if another user already is using the same name/id so that it can set a new username for the user?

    For example, if someone with the name "Player" entered a room and someone else was already in the room also using the name "Player" I would want to have the entering user's name be Player(1). If there were two other players with the name "Player" already in the room then the third player's name would be Player(2) etc...

  • Thank you nimos100 this is very helpful.

  • Thank you and linkman2004

    I think my main problem was that I was using only one event sheet for my entire game and I would make each system too long without looking at what could make it simpler.

    One specific thing I had trouble with was a crafting system I was trying to make. I used a long string of events just to make it so the player could create one item. Could this be simplified with the dictionary or some sort of table?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I see all sorts of tutorials here about how to do specific things for a game (like making inventories and such) but I do not see any on how to make a good framework/engine. Every time I attempt to make a game that is more than 200 events I end up getting pretty lost and everything seems to turn into pointless spaghetti code.

    I realize that this requires practice but I really am unsure what the best way to make a larger than usual game would be.

  • http://i.imgur.com/bWbonsy.png

    My code for the inventory system is shown above. When I put a string into the text box it creates an object in the inventory or adds it to an existing stack. I am wondering how I would make it so that the items that I add to the inventory will be shown in slots and when I select a slot I would like to be able to discard the item.

  • for the map generation I would use a seeded perlin noise generator, in much the way you would use to create an island in 3D but just set it so if the height is greater than x the tile is land, and if it is less then x it is sea. See here. It is important to seed the generation else it wont give you an island, but instead areas of water and land in a cloud-like pattern.

    As for the trees and rocks you could use a loop while x is less than the number of tree areas you want, pick a random position. If that position is empty land, then continue, else break. Then from that position, place x trees by moving random values (within reason) in x and y and placing trees there until you have x trees in the area. The same can be applied to the rocks. As for the interaction, when the player wants to move check that its not into a rock before allowing the move, if it is, prevent the move. If the player is looking at the coordinate of the tile given +- arctan(width-of-tile/distance-from-tile) degrees and is a suitable distance from the tile then a use key should do the required function.

    I see, would I need a plugin to use this method?

  • The image above shows my game and the process that I made for creating my own randomly generated maps. I created an object that digs through the map and places tiles while randomly turning at certain points.

    The problem I am having is I would like to make a game like the picture below

    where the world is surrounded by water and has stone clusters and trees spawned in at random points on the land. When I try to use sprites I end up getting poor performance so I modified my "digging generation" code to work with tiles. I am left with no clear idea on how I am supposed to:

    1. Surround the play area with water

    2. Create clusters of stone and trees on the land that the player can interact with (this is REALLY confusing when using tiles instead of sprites)

    I understand that I will end up having to use a bitwise tile method to make each tile connect but I am confused with the map generation process that would be involved with this.

    My method was quick and dirty and I am sure there is an easier way to accomplish this.

  • Here is another example:

    Thank you I tried this method and it worked great!

    I appreciate all the help everyone.

  • I simply want to make a circle increase in size the closer a certain object gets to it.

  • Place dots on the circle like so:

    x = Position + Radius * cos(Angle)

    y = Position + Radius * sin(Angle)

    Position will be the center of the circle (your player ship)

    Radius is the size of the circle

    Angle will be the angle between the circle and the missile. To get that, use angle(x1,y1,x2,y2)

    When a missile is created, create a dot and give it a variable with the UID of the missile. Then use "pick by unique ID" to pair them. You can probably use a container instead if you want.

    The size of the dots can be based on the distance between the dot and the missile using distance() and...er...range conversion, maybe. Using just distance() will make them smaller as the missiles get closer.

    Hope that helps.

    Thank you, this is actually a lot more practical than the way I was trying to accomplish it. I will try it.

  • I want to make it where each circle around the player (on the blue circle) represents the direction a missile is coming from and as each missile gets closer each circle must increase in size.

    I've only managed to create circles that orbit around the player when a missile is near and I got them to point in the direction of each missile. I did this using a sprite that sets its angle toward the missile.

    The problem that I've run into is I don't know how to make it so that each circle is "spawned", chooses the right missile to represent, and deletes itself after the missile is destroyed. I also am not sure how to make the circle increase or decrease in size without messing up the origin.

  • I would like zombies that not only follow the player, but also break down any walls that the player builds.

    Is there an easy way to do this? I am using the moveto behavior/plugin and I am not able to make the zombies do anything except run into walls and attack the player.