ForgeableSum Posted June 29, 2015 Share Posted June 29, 2015 https://youtu.be/AC0UlH81-Zw Feudal Wars is a browser-based free-to-play RTS I'm working on. Subscribe to follow this project! Sanju 1 Quote Link to comment Share on other sites More sharing options...
enriqueto Posted June 30, 2015 Share Posted June 30, 2015 wow! incredible ForgeableSum 1 Quote Link to comment Share on other sites More sharing options...
icp Posted June 30, 2015 Share Posted June 30, 2015 Amazing! What GPU are you using?The game will be available on github?What database solution you will be using?I want to play it now ! Looks like AoE! ForgeableSum 1 Quote Link to comment Share on other sites More sharing options...
ForgeableSum Posted June 30, 2015 Author Share Posted June 30, 2015 Amazing! What GPU are you using?The game will be available on github?What database solution you will be using?I want to play it now ! Looks like AoE!For the video, I was using a modest macbook air - 1.4 GHZ and an integrated Intel HD Graphics 5000 1024 MB GPU - definitely not a gaming PC. Gaming PCs will be able to perform much better of course but I wanted to make my game accessible for even casual gamers. You'll be able to play the map editor within the month as I plan on releasing a public demo. The code isn't on git hub though - it's closed-source for now. Quote Link to comment Share on other sites More sharing options...
marcgfx Posted July 2, 2015 Share Posted July 2, 2015 I'm impressed by the amount of moving units, have you had to make many optimizations, or is the good performance due to a simplified approach? as far as I can tell, you have avoided collisions, but do avoid other static forces. I assume that pathfinding does not get calculated in every frame, to ensure the path is still the best/valid? I'm using webgl in my project too and I'm very happy with it's performance. but on a macbook it does not run as nicely as I would like, although I have far fewer moving objects. shaders and webaudio seem to be the main culprits, but the game logic also does its part. I'm still looking for ways to improve performane, maybe you have a trick or two up your sleeve ? Quote Link to comment Share on other sites More sharing options...
ForgeableSum Posted July 3, 2015 Author Share Posted July 3, 2015 I'm impressed by the amount of moving units, have you had to make many optimizations, or is the good performance due to a simplified approach? as far as I can tell, you have avoided collisions, but do avoid other static forces. I assume that pathfinding does not get calculated in every frame, to ensure the path is still the best/valid? I'm using webgl in my project too and I'm very happy with it's performance. but on a macbook it does not run as nicely as I would like, although I have far fewer moving objects. shaders and webaudio seem to be the main culprits, but the game logic also does its part. I'm still looking for ways to improve performane, maybe you have a trick or two up your sleeve ?Performance with webgl vs canvas varies so greatly that I've decided to make both modes options in my game. Fact is, a lot of older gpus aren't cutout for webgl. On older macs (like 2010 and earlier), you'd best stick with canvas 2d. The newer macs with the new integrated radeon gpus are good with webgl though. But in regards to pathfinding, I'm using a lot of tricks, including:Ray casting between the object and destination. if nothing intersects the ray, there is no need to find a path and a simple straight line to the destination is used. When a new destination is set (with the pointer), all selected units search for a path in a relative grid created on-the-fly that is only as big as it needs to be. it's approximately the size of the distance between the sprite and destination squared. each unit uses these small, relative grids to search for a path because it's a lot smaller than a grid proportionate to the full world size. if i used a grid proportionate to the full world size, forget it - I'd be limited to tiny maps and even then, pathfinding would use up 10x more memory/cpu. I set a delay so when a group of units looks for a path, they don't all look for a path at once. the first one will look for a path in 50 milli, then after 50 milli, the next, etc. this actually gives the appearance of a more natural movement in some scenarios because they don't all end up on the same path at the same time. it has the added benefit of better performance because memory can be re-allocated each time a new path is found. Units don't look for a path around objects that are moving. it wouldn't make sense to waste processing power on this because if the object is moving, there's no telling where it will be when the unit comes near it. Anyway, that's the basics. Eventually, I plan on writing a more in-depth and detailed explanation of how my pathfinding system works on my dev blog. Quote Link to comment Share on other sites More sharing options...
bangoo Posted July 13, 2015 Share Posted July 13, 2015 Incredible! Is it a phaser game engine capability to render so many sprites or it was done only due to the "pathfinding tricks" which you used? I have made the RTS scetch on Construct 2 and node-webkit:win64win32mac64 mac32 I have "bumped into" the quantity of game objects. If I have 8 formations of 480 units the FPS is normal but wnen I increase the number of formations to 20 (1200 units) the perfomance is very low. May be Phaser can re-energise my RTS sketch? Quote Link to comment Share on other sites More sharing options...
ForgeableSum Posted March 31, 2016 Author Share Posted March 31, 2016 It's definitely Phaser and Pixi doing most of the heavy-lifting. You just have to code wisely within the framework. Experiment with auto-cull. Don't use physics unless you really need to (instead, use pathfinding). Minimize the number of updates - do your game objects need to be updated every game loop (60 times per second) or once every 100 milliseconds or so? All of the tools are there, within the framework. You just need to learn how to use them :). BTW, this video is ancient. Here's an updated video: You can also play the demo at feudalwars.net. Azerion 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.