Rushino's Recent Forum Activity

  • irst one is i dont know how to make that if i collect a certain object the game will show an image saying that i won.

    Use the event 'Create objet' to create your sprite on the screen OR make the sprite invisible and show it once your player catch the object.

    w to make the game into and .exe file or put it anywhere so that my friends can play it. Big thank's for help :)

    If you click on the construct 2 big button top-left this is the construct 2 menu and it have an Export Project... you have to select Node-webkit for the desktop version (.exe) or you could use HTML5 website if you plan to put it online on a server.

  • For anything regarding payment i would suggest Clay.IO i tested it.. the downside is that you have to pay 20% to them for each transaction and have to lets the user login. So if you have your own login (like i have) this is a bit of a problem but not that much. This is nice cause you don't have to handle stuff like rating, achievements, virtual items or packages, etc. You could even make use of multiplayer rooms and stuff or select the only stuff you need.

    Like newt, your server must be secure. Its hard. I won't get into much details but there are basics stuff you need to know.

    • Login systems. Your password must be hashed with a salt also avoid giving too much infos.. like username doesn't exist or stuff like this. This can lead to a lots of problems.
    • Server flooding. You need some kind of protection against how many queries your users can send to the server. You don't want your server to hang.
    • Queries validation. This is very important! I suggest implementing some kind of STATE check on the session side. Player can't send X if not in state Y.
    • Queries auth token. Depend on your server.. mine got this already implemented, the server know which ones send queries based on a kind of session system. So if A send 123 then the server know its A and not B. But if you don't have such system you need to make your own. Basically, once your logged on the server send a token (hashed string) to the client and each time the client send a new query (to know he is logged in) you include this token in the query.
    • Enable SSL. Your must encrypt your stuff.
    • You also need to handle what happen if the query is invalid ? and question like thoses.
    • Also, NEVER put any kind of client logic except drawing/display logic. This is a big mistake.. everyone can see what you send and change the internal of your javascript.

    Like i said this is basic stuff you have to take care right now.

  • Hi guys,

    I was playing to find a simple way to create sprite buttons with the 9patch and ive got a demo up and running. You actually can resize it any size and the label will fellow. You can put any instance if you wish you just have to use the ID to identify them. (Or you could use their UID whatever). The idea was to be able to use button of any size without changing a single thing! (9patch was really useful here! thankis to Scirra for this)

    <img src="http://s8.postimg.org/gq4jsc6jp/buttons.png" border="0" />

    This enable you to make sprites button with 3 states: Normal, Clicked, Over (Active). You actually just have to include the events sheet in your stuff and put 'Button' object on your screen. That is the main object needed to create a button. I make use of containers.

    You can get the example here.

    mediafire.com

    Enjoy! :)

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • C# is one of the most popular language and really easy to use. The framework is an huge advantage for server logic so that basically why i think it rock. But well everyone have their own tastes and opinion. I changed the way i work i now go for a DRY and KISS approaxh and that enough for me.

  • You can use visual studio 2012 express.Its free! You certainly dont need to buy the pro one plus the express enable commercial use.

  • rogerfgay

    Its a bit hard for me to explain the benefits of the server itself... and sorry i don't have an easy demo i can put on.. the server itself is based on a library so you could check it out yourself its open source (Google SuperWebSocket) but all i can say is that ive never seen something smart like that for years. The dude have very high skills in C# and made probably the best WebSockets server solution in my opinion offcourse but i have experienced for like 1 year and trust me this lib kick ass. The websocket lib he did is based on his tcp lib he made himself (SuperSocket) supporting any protocol you wish. That explain why it wasn't so hard to bring the websocket protocol in it. Its based on it.

    But the way it work is amazing.. not only it have the option to use JSON (Your queries in JSON are automatically converted in objects using JSON.NET which make things easily for us) for sending and receiving queries which is a big plus for any Construct 2 creation since all work with JSON because its javascript offcourse. That why i am here btw.. the last client engine i was using was making development way too slow and probably wasn't the best tool for the job. Construct 2 was a revelation to me! But all is modular.. if you want to change how it parse queries.. no problem just create your own class that do this job. All the operations are class based. A class = one operation and the server detect it automatically.. if your query start with the prefix of the command you defined then he know which command to execute and then you have full access to the current session connected, the server, data if you wish, etc. and you can send back a response in JSON to the exact session connected. Plain and simple. You can even plug attributes to commands. Attributes are pieces of logic in C# that is executed on a class or property context. So basically they are executed before the command and after via 2 methods. Man this is pure awesomeness to work with.. do you realize how much fun making a server with this lib is ? You just have to focus on important matter and forget about the networking side of your server.. so you can focus on game logic, login system, security features via the attributes. There even a way to make connection filters.. and plug them. You can hold tiny servers in one server like a port that use SSL and the other standard without SSL. Yes it support SSL secure websocket too. If you guys really interested in making a multiplayer game with WebSockets (Which i really recommand btw.. based on my tests and experience) then you have to check out this library and give it a try. I would have paid easily a lots of money to have such a server but its open source and its not GLP licensed. However, keep in mind that WebSockets are TCP only.. there some support for UDP but its limited the standard way it work is intented to be used as TCP. On a side note, WebSockets are not only for HTML5 games.. i have used them on Android, Desktop, etc. This is basically TCP and is based on a http protocol. Its also simple to work with.

  • Alright will check it out. Will also test it on some other browser. Oh well.. look like its soon the time to format my drive lol

  • Then that may explain why it doesn't work well. I will try reinstalling java on the main system and be sure to take the 64bits version.

    Thanks!

  • Hi Ashley,

    Thanks for your reply. Nah, sorry i am rather new here i didn't tried r144.2 because it was a beta version (and i wanted something stable to start on) but to be honest i didn't know changes was made concerning WebSockets in there. Next time i will suggest code instead and have a look at the beta release first :) But thanks for your support!

  • Just want to add a note.. actually there doesn't seem to have any way to detect if a connection couldnt be established. If we fellow the draft from dev.w3.org/html5/websockets there are return codes. 1006 should be the returned code for such closure.. however the plugin doesn't allow for getting this value.

    This should do the job.. (rest of code not shown.. but easy to figure out)

    this.ws.onclose = function (evt_) {

       self.code = evt_.code;

       self.runtime.trigger(cr.plugins_.C2WebSocket.prototype.cnds.OnClosed, self);

    };

    Also i think i fixed the bug... _err must not be used directly. _err.data must be used. This is still an event like any other event of websockets.

    I worked a lots with websockets so i hope ive helped a bit! <img src="smileys/smiley1.gif" border="0" align="middle" />

  • Would be nice to have some feedback from a dev regarding this.

  • When i run a project in Chrome i get this..

    <img src="http://s21.postimg.org/j4xxlr7fb/jserrors.png" border="0" />

    Is that normal ?

Rushino's avatar

Rushino

Member since 15 Sep, 2013

None one is following Rushino yet!

Connect with Rushino

Trophy Case

  • 11-Year Club
  • x2
    Coach One of your tutorials has over 1,000 readers
  • RTFM Read the fabulous manual
  • Email Verified

Progress

14/44
How to earn trophies