Crisu83

Members
  • Content Count

    13
  • Joined

  • Last visited

About Crisu83

  • Rank
    Member
  • Birthday 08/28/1983

Contact Methods

  • Website URL
    http://crisu83.me
  • Twitter
    Crisu83
  • Skype
    niskachristoffer

Profile Information

  • Gender
    Male
  • Location
    Helsinki, Finland

Recent Profile Visitors

1360 profile views
  1. Hello everyone, I wrote an ES6 RenderGroup class based on the research by @Krummelz (thanks) that allows sorting of all children recursively, simply create a new RenderGroup as your root group and set it as the parent to each of your groups and it will apply the sort to the group and all of its child groups. https://gist.github.com/crisu83/f13ec7ad0de9273480de Hopefully you find it helpful.
  2. I bought the book, haven't read it yet, but I will as soon as I have some extra time. Will return with my feedback as soon as I have some.
  3. I'm going to wait a bit with persistant storage, but once I do implement it I'm quite sure I'll go with Mongoose, because it's my favorite nosql library. The idea is to have a world where each area is a separate "room" that the clients can connect to. Once the client joins a room it will start receiving data about entities in that room through that rooms socket stream. I will see if I need to optimize it by implementing an "area of interest", I doubt it - but we'll see. I just now pushed entity prediction and server reconcilation together with a simple game loop for the rooms. Next on my todo list is entity interpolation, but it requires a bit more research as I'm not yet sure how to implement it properly. EDIT: I'm still working on simplifying the server reconcilation and preparing for entity interpolation.
  4. Here is a link to what I'm currently working on. https://github.com/crisu83/dungeon-game/tree/feature/authorative-server The sync isn't done yet but I'm getting to the point where I can implement it.
  5. First of all I'd like to say that it's awesome that this thread was featured on Phaser.io. Thanks for that Rich! After having read all the resources linked here plus many more I don't think what I'm building is a too big challenge, but it remains to be seen. I'll spend a bit more to see if I can get the infrastructure to work (server -> clients), if not I'll think of something else. Here's a few projects form Bonsai Den which you can use directly or use as a reference: - https://github.com/BonsaiDen/NodeGame-Shooter - https://github.com/BonsaiDen/Maple.js
  6. Thanks for this link, especially the example code found in the demo was quite useful and helped me to understand how to structure my logic on both the server as well as on the client. I'm not done yet but I will push it to my project on GItHub once I get everything to work. I'm now working on a bare-bones solution with as little logic on the server as possible just as lewster32 suggested, so no physics on the server for now at least.
  7. You are correct. I also think that doing only what's absolutely necessary on the server is the right approach in my case (any probably also in most cases). I want to prevent all possible networking issues possible before even bumping into them, what you said about synchronization made me re-think my approach. Do you have any example on such a simple game server? Also, how would you handle client-side only changes to position like shockwaves pushing back objects, would you allow the client to actually tell the server the new position of all the objects or? Am I making any sense?
  8. After reading your feedback I decided to remove phaser from the server (you can see the feature/simple-server branch). I did some more research on this and came to the conclusion that I will write a simple game engine for the server that sends periodic updates to the client and use tweens to counter network latency issues and packageloss. I'm not yet sure which physics engine I will use but I will do some research on that but right now I'm leaning towards P2. I also looked into existing game engines that runs on-top of Node.js but I didn't really like any of them. If I were to use a ready-made engine it would need to be actively maintained and enable me to use Phaser on the client, because that framework is just brilliant. Thanks for all the feedback, you have been a great help.
  9. This is exactly what I am looking for. Thanks for the tip about using p2 directly, makes sense. Did you try other physics frameworks? And yes, I'm looking at realtime updates as I'm working on an action rpg.
  10. Considering everything discussed in this thread, does anyone have any ideas on how to implement the required functionality on the server. The reason why I'm asking is that I still will need to implement this in my project. Or, would it be possible to simplify this and just maintain the state of the game objects (position, velocity, etc.) on the server and communicate that state to all the clients when something changes. This would mean that the server would just track the current state of the objects and not run any game loop itself. Does this make any sense?
  11. I agree on what you are saying but as far as I can tell Phaser's physics systems can already be used with custom objects. Maybe one solution would be using Phaser physics on the server with custom objects? This would be a great start because physics and utility classes are pretty much all we can use from Phaser on the server.
  12. This was pretty much the answer that I was expecting. However, it would be great if we could get a build of phaser that can actually be loaded on Node.js so that we can build my own system on the server using Phaser classes. Right now we cannot require the library because all builds depend on things that are not available on Node.js. Any thoughts on this? Does it sound like an acceptance solution.
  13. Hello All, I am working on a multiplayer action role playing game and I am using Phaser on the client because I just love this framework. Here is a link to the project on GitHub: https://github.com/crisu83/dungeon-game/tree/feature/phaser-server I have been experimenting quite a lot with running Phaser in headless mode on the server and I managed to get it to run with a few hacks. I am not sure that it is a good idea to run Phaser on the server, but I am looking into this because I would prefer to have an authoritative server that runs on the same code base as my clients. Here is what I did in order to get Phaser running on the server: First I installed the latest stable version of Phaser through NPM by running the following command: npm install http://github.com/photonstorm/phaser/tarball/v2.0.5After that I installed the dependencies for Node Canvas, instructions for that can be found in the project wiki on GitHub: https://github.com/LearnBoost/node-canvas/wiki Next I installed node-canvas and jsdom through NPM. These modules are required in order to "fake" the document, window, canvas and image objects that Phaser depends on that all are available in all browsers, but not on Node.js. npm install jsdomnpm install node-canvasThen I wrote this wrapped module for Phaser: https://gist.github.com/crisu83/5857c4a638e57308be4f I know that this is a ugly hack, but it at least lets me run Phaser on the server. Here is what the server currently outputs: I am now wondering if I should attempt to make changes to Phaser itself to not rely on the document, window, canvas, image when running in headless mode and create a pull-request for the changes. I am sure it will not be easy to remove all those dependencies, if even possible. Does anyone know if Richard has any plans for this? Does this even make sense to run Phaser on the server? Please share your ideas and feel free to use my code for your own projects. Thank you for reading.