Mipey's Forum Posts

  • Possible, yes. Not with Timescale, no. You'd have to come up with your own engine that allows time manipulation. It would have to fulfill these conditions:

    1.) A way to record all actions.

    2.) A way to manipulate all objects in a way these actions can be reversed in all regards.

    3.) A way to scale animations with the 'time'. Slow animations down, freeze, reverse etc.

    All of the above has to be very accurate; a slight disrespectancy can throw the whole game off its hinges.

  • +Always

    Rotate Ship toward MouseX,MouseY by anglediff(Ship.Angle,angle(Ship.X,Ship.Y,MouseX,MouseY))*timedelta degrees

    You can influence the rotation amount, if the above equation doesn't satisfy you.

  • First off, you will need a timer. Add a private variable, name it 'timer'. You will also have to store original coordinates.

    + On Left Click

    + Square('timer')= 0 // this is to make sure the object isn't already moving

    Square('OrigX')=Square.X

    Square('OrigY')=Square.Y

    Square('PointX')=MouseX

    Square('PointY')=MouseY

    Square('timer') = timedelta // this would initiate the move

    + Square('timer') larger than 0 and smaller than 1 // while moving

    Square: set position to X = lerp('OrigX','PointX','timer'), Y = lerp('OrigY','PointY','timer') // linear movement between the two points

    Square('timer') = 'timer' + timedelta // increasing the timer will make it move along the line, up to value of 1; this influences the speed, so you probably want to use a fancy equation to move at set speed. The value should be between zero and one.

    + Square('timer') equal to or greater than 1 // the square is at or exceeding the goal

    Square: set position to 'PointX', 'PointY' // this is to make sure it is at exact position, in case of overshooting

    Square('timer') = 0 // this basically stops and waits until you click somewhere again

    This may appear more complicated than the prior example, however you are at a liberty to define the movement pattern. For example, you could use various interpolation methods. This is the most robust method that makes sure the square reaches the EXACT location.

    As for the set speed, you'll have to increment the timer in a way it matches the desired speed. I think multiplying timedelta with desired speed should do the trick, but don't quote me on that.

  • I see, you just want to pick structures within Blue family... Hmm.

    Well, personally I prefer private variables when it comes to situations like this, because this allows me to switch them around (like capturing a building, which would then from reds go to blues).

    So, if you gave your structures a private variable, say 'Faction', you'd just do it like this:

    + Structure('Faction')="Blue"

    + Structure: Pick closest to MouseX,MouseY

    Drop a stink bomb onto neighbour's doormat

    Basically it first selects the structures that belong to Blue player, only then it selects the one closest to mouse. Hope this helps.

  • + On Mouse click

    + Blue: Pick closest to MouseX,MouseY

    Punt the garden gnome

    I'm not really sure what you describe, but if you want to pick the closest member of Blue family to the mouse coordinates, that is the way to go.

  • Hahah, they got trolled!

    <img src="http://driph.com/words/wp-content/uploads/2008/05/awesome.gif">

    I'll leave the meaning of that smiley to you

  • As a suggestion, add smoke (additive rendering, gray/black, negative gravity). See if that makes it any neater

  • Just split the game map up into "sectors", whenever the player enters a sector, shift layout coordinates to use that sector as the center.

    Example:

    Player is at 400,400

    Sector A1 is at 0,0, spans 500 pixels in both directions

    Sector B2 is at 1000,1000

    Player crosses coordinates 500,500, toward sector B2, the game engine shifts coordinates; Sector B2 becomes 0,0, while Sector A1 becomes -1000,-1000 and the player is teleported. May notice a slight stutter during teleport. However, typically sector shifts should occur when the player is in transit and there is nothing else on the screen (he's in open space far away from any landmarks), so there wouldn't be any pause.

    Alternatively, set the player at 0,0 permanently - and shift the game around him as needed. That would mean manipulating coordinates in relation to the player. Too much of maths.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • That is an image, you cheater.

  • Aww those are adorable animations!

    Noticed a bug - when you place a bomb next to two cabinets, only one exploded. Had to place another bomb on the same place to open another cabinet.

  • For starters, try the template projects (New -> New template / example). Also look for Deadeye's platform tutorial somewhere on these forums. There are a few more tutorials, too, you can also check examples out.

    But most importantly, experiment by yourself.

  • Waypoints should act as nodes, you'd have to store coordinates as well as names of waypoints it is directly connected to. So when you look for a path, you can solve through each waypoint's neighbours, iterate until you find the goal, then use the shortest path.

    As for your question, multiple map pieces are better than one large map. The 4000x2000 would use up 4096x4096 pixels in video memory, which is 16 MB. If you break it down into 1024x1024 pieces, you can use eight of them, each is a megabyte, thus you save 8 MB memory. Moreover, only one of them would be rendered at a time (if you use 1024x768 resolution), so it would be faster to load and render.

  • Well, that is a more complex topic, I am afraid. Depends on what you want to achieve, but you'll have to implement basic routines such as go-to.

    Simplest solution would be to use a waypoint system, create one waypoint in each room and corridor, visit each and remember the visited until the bathroom is found, then remember the waypoint (and quickly calculate the shortest path and use that in the future).

    Have fun!

  • It has been nearly twenty days since the last post. What is the status of S plugin? Is it considered finished? Can it be used for some serious stuff now?

  • Seriously, it is not because the language that most projects experience performance issues... It is how efficient your code is. If you choose to spawn thousands of sprites on the same screen, all rendered with several 2.0 pixel shader effects, then not even the most core language is going to help your appetite.

    Keep developing games, with time and experience you will learn to optimize your code to get the most from any engine that you work with. Most of those optimizations are engine independent, by the way - they are basic programming principles taught in schools.

    Among the reasons for low performance, choice of the core language (whether interpreted or compiled) amounts for a very small part of it.