troublesum's Recent Forum Activity

  • Although I will say the one saving grace about functions is they are the only true dynamically referable object (Called by String) in C2.. with out that functionality I wouldn't be able to create a game engine (Processor that calls a threaded function stack) or call functions across device in multipliplayer. If they can make the function names show up in intellisense with out losing the dynamic reference I would be a very happy panda

  • +1

    I would love this too. For now I'm stuck creating global variables with the same name so they show up in intellisense. Granted considering the number of functions my project has I would like to add that if this ever gets added to the IDE to nest it in a global param like fn.functionName so that way all my functions don't show up in the menu by default and clutter the list.

  • At the moment I don't believe there is an easy way to handle this. The only option for now until Ashley some how adds this (not even sure its possible in game) is to have your own web server handle player connections. (web developer would be needed)

    1- Basically create your own lobby system (website) where players select/create the room they want and then based on session whe the game loads join the selected room. This only works for games hosted on your server (web based) and not APK's as you wont be able to maintain session information. (This is what I'm doing)

    2 - Still requires a web server with single table in a database to match incoming players to their rooms via Ajax but it should work with APK's as long as Ajax is still working in game. Users wont be able to select who they play as it will always be next available but it should work. (I created this but I would prefer players be able to match them selves up with people of their choice so i went with option one)

    Others may have found another way (feel free to chime in) that I'm not familiar with but for now i think this is the only way?

  • yes.. it seams to happen for me when viewing debug items that are updated frequently. I get a huge performance hit. Its enough I can hear my fan spin up on my desktop cause the CPU is working so hard. C2 168

  • [quote:1ffx73v9]With my current method of using the C2 array my column names are C2 instance variables and so they show up in the C2 intellisense and when I change a variable name it goes through all the events and updates the name in all the places where I used that variable... with your plugin is that possible or not because you are referring to everything with strings of text?

    Is this what you mean for intellensence? You could have variables with string names that are used for referencing.

    [attachment=1:1ffx73v9][/attachment:1ffx73v9]

    [attachment=0:1ffx73v9][/attachment:1ffx73v9]

  • Yann Good lord sir... a simple "well that's kind of true but you meant to say was hash table" i think would have sufficed and even then that's nitpicking considering most C2 users aren't developers. I may as well be on reddit with a response like this. Yes all I did was mask a 3 dimensional JavaScript "object" (technically not an array for those that are in to symantecs) similar to whats available in most high level languages like JavaScript or PHP. That "object" however, which for most developers that program in high level languages, is considered and used like an array (they are practically synonymous even though not technically the same). I want people to use my plugin, not be scared away by complicated technical jargon, so they would have an option for dynamically "string" accessible 3 dimensional information which isn't currently available C2.

    I encourage you to at least try my plug in and offer constructive criticism on it before giving me a hard time for being symanteclly incorrect.

  • AnD4D

    The way arrays usually work in all programming languages is they are dynamically referable locations of memory. IE. Each level can be accessed by "string" name or variable. Imagine you create function and the first parameter happens to be the name of the dictionary you want to access (Not the key value but that actual dictionary. In C2 this currently not possible with out hard coding all possible dictionary's in advance. So you are limited to only having a single level of dynamic access which are the dictionary keys. (Notice you can dynamically access values in a dictionary but you cannot dynamically access the dictionary its self). This is the limiting factor of C2 where not being able build large complex structures like recursive functions or dynamic data algorithms (closed loop systems) like a game engine or operating system. Its just not possible.

    Using my plugin here is an example of looping through the first level of fields just as if it were a dictionary. This will loop through every key in player 1 and print his attributes. Nothing special becuase dictionarys already support this.

    [attachment=1:38izb030][/attachment:38izb030]

    But lets say I have 2 players and I want the score from each player (Each player would have his own dictionary for this. (this is simple example and I know there are ways of doing this in C2 but look at how simple it is with 2 levels of dynamic access). Instead of some grand method required I can do for each player key and get a list of the same item for each player in a single line of code. This is the power of multilevel dynamic data access and in truth is the foundation of all programming.

    [attachment=0:38izb030][/attachment:38izb030]

    There are so many benifits to this its hard to explain them all but let me give one more screen shot to help prove the point. By keeping all my data in a single location I can also debug problems much faster. Here is a screen shot of the storage container in debug view. Notice how easy it is to keep track of.

    [attachment=2:38izb030][/attachment:38izb030]

    Lastly as the plugin supports pushing and poping data as JSON objects I can send raw JSON strings back and forth via AJAX for communication with my server. And it can so much more. The problem is that since most of the people that use C2 are not traditional developers they have no idea what there missing by not having this crucial fundamental ability that is inherent to programming.

  • unfortunately no... I took one look at the array plugin and was "its like time to learn the SDK because this wont work for me" Sure enough the SDK is really easy if you have any JavaScript background (It sounds like you do) you could simply open up the array plugin and see what its doing vs what you'd expect. I have to assume its working the way its intended because im sure there are tons of people using it. It just didn't work the way I expected/wanted it to and I couldn't wrap my head around it i came up with this.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • The definition of coincidence right here. I just decided (like 3 days ago) to create 3D Array Plugin that uses a named convention system (Dynamic Storage) for the exact same reason as working with the array plugin as it is wasn't working the way i would expected it to coming from a traditional programming languages.

    The plugin is still beta but should work the way you expect. I have an example capx that I use for testing each feature that is list below. You should be able to quickly see how it works.

    Heres the plugin

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

    And heres the example capx i use to test its features as i add them

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

    A screen shot of what it looks like in use.

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

    Hopefully this helps

  • If possible the background sprite should be a repeating pattern and then use the tiled back ground sprite to place it for optimal performance. Its about the amount of work the render has do. Not really about moving objects but determining what has to be redrawn.

    This should help explain it better.

    https://www.scirra.com/manual/134/performance-tips

  • With out a capx I can only speculate but I found that if I "Create" an array/dictionary at the same time i load data to it and on the same cycle attempt to then access it from a function or any where else out side of where it was create the data is not there but if I wait 1 tick then the array/dictionary becomes globally usable. Is the array predefined or are you creating it at the time the you load data into it?

  • Just some things to note about your screen shot.. It looks like your sprites are giant. Your background is one image and your terrain is one image (from the looks of it). I found on mobile larges sprites are death. See about tiling into smaller objects if you can. There is goldilocks zone of using small sprites vs too many sprites on screen you want to keep for optimal performance.

troublesum's avatar

troublesum

Member since 4 Dec, 2013

Twitter
troublesum has 2 followers

Trophy Case

  • 11-Year Club
  • Email Verified

Progress

12/44
How to earn trophies