MrGoatsnake's Forum Posts

  • this must have been an issue with the Scirra website. Everything looks fine when I visit it.

  • I don't think C2 or any other game editor will be a TRUE wysiwyg (if that is even a thing), because wysiwyg editors control static content and games are dynamic.

  • thanks spongehammer

  • For a game I am building, I am running into a couple areas where I would like to generate a UID with relative safety from collisions. In my current setup I am logging unique data about game instances (performance data from my alpha tester group) and each game played is tagged with a unique id. This logged data is beamed up to my web server via AJAX. When building the logging system, I needed a UID, and could not find a system expression for this. In a pinch to release, I ended up having my php code generate a UID (http://php.net/manual/en/function.uniqid.php) and then beam it back to the client, then the client beams that back with the game data.

    I would rather generate a UID on the client side in the game, than on my server. I have read about some algorithms that would do a decent job that I could either attempt to program in the event sheets or extend a custom object myself using the SDK (probably the way I would go). Before I do either, I wanted to consult the community to see how others have done this?

    So, how have you generated UIDs?

  • jogosgratispro, you will have to adjust some of the physics options to get it to be less bouncy. the bounciness was intended to show suspension.

  • jogosgratispro I think I got this from an arcade example, but I'm not for sure. Either way, here you go. Hope it helps.

  • Oh yeah I forgot to mention I was on latest beta.

  • volcank I have attached a .capx of a trackpad simulation. Originally I was going to do this with some trackpad boundaries represented by global variables, but it occurred to me I could do it with a sprite. Doing it relative to a sprite's boundaries means we can place the trackpad sprite anywhere on the screen and vary the size of it without messing around with too many variables.

    So this works by creating a trackpad sprite with a top left origin, just like c2's layout. When a touch on the trackpad is fired, the touch's x and y distance from the trackpad's origin is recorded. Using the size of the object, you can calculate the percentage right and percentage down from the origin on the trackpad. Then you move your cursor object right and down the same percentage relative to the.

    I have not tried this on a scrolling layout, so the math might need to be adjusted if you scroll in any direction. I believe adding the viewport x and y to the final amount down and right should account for scrolling. If I get some time this weekend, I might test and see how it works when the track pad is anchored and the view is moving around over the layout. Either way, this should get you going with the math!

    Events:

    [attachment=1:3jqialfb][/attachment:3jqialfb]

    Orgin placement:

    [attachment=0:3jqialfb][/attachment:3jqialfb]

    .capx:

    [attachment=2:3jqialfb][/attachment:3jqialfb]

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hasuak, right. Still yet it would probably be better to not have a solid at all, then have the Enemies' behavior change when overlapping. turn around, stop, etc.

    This is a problem where you have to decide if it is the sprite's behavior you are wanting to change dynamically, or the behavior of the objects interacting with the sprite. Rather than have the sprite try to accommodate all actions of external objects, have the external objects handle how they interact with the block.

  • volcank I figured you were going for a "trackpad" type functionality. when I get home from work I will try to create an example for you.

  • get the x & y of the touch in the touch area. with the x and y, you can see at what offset percentage the x & y is from the top and left of the box, and apply the same percentage offset to the target on the game area

  • I would ask myself if the price is worth the time to put all those sheets together later on down the road. I know for even my ~500 events system it would be a pain to glue all the sheets together from separate projects. Having to make sure all the references to objects and globals are in each game solution would be a mess.

    My advice would be to save yourself a lot of time and invest in yourself, not the game you building. Buy a license!

  • inanakmugan These explanations are of what it is doing, not why it is being done. So....

    I don't really care for how the default auto-runner template handles the running. Essentially this template creates a treadmill, your platforms are moving left under you, and the player is running right. These events fix the difference in speed as they move together. Similar to if you were walking on a treadmill slower than it was moving under you, you would fall off the back. Or if you were jumping up and down on it. This template manually moves you forward a bit, so you don't fall off the back.

    Here is a link to the arcade where someone posted a capx that I used in my autorunner. Instead of a treadmill, the platforms are static and only the player is moving right. No need for the "hand of god" player placement to correct the game over time.

    http://www.scirra.com/arcade/example/59 ... -runner-v2

    Here is what they say about it: "A slightly better version of the default auto-runner template included with C2. In this, the movement is switched from platform to player. So each block is static, and, after reaching the end of the map, destroyed. Basically, the number of events has been trimmed from 13 to 10, but needs to be modified so the background can properly scroll. So the final product will be about 11."

  • Looks like we have this discussion going on here as well:

  • derikvlog, why would you have solid behavior on the object if you did not want solid behavior?

    You can turn it off dynamically, but it sounds like you need more than one sprite. Ones that you can move through (no solid behavior) and ones you can't (solid behavior).

    If you really do want to ignore solid behavior temporarily you can alter the state, on the collision or some other event.

    Solid actions

    Set enabled

    Enable or disable Solid for this object. Be careful not to trap objects by enabling the solid when an object is overlapping it; see Avoid crushing/trapping objects with Solids.

    https://www.scirra.com/manual/104/solid