DatapawWolf's Forum Posts

  • To avoid array-like dictionary keys, I'm current using a template like:

    LevelXGlyphYVariableZ

    Where X Y and Z are whatever values I need them to be. Honestly I'm not too keen on using the tokenat unless I have to.

    Each time a new glyphs is created, which is one at a time, I store three new keys, which are basically variations of, for example, Level2Glyph0VariableX, Level2Glyph0VariableY, Level2Glyph0VariableZ.

    To see if a glyph exists in the dictionary, I simply check if the key Level1Glyph5Variable0 exists.

    However, counting glyphs will be a pain unless, so I think when I "destroy" a glyphs, I will count the UID as zero, and while counting or going through the "list" of glyphs, ignore anything with a UID of 0. :)

    Again, thanks everyone for your input. I'm slowly getting my system converted to use a dictionary instead of an array.

    I can't wait to put my game together. In two weeks time I will be showing my Game Design club what I've finished! :D C2 has taught me much about using arrays, dictionaries, angular interpolation, and keeping my code tidy. :)

  • Would you have any suggestions for finding, say, the length of a level within the dictionary? Depending on the length, each glyph will be updated individually by their UID and positioned sequentially, with each level of glyphs in a different place.

    I also check the previous and next glyphs and change those accordingly, when one is clicked. Though I don't think it'd be too difficult based on what you've posted.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • tulamide thanks for clearing that up. :)

    Would either of you happen to have some good tutorials or examples using dictionaries? I've only had experience with vectors and arrays from my C++ classes, nothing quite like dictionaries.

  • Darn. Well, thanks again for your input. I will check in to Dictionaries and see how they work.

  • blackhornet thanks for the reply. I probably should have worded my post better: right now, I store the UID in the array I already have, along with two other variables. This is done after I create a new glyph object.

    The reason I store the UID is because I use it later to check the order of the glyphs, and to be able to remove specific glyphs based on user interaction, while manipulating other glyphs.

    I have the arrays really integrated, and this is why I want an array solution at the moment. I would rather worry about streamlining the process after I have a working version of the current system, since I came to a stop about half way in the process of converting my 2D array to a 3D one, rather than just beginning it.

  • With my project, I'm using a 3D array to store information about on screen levels.

    Each level holds a variable number of glyphs, but each glyph index holds 3 variables.

    So say I wanted the current UID of one of my glyphs using the array; I'd have it stored as:

    array[level][glyph][UID index]

    The way I have my code set up, there are a different number of glyphs to each level.

    Since the number of glyphs is random, I don't need an array height of the total number of glyphs, or one with extra spaces that are 0 and wasting space. I simply want to be able to insert a value at a specific XY, not just X or Y or Z.

    Is this possible with Construct 2? I already have the code integrated, so trying to find a way to do this is boggling my mind. :S

  • <img src="http://i42.tinypic.com/rivti1.png" border="0" />

    Here's me. As you can see, I like giving thumbs up.

  • sweet. I was actually thinking of a project combining the FF theme (graphics, movement, and combat) and making a game using the WebSocket plugin to make an online game that could be played on pretty much any device (with WebSocket and HTML5/JS support, of course). :3

  • First of all I haven't tried it my self :)

    But if you need to setup a local server you could try to see if a WAMP server can do the trick. But if that works with what you are trying i have no clue. But guess its worth a try :D

    You can get it here:

    http://www.wampserver.com/en/I'll look into it. Although I hear Node and Socket are more recommended (if more for their relative ease of use than anything else) than other servers

    once i fixed some Bugs i will make you a tutorial how to do simple multiplayer Yonda, sounds great! ^-^ I'll be looking forward to more info. :)

  • Anything? I'd be willing to work out a tutorial for others, too. Just kinda need someone to start me off on the right path. :)

  • So I've been searching around the forum to find any good tutorials on using the C2 WebSocket plugin with either Node.js or Socket.IO.

    I can't seem to find much information that details how to set up both a basic game (even just movement on-screen) and a server that a C2 game client can talk to.

    I've seen plenty of tutorials and posts around the forum from way back when there were only 3rd party plugins to handle this, but nothing recent for C2's plugin.

    Does anyone know of a good tutorial for such? I've got a pretty good idea of how to go about client-server interaction as well as basic functions such as echoing player coordinates, but setting up both the server and the client and running them locally seems a little daunting.

    If there aren't any good C2-specific tutorials, I'd appreciate some basic instruction.

    ------

    And on a side note, if I were to use either Node or Socket, which one comes across as "better"? By which I mean more user-friendly, efficient, & etc.

    Thanks!

  • Thndr that sounds pretty amazing. Thank you for the links. :)

  • Hey , any more updates? :D

  • Hah, that screenshot. I really want to test it out, now. :)

  • More I think about it, this should be stickied. Until then, bump!

    tulamide, any more tracks and/or word on your website? :) I know it's only been a short while but I still enjoy being in the loop.