vee41's Recent Forum Activity

  • > create a global variable called levelno.

    > every time level is comdd 1 to levelno.

    > go to layout by name 'level&levelno.' >

    > it works in theory but i do not have access to C2 now and for a considerable amount of time.

    I probyval done through "the transition to the next level." Posted in line Lauoutname + 1. But this string lauout.

    Sorry for my bad English. Do not really know the language.

    Ugly way: If your levels are in strings, make an array where each index at level number has corresponding level name, you can use that to refer level transitions in "level+1" manner described before.

  • Great post! I`m also very interested in these topics and I`ll add one of my own: is running events in certain intervals meaningfull performance wise? Is there really any difference running a simple event everytick versus running it every 1seconds?

    Also is there perhaps an chrome addon or something that could be used to monitor performance more closely?

  • Helloe,

    I got few things that I've been wondering lately.

    I have row of cards and I wanted to implement a smooth zoom effect for them, the kind that when you hover your mouse over a card it scales that card up a bit.

    That's not really a problem, it wasn't hard to implement. The problem is that card is actually a composition of 3 objects (base, image and text). The image and text are pinned with pin behavior to certain image points in the card base.

    Now due this I have to unpin them (pinned objects don't seem to move with scaling), scale them separately and set their position every tick card is scaled.

    All of this seems a bit wasteful and overly complex. So here are few questions:

    Scale vs setsize, which should I use or is there any difference?

    Text scaling, is there a decent way to scale text up? Setsize for text object seems to enlarge the area but not the text itself.

    And more general question about performance: does this kind of scaling that is called every tick give any performance problems? I've tried avoid doing things every tick as much as possible by setting 'run each 0.5 seconds' sort of conditions on events that don't necessarily need that real-time response. Is there really much difference doing run "every tick" vs "every 0.1 seconds"?

    EDIT: Bonus question! I am planning to add a 'pushback' effect as well. when card being scaled overlaps another card next to it, that card should be pushed away so that two cards don't overlap in any situation. The 'is overlapping' just does not seem to work in this case, should it work as a trigger (when card is overlapping a card)or am I doing something wrong again? :)

  • Wouldn't floor() round down while int() would do rounding both ways? Int() would also be used to convert other types into integers.

  • owever, as David Walsh says in a davidwalsh.name/websocket, "AJAX technologies require a request to be made by the client, whereas WebSocket servers and clients can push each other messages. XHR is also limited by domain; the WebSocket API allows cross-domain messaging with no fuss. AJAX technology was a clever usage of a feature not designed to be used the way it is today."

    Great quote and great read overall!

    Websockets it is for the project then, as there doesn't seem to be any tradeoff there :)

    Thank you for your answers!

  • > ... I browsed a bit and found that AJAX plugin can do POSTs, would this be the preferred delivery method or is there something more fitting that I've missed? ...

    Socket.io. Do a Forum search for 'multiplayer' and you'll turn up a number of threads and at least two implementations of a socket.io plugin.

    That is really nice, thank you for that!

    I'm wondering this: as I understand sockets are mostly meant for real-time communication, in case of turn-based games are they the best solution? There is really no need for real-time communication as ideally everyone uses their client (whatever that might be) locally and sends in the turn file for the server to process.

    Of course I can fire up the socket connection at the 'send' phase, just wondering if sockets are best fit for turn-based games as I am not that familiar with web technologies.

    That plugin looks to be pretty much what I need though :)

  • Hiya,

    I have created a turn-based game with hotseat multiplayer option. It got me thinking, how would you go on creating a network multiplayer architecture for turn based game?

    My immediate thought was creating a 'turn file' which includes all moves player has done that turn. It would be sent to host (central server or whatever). When all 'turn files' from all players have arrived turn would execute and new turn would become available to all players.

    How feasible would this kind of solution be for construct 2? I browsed a bit and found that AJAX plugin can do POSTs, would this be the preferred delivery method or is there something more fitting that I've missed?

    Or is there perhaps easier/ more efficient way of creating turn-based network multiplayer?

    Looking forward to hearing everyone's thoughts! :)

  • Anyone? I'll try to describe my situation more:

    I have two boats. Dragging one on top of other should give it the order to attack that other ship. Like I said, picking the correct instance UID is problem in this case as both are from same family and same object type.

  • Hiya,

    I have a situation where I am drag and dropping an item belonging to family to an another object belonging to that same family. Now what I'd need is to set attribute of the object I am dragging to point at object I am dragging it to. As you might have guessed, I am having problem selecting between these two instances.

    Any smooth way to achieve this?

  • Exactly what I was looking for thank you very much! Looks like I made few bad assumptions about instance selections, your example set me straight :)

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Heya,

    I've been wondering what would be the best way to create rather simple fire spreading in my game. What I thought might be working approach is to create fire sprite that checks if it has any objects belonging to 'Burning' family near it. If anything 'burning' is within combustion range, it would create a new fire sprite on the 'burning' object.

    After some quick tests though, it seems that family variables are actually FAMILY variables, not something that is inherited to members of the family? Like I had 'bool onFire' that triggered when the member of family was lit. It worked well once, but other objects would not combust as the 'onFire' of the family is true already.

    What would be the most efficient way of doing something like this? Also, what would be best way to check for 'are there any burnable objects in combustion range'? Overlap on offset is a bit cumbersome for this.

  • JACLEMGO I did something along these lines by saving item x/y values on drag start and setting the item location back to those when certain things happen (like collisions or what ever you wish to be the cancel action). Adding animation to that shouldn't be too hard, dont take my word for it though :)

vee41's avatar

vee41

Member since 12 Apr, 2012

None one is following vee41 yet!

Trophy Case

  • 12-Year Club
  • Coach One of your tutorials has over 1,000 readers
  • Email Verified

Progress

14/44
How to earn trophies