This forum is read only and just serves as an archive. If you
have any questions, please post them on github.com/phoboslab/impact
I have created an easy to use library to run the impactjs engine on both the client and server. The library comes with plugin files that completely hide the network interaction. It just works.
If you have a license you can checkout a demo in the private forums:
private-forum-with-demo
This library runs a single impactjs instance from nodejs and allows clients to connect via socket.io. This would be considered an authoritative server that takes control input from the clients and therefore greatly reduces the chance of 'hacking' as well as ensuring similar behavior across all clients.
I just released the code to GitHub and am looking for feedback on it's usage. I have created a tutorial that will walk you through each part of the game creation process. As well as API documentation to the plugin classes.
You can find the repo at the following link:
impact-crater
If you have any question please post here and i'll answer as soon as possible. If you would like to improve upon the library feel free to fork the repo do your thing and submit a pull request. Enjoy!
1 decade ago
by Gamma
This looks promising. I'll test it out tonight. Is there a way to restrict how many people are allowed in a "room" so to speak? For example a 'two player' online game.
1 decade ago
by Steve90
Sounds really promising ! Could that be used on large-scale multiplayer ? Like hundreds of player at a time ?
I will take a look soon!
Quote from Gamma
This looks promising. I'll test it out tonight. Is there a way to restrict how many people are allowed in a "room" so to speak? For example a 'two player' online game.
I'm currently building a game that will have anywhere from 5-10 players in each "match". I haven't made it to the point where I cap rooms but when I do i'll be sure to document it on the GitHub wiki. The GameServer class has access to 'ig.io' which is the socket.io namespace. You can basically use that to do whatever you want, create additional rooms, etc.
Quote from Steve90
Sounds really promising ! Could that be used on large-scale multiplayer ? Like hundreds of player at a time ?
I will take a look soon!
As long as your server could handle all the connections as well as calculations I don't see why not. In the future I plan to only send data to clients as their screen size permits. That should reduce network traffic greatly and give you a better chance of hosting many clients.
I tried this and it works on my machine, but from another machine it says
"ReferenceError: Can't find variable: io" client.js:18
Seems that even though I was running it on my website, it was looking for socket.io on my localhost
Quote from stahlmanDesign
I tried this and it works on my machine, but from another machine it says
"ReferenceError: Can't find variable: io" client.js:18
Seems that even though I was running it on my website, it was looking for socket.io on my localhost
-------------------------------------------------------
This configuration is outdated refer to the README.md link below for up-to-date setup instructions.
-------------------------------------------------------
By default
index.html
checks for socket.io.js on the localhost. If you are running this from your server you will need to update this file. Refer to the config section of the readme:
README.md
In
index.html
edit the lines that have
localhost:8080
to your server's domain name. Also be sure the proper ports are available as well.
I sent you an email via this site, if you need anymore help just email me. Same for anyone else, if you need quick help with the plugin be sure to email me at cha55son( at )gmail.com and i'll answer as soon as possible.
1 decade ago
by Steve90
Finally had the time to fully test,
Really awesome work, and your documentation made it easy to integrate.
I know this is an experimental work, But It is very useful to me. Keep up the good work ! And let me know if there's any way I can donate to support in any way :)
Thanks Steve,
I recently pushed a new version that makes it much easier to get the server running and it only requires nodejs, no more need for apache. You can check out the README.md for more details on the new setup.
I'm currently building a game with the plugin so I hope to have the API and optimizations ironed out over the next month or so.
If you have any issues or feature requests be sure to open an issue on the github repo.
Thanks for your support!
cool project! i'll definitely be following it. I could use this on a few projects.
1 decade ago
by Steve90
There's one thing I'm wondering so I will ask here ;
When creating an entity we create the server side and the client side. In your example and in the demo, you spawn an entity when a client connect. So far so good.
The thing I might not understand correctly, is how to handle entities that are not players.
Let's say I have an NPC, and he is moving on the map. I assume the logics are going to be about the same as the player : Movements are controlled on server side and client show the animations. But I wonder how to actually spawn that said entity, Could I put it directly on the map in weiltmeister than the server handle the movements ? Or should the NPC be controlled server side as some kind of bot..
Maybe what I am asking is a bit vague or more related to logics rather than the library itself. But hey if anyone have any idea or directions I should take I'd appreciate hehe.
Thanks,
@Steve90,
Sorry for the delay I don't receive emails from this forum. If you want a quicker response you can email me. My email should be above in one of the earlier posts. I'll be sure to post any future topics in this forum for others.
So that's a good question. I pushed out a new demo that contains a drone that moves about on its own. Any entity that inherits from EntityServer and EntityClient will send it's movements to all clients. Player classes are a special case because I needed to setup the input,screen,etc. So non-player entities are simply an extension of the EntityServer and EntityClient classes.
NOTE: I pushed out a new release that changed things around a bit, so refer to the docs when you get the chance. I pulled the network code from the Game class and moved it into more appropriate Client/Server classes.
I hope that helps. I'll be sure to check back more often.
1 decade ago
by Steve90
Thanks for the answer !
I updated to latest version and read the docs, It works great ! Made it more clear to me now that non-player entities are spawned once at server start init.
I'll play around with that this weekend, and if I have any questions i'll let you know :)
Thanks a lot
1 decade ago
by jumper
Amazing work, thank you man.
1 decade ago
by jumper
Can you run box2d physic on the server ? I'm getting error when i try to include 'plugins.box2d.game', inside the server main.js
1 decade ago
by Joncom
As per repo README instructions:
NodeJS is installed.
I cloned the repo, then ran
npm link
in cloned directory. Looks like that succeeded, no errors.
However I run in to the following error when I run
npm install -g impact-crater coffee-script
:
Page 1 of 1
« first
« previous
next ›
last »