valkyriegames's Recent Forum Activity

  • Hi there,

    My Question Short Version:

    What's the efficiency of using "Pick instance with UID"? Does "Pick instance with UID" simply access in to an array with an index of UID, or does it do some kind of searching?

    Long Version:

    I'm trying to make a simple mmorpg with Construct 2. The problem I am facing is that when the server (written in construct 2) broadcasts a position of a monster, the client has to find the same monster on the client side and update the client monster's position.

    Now I first tried doing this simply by assigning an instance variable called "UniqueMonsterId" that is the same in all clients (but of course UID may not be, depending on the order that monsters are created in), but the problem with this was that I had to look through all the monsters on each update to check if the monster's UniqueMonsterId was the same as the one broadcast by the server, and if it was update it. This gives me an O(n^2) complexity.

    I tried to improve it by creating a relational array which linked the UniqueMonsterId to a particular UID, so now I can use a "Pick instance with UID" to find my monster (instead of searching through all the monsters). However the efficiency doesn't appear to have improved.

    My question is, does "Pick instance with UID" simply access in to an array with an index of UID, or does it do some kind of searching? Because if it just accesses an array this would reduce the complexity down to O(1) which would be a great improvement!

    Please let me know if anyone can shed some light on to this. Without being able to figure this out, my game won't be able to have more than 10 monsters at a time without maxing out one of my CPUs!

    Thanks for your help! Cheers!

    Dengke / ValkyrieGames

  • Try Construct 3

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

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

    Thanks for those replies, they were incredible helpful. I had a look in the TMXImporter actions but couldn't find anything related to Properties. I see that they have to be accessed through system. I think this is exactly what delgado and Weishaupt were asking for too.

    Thanks man, you're just too awesome for making and providing support for these plugins!

  • Weishaupt

    What kind of "colission detection"? delgado has the same question before. My answer is -- Collision polygon is defined in c2 (sprite editor). Or... Do I misunderstand something? Do you mean some tiles can move through, some are not?

    If you could make your plugin create some c2 'tiles' with the behavior solid (the ones with an impassable property set to 1) and all other tiles without the solid property, then this plugin would be incredibly useful!

  • Hi rexrainbow, great plugin, but is there any way for the tile propertied from the map to be set to a corresponding instance variable in the "tile" in construct 2? If not, could you implement it? It'll make it easier to decide whether or not we need to perform a collision check. Cheers! :)

  • rexrainbow

    The problem is not with installing node.js, but with using dbm to install socket.io. For some reason Windows doesn't recognize it being installed even when the folder in which dbm exists in is on the build path. I've been stumped and couldn't get any further :/ No chance you'd know why? Thanks for your help though!

  • Thanks rexrainbow! I will have a bit of a play around and see how I go. Cheers! :D

  • Hi rexrainbow! This plugin works great, and the server was so easy to set up! I think I might just have to learn some python and modify it for my needs (I was going to learn python eventually anyway). Cheers mate, everything just worked so easily and well, unlike everything else I've been trying to install! Btw, what file should I edit if I want to change the behaviour of the server? Thanks for your help!

    Edit: One last thing: when I open the example file, it says that your Chat plugin is out of date. Is there a new version somewhere we should be downloading from (different from the one in the OP?) Thanks!

  • rexrainbow Thanks for the link, but I can't seem to get socketio-java working :/ It has minimal documentation and I don't know how to set it up. Any chance you'd know what I need to do?

  • Thanks Zack0Wack0 for the plugin! I'm trying to get it to work now with a Server written with Java TCP/IP sockets (I couldn't get Node.js working), but it doesn't seem to work with the socket-io plugin. So the question is: Can this C2 plugin work with Java sockets? It would be much easier for me to code everything from scratch.

    Thanks in advanced!

  • Hello again Anthony! Thank you for your comments, I enjoy the feedback that you have given :) Sorry I've taken so long to get back to you with your game, the contest finished and then I moved interstate for the Easter Break. I promise I'll get to your game soon (within the next week) and give you some proper feedback. I'm still looking forward to properly playing it! :)

    Cheers!

  • Thanks GenkiGenga!

    I'm really glad that you enjoyed it, including the challenge that it imposed! :) I have received a few comments that the game was a little difficult for some, so I'll have to find a way to slowly increase the difficulty from something easier, but I hope to work it in, in a way so that the game does continue to feel more rewarding as it is played while retaining its complexity. I'm glad you do like the level of complexity, as I quite like it too :)

    Thanks for the feedback! :D

  • Hi guys!

    Recently I finished making a musical rhythm shooter game called Music Fighter for the HBGames.org Construct 2 competition, and I'd like to invite people to have a look.

    <center>

    <img src="http://www.valkyriegames.net/musicfighter/graphics/TROPHY-Big-02nd.png" border="0">

    Edit: Judging results have been released, and we made second place. Yay! :D

    </center>

    <img src="http://valkyriegames.net/musicfighter/mockup_small.png" border="0">

    <img src="http://valkyriegames.net/musicfighter/screenshots/final.png" border="0">

    You can play my game on the HBGames Arcade here: http://www.hbgames.org/forums/viewtopic.php?f=299&t=76446

    If you liked the game, please vote for us here:

    http://www.hbgames.org/forums/viewtopic.php?f=293&t=76431

    If you'd like to learn more about my project, pleae have a look at my competition thread here:

    http://www.hbgames.org/forums/viewtopic.php?f=293&t=76265

    Let me know what you think of my entry. Thanks! :D

valkyriegames's avatar

valkyriegames

Member since 27 Feb, 2012

None one is following valkyriegames yet!

Trophy Case

  • 12-Year Club
  • Email Verified

Progress

13/44
How to earn trophies