Jump to content
SubSpace Forum Network

Recommended Posts

  • Replies 391
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted Images

Posted

Kaas!, Do some googling first for fuck sake.

 

You don't get to use sockets. Only way to use real sockets in this context is to use a signed java applet.

 

WebSocket is a protocol on top of HTTP.

It starts of by doing a proper HTTP 1.1 request (Upgrade: websocket).

The server needs to reply with a HTTP response (which includes a hash of a key the client supplied previously to show it supports the protocol).

After this, both client and server may send data when they feel like it. The payload data (the stuff you send from the browser/server API) is contained in a websocket frame with some header information. The payload data is even XOR'd with a randomized masking key to prevent poisoning of intermediate proxy servers.

Posted

Why would anyone want to jump to a weak typed language and horribly confusing (to some, including me) object oriented structures, while java works just fine on all platforms? 'But then it's in a browser' doesn't sound a valid statement to me.

 

I don't have anything against javascript and HTML for GUI related things or to some extent business applications (for basic CRUD operations), but to write & debug entire games in javascript would be the equivalent (to me at least) of walking 100 km (or miles if you prefer) barefoot on sharp rusty nails.

Posted (edited)

I have a lot of experience in a lot of languages and javascript is one of my favorites. I prefer it over Java (depending on the type of project of course).

What most people hate about javascript is not actually because of javascript. Its the horrible browser API (mostly in old browsers) and crappy tutorials.

I usually only write javascript for web servers and very recent not-IE browsers.

My only real annoyance about javascript is the lack of 64 bit integers.

 

I use javascript servers (node.js) which is absolutely great for web applications (share code with the browser, event loop instead of forks or threads, DOM instead of a stupid print(), nothing blocks: everything is event driven, etc)

Debugging is incredibly easy. And more powerful than most debuggers I have come across. You can do things such as temporarily overriding a function on 1 object, or all objects of the same type.

Edited by JoWie
Posted (edited)

personally, i think doing it in javascript sounds like a terrible idea

however, i havnt done anything in javascript since ppl still used tags on the internet

$0.02

 

.

Edited by Cheese
Posted

Haha, we had an intern that actually still used . But yea thats is not the kind of javascript I am talking about.

 

Oh btw, the next (official) Command & Conquer is going to be in javascript

Posted

I use javascript servers (node.js) which is absolutely great for web applications (share code with the browser, event loop instead of forks or threads, DOM instead of a stupid print(), nothing blocks: everything is event driven, etc)

Debugging is incredibly easy. And more powerful than most debuggers I have come across. You can do things such as temporarily overriding a function on 1 object, or all objects of the same type.

 

 

 

Node is great, spent a lot of time with it this summer as we're using it while we move our prototypes into production -- took a *lot* of getting used to but the responsiveness of the applications is staggering. I'm still not sold on a browser based game, not yet at least but if it can be done then properly it certainly has many advantages. Are you planning on using Node for whatever it is that you're doing?

Posted

Node is great, spent a lot of time with it this summer as we're using it while we move our prototypes into production -- took a *lot* of getting used to but the responsiveness of the applications is staggering. I'm still not sold on a browser based game, not yet at least but if it can be done then properly it certainly has many advantages. Are you planning on using Node for whatever it is that you're doing?

 

Yes, node.js is what I would want to use. The performance is indeed amazing. Apache and php are so slow under heavy load. Some people are even using node.js as a loadbalancer.

 

Its more a proof of concept kind of thing. To show that its possible to write such real time games (and not another silly text rpg) in a browser.

And with proof of concept I mean, try to resolve all issues. But do not build a full game (or at least, initially).

I have not yet completely decided I am going to do this however.

 

The hackability/modability for zones would be so tremendous. Its like every zone would send its own continuum version to you.

Note that it would still be possible to have a stand alone application (~17MB)

 

Here's the C&C browser game I was talking about:

Posted

There is however the option to have a bridge applet (Java or Flash) that does the UDP communication, which can be called from the JS.

 

Javascript as a language isn't too bad, you can achieve a lot of functionality, even pseudo.class based stuff. (like super() and inheritance).

 

Hacking would be an issue.

Posted (edited)

I think UDP only works in flash when you are inside an AIR application.

It is possible to interact with a signed java applet (user gets a big security warning) to do UDP, but that would defeat the purpose of the experiment (just run jabjabjab's client in an applet).

 

You don't absolutely need UDP though. It is probably possible to achieve the same latency (at the cost of more bandwidth) with TCP socket(s). Which is of course one of the things I want to find out.

Edited by JoWie
Posted

This reminds me a lot of http://jsc.sourceforge.net/ (especially this example: http://jsc.sourceforge.net/examples/web/ThreeDStuff/Tycoon4.htm) , the demo's surely are impressive, I wonder why it doesn't have a lot more attention. I haven't used it myself though, so there might be some serious limitations, but parsing IL in javascript is rather cool nonetheless :)

 

Anyway, I'll stop now about javascript because this is getting off topic :p

Posted (edited)

Ah, I thought that API was only available to AIR.

 

Subspace does things such as acknowledgment, retransmission, etc manually.

This is disabled for a few packets (balls, turf, position without weapon, green sharing, points). For such packets, the latency would at a minimum double over TCP. For other packets the minimum latency would be the same.

I think that doubling the latency for such packet would not matter a whole lot.

 

The biggest issue is that when packetloss occurs, all other packets have to wait. This is because TCP maintains the proper order. You can workaround this by opening multiple TCP sockets and alternating between them. (the default connection limit for firefox is 200). Same amount of data, just more sockets.

Edited by JoWie
Posted

http://i559.photobucket.com/albums/ss31/XDreamersMS/3D_artwork/IceTest3.png?t=1324227458

 

 

http://i559.photobucket.com/albums/ss31/XDreamersMS/Continuum/Aphelion/Aphelion_Sprites/CrystalBlue.png?t=1324230638

Posted

The graphics have been done in html5 before (and it performed well), the issue was/is getting the networking right

Networking got sorted out. We played together with around 16-20 players and it worked fantastically. Of course, this was like last year. =P
Posted

The graphics have been done in html5 before (and it performed well), the issue was/is getting the networking right

Networking got sorted out. We played together with around 16-20 players and it worked fantastically. Of course, this was like last year. =P

Yea I have played it with networking too.

But weren't you talking about lag issues? And how does it stand against cheats?

Posted

The graphics have been done in html5 before (and it performed well), the issue was/is getting the networking right

Networking got sorted out. We played together with around 16-20 players and it worked fantastically. Of course, this was like last year. =P

Yea I have played it with networking too.

But weren't you talking about lag issues? And how does it stand against cheats?

"Networking got sorted out. We played together ... and it worked fantastically."

 

I'm just a player, not a developer.

Posted (edited)
Whats the point of this, subspace would not be enjoyable on a phone, and no one would be any good at it. Resolution too small, bigger resolution then everything is way to small. Probably laggy as hell connecting from a phones wireless etc. So hopefully there are more uses for this than just an android or iphone app. Edited by Avast

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...