CharlesL Posted July 7, 2016 Share Posted July 7, 2016 This is my first attempt at 3d programming and Babylon.js. I am attempting to make a grid based tactical system. So far, I have made this. http://www.babylonjs-playground.com/#NJZKS The current example is not very performant. Am I on the right path here? If not, can I get a bit of advice/guidance? I am mostly just trying to see if I am headed in the right direction or if I should drop and re-evaluate. Quote Link to comment Share on other sites More sharing options...
chicagobob123 Posted July 7, 2016 Share Posted July 7, 2016 I am seeing the render at 60fps, So I am not sure about the performance. What is it you are trying to do that you can not do? That is the question. Quote Link to comment Share on other sites More sharing options...
CharlesL Posted July 7, 2016 Author Share Posted July 7, 2016 Well, I am glad its running better for you. I am getting about 12fps on average on my system. What I'm trying to create is a basic turn based tactical combat game. This part was me testing out building a 3d grid. I guess ultimately I am unsure of the best direction to go. So, if that is running good for you and you don't think this could be a bad route to start with, I will continue on the path I am on right now. If, you think this is a bad way to start out I would appreciate a bit of direction towards the more optimal way. Thanks Quote Link to comment Share on other sites More sharing options...
vsh91 Posted July 7, 2016 Share Posted July 7, 2016 Hey, I tested this on a gtx 960m and it seems to be running at 60fps as well. I don't know if you have a dedicated graphics card or not, but if you are running this on a laptop with a dedicated graphics card make sure to set the browser to work with the dedicated card. Also check your power options and manually set it up to be on max performance. I don't know if you're running mac, windows, or linux, but I'm sure a quick google search will yield results. In terms of direction for a game, this is what I break it down into. {graphics && animation, game logic/design, art, music}. It seems like you're trying to create a game like Final Fantasy Tactics or Tactics Ogre. If you haven't already, I recommend you play these games and observe how they work. These games can be easily emulated using ppsspp or psx emulator. I use emuparadise for roms. Quote Link to comment Share on other sites More sharing options...
Boz Posted July 7, 2016 Share Posted July 7, 2016 Hey, nice to see you on the forum I see you decided to clone the boxes each time, apply individual parameters and merge the meshes, it seems to be a good way to keep high fps. There is an existing and interesting Babylon extension : http://doc.babylonjs.com/extensions/Terrain You can create your ground using an heightmap and apply the terrain material on it. It uses a colorMap like you did in your JSON code, so it may interest you. With this method it's interesting that you can easily add textures on your ground. Playground link you can use for your tests : http://www.babylonjs-playground.com/#E6OZX#7 Quote Link to comment Share on other sites More sharing options...
gryff Posted July 7, 2016 Share Posted July 7, 2016 1 hour ago, CharlesL said: What I'm trying to create is a basic turn based tactical combat game. This part was me testing out building a 3d grid Hi @CharlesL , Welcome to the forum I'm not sure how you are defining and using your grid, but you might want to look at this thread by @iiceman and the SPS system contributions by @jerome for creating large gaming terrains. cheers, gryff Quote Link to comment Share on other sites More sharing options...
iiceman Posted July 8, 2016 Share Posted July 8, 2016 Hi there Charles and welcome! So we are talking about something like XCOM or the (pretty old) Incubation from BlueByte? That's cool and interesting... thought about doing something like that a couple of times, too, but didn't give it a try yet. To me it looks good so far. Having one mesh instead of multiple instances seems a lot showed to have better performance if the number of blocks is high enough. The SolidParticleSystem proved to work very well for me. It uses one single mesh, too, and It can help you to identify the clicked block. If you just merge them together its harder to figure out what was clicked. Make sure to keep us updated, I really want to see how it turns out! Quote Link to comment Share on other sites More sharing options...
CharlesL Posted July 8, 2016 Author Share Posted July 8, 2016 Thanks for the feedback everyone. I'll try to implement the suggestions provided and will keep everyone updated. Wingnut 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.