Juanito-cnstrct2's Recent Forum Activity

  • 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.

  • 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.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • 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.

Juanito-cnstrct2's avatar

Juanito-cnstrct2

Member since 26 Apr, 2010

Twitter
Juanito-cnstrct2 has 1 followers

Trophy Case

  • 14-Year Club
  • Email Verified

Progress

15/44
How to earn trophies