MrGoatsnake's Recent Forum Activity

  • 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

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • 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]

  • 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!

MrGoatsnake's avatar

MrGoatsnake

Member since 5 Mar, 2014

None one is following MrGoatsnake yet!

Connect with MrGoatsnake

Trophy Case

  • 10-Year Club
  • Coach One of your tutorials has over 1,000 readers

Progress

11/44
How to earn trophies