Zack0Wack0's Forum Posts

  • Why everybody hates IE? cause it's microsoft?! or what?

    I'm using it since was added to windows (and had acces to internet)and never had any problems with it. Opera, chrome, firefox why? they are faster? allows you to open hundreds of pages at same time?

    They break standards (other browsers do too, but IE more so than the others), include new standards that are practically useless rather than following working standards, and up until now it was incredibly slow. I will withdraw this opinion on the new versions though, Microsoft are really cleaning their act up.

    EDIT: Sorry, didn't realise how many pages there were.

  • Once again, I'm unable to edit my posts, so I'll just double post.

    I've started the Physics behavior, see the really (broken) test here.

    There's a few problems currently, I also need some engine changes from Ashley.

    1. You'll notice as you click (spawning new objects) the physics processes speed up. This is because I can't get my head around the logic to make it tween properly.

    2. In order for me to continue with this, I need onDestroy functions (so I can remove the rigidbody from the box2d world) and a way to move the box2d body when the object's position and angle are changed from events. These aren't available in the engine at the moment.

  • Well, I'm unable to edit the OP, so I'll just put this here.

    Socket (WebSocket version) - Download 1

    <img src="http://dl.dropbox.com/u/551734/dev/c2/plugins/socket-websocket1.png" border="0">

    The WebSocket version of the Socket plugin works using WebSockets, a new HTML5 standard. Unfortunately WebSockets support has been dropped by Firefox and Opera because the specification was flawed, so this version only works in Google Chrome and WebKit based browsers. You can enable WebSockets by command line though, if you want to play around with it in other browsers, google it.

    Obviously due to the fact that this is a socket you need a server on the other side to communicate with. This version of the Socket plugin supports normal WebSocket servers. If you google 'WebSocket server' you'll find a server that works in a language that you like, and then you can program the server-side stuff.

    I've included an example .capx in the download. This example connects to the echo.websocket.org server, which sends back anything that you send towards it. When the 'Echo test' message pops up (at least it should if its working), that means that the echo.websocket.org server has sent back the 'Echo test' message that the socket in the example sends towards it.

    Socket (Cross-browser version) - Download 1

    <img src="http://dl.dropbox.com/u/551734/dev/c2/plugins/socket-io1.png" border="0">

    The cross-browser version of the Socket plugin is powered by socket.io, which is a JavaScript library that aims to allow real-time streaming web connections for all browsers that it can. Socket.IO first tries with WebSockets, if they're not supported then it tries Flash sockets (which are basically the same as WebSockets - asynchronous, and fast) which are usually supported by every browser because practically every one has Flash. If Flash isn't supported then it tries XHR multiparting, which is a way to make XmlHTTPRequests (ie. AJAX) stream connections. If even that isn't supported, it then tries JSONP polling and XHR polling.

    Unfortunately, Socket.IO has a rather limited amount of servers you can use. I suggest Tornadio, which is an extension of the Python module tornado. Its the module I used to write the test echo server in. The server.py file is also available in the download. You should note, that in order for Flash sockets to work, there also needs to be a flashpolicy.xml file with the server which has been included as well.

    You can see a list of Socket.IO servers here, at the bottom of the page, and there's pretty much a server for all the good networking supported programming languages (perl, ruby, python, java, etc). The default server is written in node.js which is a really nice server-sided implementation of JavaScript for server-networking, it's also using the same JavaScript engine, v8, as Construct 2 (I think..). I had to use version 0.6 of Socket.IO due to the fact that the new version doesn't work too well with Tornadio.

    I'm not too sure about Flash sockets as well, I believe that they will work however if you can't get them to work try including the WebSocket Flash (.swf) files included in the download.

    All in all, it should work nicely. I've written a multi-player game before with the Socket.IO library and I got it working in Opera. If there are any issues with this version, just post them here and I'll try and fix them.

  • Also, I forgot to mention the maximum amount of space the storage can hold. 5mb for most browsers (Chrome, Firefox, Opera, Safari, etc) and 10mb for Internet Explorer 8 - 10.

  • Thanks, I really like the new plugin system.

    I have some more ideas that I'll make:

    Box2D physics (I already implemented this in my game engine so I know what to do)

    Run time image manipulation (again, done this before)

    I also really want to help with the engine

  • Source code available on Github

    Changelog

    07/01/12

    Socket: Upgraded socket.io version. Writing a tutorial.

    19/09/11

    Sockets: Fixed to work with the API changes.

    WebSockets: Now supports the new mozilla version of WebSockets. It's probably going to screw up compatibility on the server side, but if you have a good server it should be able to work with both of them.

    Storage: Fixed to work with the API changes.

    09/08/11

    Socket: Messages are now stored in a data stack to prevent packet loss.

    Plugins

    Socket (Cross-browser version) - Download

    <img src="http://dl.dropbox.com/u/551734/dev/c2/plugins/socket-io1.png" border="0">

    The cross-browser version of the Socket plugin is powered by socket.io, which is a JavaScript library that aims to allow real-time streaming web connections for all browsers that it can. Socket.IO first tries with WebSockets, if they're not supported then it tries Flash sockets (which are basically the same as WebSockets - asynchronous, and fast - however not supported by Construct due to not being able to bundle resources) which are usually supported by every browser because practically every one has Flash. If Flash isn't supported then it tries XHR multiparting, which is a way to make XMLHTTPRequests (ie. AJAX) stream connections. If even that isn't supported, it then tries JSONP polling and XHR polling.

    Socket.IO needs a custom server. The default server is built in node.js, which is actually server-side JavaScript (and powered by the same engine that Construct uses for JavaScript). I would highly suggest using this version of socket.io, as it works perfectly. You can see a list of Socket.IO servers here, at the bottom of the page, and there's pretty much a server for all the good networking supported programming languages (perl, ruby, python, java, etc).

    If you want to use node.js (suggested), then you will need to install it and then install the socket.io module via the command line (npm comes when you install node.js):

    npm install socket.io
    

    There is an example server and client inside the zip file. You can also read the quick tutorial linked in the tutorials section below.

    Socket (WebSocket version) - Download

    <img src="http://dl.dropbox.com/u/551734/dev/c2/plugins/socket-websocket1.png" border="0">

    The WebSocket version of the Socket plugin works using WebSockets, a new HTML5 standard. Unfortunately WebSockets support has been dropped by Firefox and Opera because the specification was flawed, so this version only works in Google Chrome and WebKit based browsers. You can enable WebSockets by command line though, if you want to play around with it in other browsers, google it.

    Obviously due to the fact that this is a socket you need a server on the other side to communicate with. This version of the Socket plugin supports normal WebSocket servers. If you google 'WebSocket server' you'll find a server that works in a language that you like, and then you can program the server-side stuff. You won't be able to make a server as easily as you can make a game in construct, you'll have to put in hard code.

    I've included an example .capx in the download. This example connects to the echo.websocket.org server, which sends back anything that you send towards it. When the 'Echo test' message pops up (at least it should if its working), that means that the echo.websocket.org server has sent back the 'Echo test' message that the socket in the example sends towards it.

    NOTE: DON'T USE THIS UNLESS YOU HAVE TO. The specifications for WebSockets are very dodgy, and this is only here for people who really-must use WebSockets with a pure WebSocket server for some strange reason. The cross browser version of the plugin is much better.

    Storage - Download

    The Storage plugin allows you to store data in the browser. There are two places to store the data: Session Storage, which is available in your current HTTP session; and Local Storage which is available forever (or until the user clears there browser cache, as far as I know).

    The 'Store * data' actions take a key and the value to store. The key is simple something to remember the data by so you can use the data later. The value is a value, simply.

    The '* Storage supported' conditionals are to check whether the browser supports each storage type. You'll find a large majority of browsers that support the HTML5 Canvas support HTML5 DOM Storage, therefore any browser that can render Construct 2 games will support this plugin.

    The '* data exists' conditionals are to check whether the key has data set to something in the storage.

    The 'Get * data' expressions allow you to fetch data from storage. They take the key which is the key that you used to set the value originally.

    NOTE: This is deprecated. This was implemented as an official plugin, so there's no point downloading it.

    Installation

    Simply extract the file into your plugins directory, by default at C:\Program Files\Construct 2\exporters\html\plugins.

    Tutorials

    TODO

  • I need some help. I'm trying to make a custom sprite plugin. Every single tick I need the object to be drawn. Doing this in Instance.draw:

    this.runtime.redraw = true;[/code:16dm2ycx]
    doesn't work. Any ideas?
    Note: I looked through the source code and it should work...
  • I think a cool new feature would be to allow plugins to be made with Python. I personally prefer Python over C++ (a lot more experience in Python) and I think it would be much easier for some users to download Python rather then find a C++ Compiling Program that actually has all the required headers, libraries and what-not.

  • Still happens. I've tried all the create object functions, no go. Same error message for all of them.

  • System.CreateObject(LGPGuiWindowProfile,0,400,300)[/code:1ux2mmzi]
    Gives me the error "NoneType object is not callable"
  • Well, if python is fixed to a full extent so the game creator doesn't even need a python install, yes.

    But if the game creator still needs a python install you'll have to update because each new version is installed in a different directory.

  • You should post the error you're getting it and the code you're using.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • My friend linked me to it, no idea how he got a hold of it.

  • Agreed, this would be a useful feature.

  • Ahh, I completely overlooked that.

    Cheers.