Juanito-cnstrct2's Forum Posts

  • Kyatric please remove "Isometric Z ordering based on Y" plugin from the list. The built-in "for each ordered" should be used instead.

    Thank you!

  • accidentallyc I guess I did not fully understand your second question. Writing plugins is not that complicated, especially if you were to write a plugin just for your game, for private use.

    Assuming you want some custom javascript code executing every game tick, your plugin could have just one C2 "action" defined in the edittime.js and then have that action be called from C2's every tick event. The runtime.js would be as complicated as you wanted to be. If it you just need a few lines of code then the JS function that gets called when the action is fired would have only a few lines of code. That code can access any C2 object instances and their behaviors and properties.

    If you want some custom code to be called when a certain event is fired, then instead of having your plugin action called on every tick, just call it when the the event is fired.

    Another way of "text editing" the C2 events is to open the event sheet files in a good text editor, but that is definitely not a supported (or good?) way of doing things and you have to be very careful (make backups!).

  • BrianOD I had somewhat the same question about mobile screen sizes here. I was pointed to a tutorial which helped me: scirra.com/tutorials/73/supporting-multiple-screen-sizes

  • accidentallyc As an answer to the 2nd question, you can in theory (although probably not officially supported) write most of the logic of your game using javascript by creating a plugin with the SDK. You can access most of C2's functionality from the javascript SDK so you could do a custom plugin just for your game that implements the part of you game you want to hand-code. So, yes, C2 does let you write code.

  • I stopped working on it because it seems that Microsoft is going to kill XNA sometime soon (year or so). They do not support XNA on Win8 on ARM and will not support it in Windows Phone 8. I own a winphone7 but do not own an xbox. Since the WP7 will pretty much be obsolote in October, I decided it was not worth my time and effort to continue working on it :( . The source code is still there if somebody want to take a stab at it.

  • Thank you both! I followed the manual article and made the layout wider as a catch-all.

  • What is the window size of direct canvas? I have a game with a 800x60 layout and exported it to direct canvas. The visible part in the iphone seems to be bigger than 800x600 because I sprites outside the layout boundaries in the iphone screen.

    What are the screen sizes for iphone and ipads?

  • Schoening yes, that is my understanding. I have not played around with the For each(ordered) condition, but it should do the job.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • wildmedia is your Construct2 layout set to "transparent"?

  • LimonSpace : There is one event in the sample file that says "every 0.07", in the sample file it sends the position of the managed player to the server. What actions do you have there?

  • Thank you Ashley!

    That explains why the Facebook API calls did not get mingled.

    I will go ahead and declare the externs in my plugin runtime.js file.

  • I noticed that the when the Facebook plugin gets minified, the FB api calls like FB.api stay the same to avoid breaking the code that calls those functions. I tried looking in the Facebook runtime.js file but I could not see any code that would instructs Closure to avoid renaming those methods. If I copy and paste the runtime.js into closure-compiler.appspot.com/home, the resulting file does rename those functions and gives warning like the following:

    JSC_INEXISTENT_PROPERTY: Property api never defined on FB at line 308 character 0

    FB.api('/me/feed', 'POST', publish, function(response) {

    I am trying to make my copperlicht3d plugin work with minification, but Closure is renaming the CL3D.xxx functions that belong to copperlicht in my code. It renames them to something like CL3D.Ki, etc. Is there anything that I am missing?

    BTW, I did read the section of exporting symbols (https://developers.google.com/closure/compiler/docs/api-tutorial3#removal) but I did not see any symbol exporting in the Facebook plugin's runtime file.

  • JohnnySheffield awesome job Johnny! I was thinking on using custim events as well in the future. You are right about making the server and client code cleaner. I will try out your plugin when I get a chance this week.

    Again, thanks for contributing your work to the community

  • itza3985 so do you want the game to show in a TV that is connected to the PC but have the controller for the game a spearate device (like an Iphone)?

    If that is the case, you could just connect an hdmi cable from your pc to the TV (if your TV supports it) and just set up Windows to output to the TV.

    As for the iphone as the game controller, you could create a separate C2 "game" that just shows arrows in the screen. Every time the user clicks the arrows, you can have the socket plugin send a message to the server running in the PC (a node.js script). Once the server running in the pc receives the message, you can have the server script send the message to the C2 game running in the PC. In that game you can just put a logic that says something like if the message from the socket starts with "L" then simulate a LeftArrow.

  • itza3985

    No, Controller is not a plugin. It is just an empty TiledBackground object that I use to hold some variables related to controlling the networking logic.

    If I understand the rest of your post correctly, you want to allow only 2 players at all times. You also want to "kick out" one player when another connects. There is probably a way of doing that, and the best place to put the logic is in the Node script (example_server.js) somewhere after "//assign number", a high level overview of the code would be:

    1. call disconnect in one of the players

    2. change the line that increments the myNumber variable to increment only if the number of players is less than 2.

    Right now, the example just allows any number of clients to connect.