Gard Posted February 9, 2010 Share Posted February 9, 2010 Hello all.. What would be the ideal language to create a game in leadwerks? C + +, Lua or BlitzMax? Ask in matter of performance. Thanks (: Quote Link to comment Share on other sites More sharing options...
carlb Posted February 9, 2010 Share Posted February 9, 2010 i would say, use the lang you happy with this will causes a fight again lol C++ is the main people will say but if you happy with Blitzmax use it lua you can use with both lang or just by it self. so best to decide your self and stick to it Quote Asus ROG STRIX B350-F GAMMING AMD Ryzen 7 1700x 32 gb ddr4 15 TB raid 5 HD Nvidia EVGA 1060GTX Win10 64bit Link to comment Share on other sites More sharing options...
Pixel Perfect Posted February 9, 2010 Share Posted February 9, 2010 The actual rendering side (the graphics) will run pretty much at the same speed using any of the languages, it really depends on what you are looking at doing between rendering frames. If you are planning lots of complicated AI for instance you probably would benefit from the raw speed of C++, otherwise any are a valid choice imho. You can of course mix and match either C++ or BlitzMax with LUA. Just don't do anything that's very intensive in LUA. There is also C# too, but I have no experience of using that, but I'm sure its an equally valid option too. Quote Intel Core i5 2.66 GHz, Asus P7P55D, 8Gb DDR3 RAM, GTX460 1Gb DDR5, Windows 7 (x64), LE Editor, GMax, 3DWS, UU3D Pro, Texture Maker Pro, Shader Map Pro. Development language: C/C++ Link to comment Share on other sites More sharing options...
Rick Posted February 9, 2010 Share Posted February 9, 2010 C++ will give the best performance, but they are give good performance. Quote Link to comment Share on other sites More sharing options...
Canardia Posted February 9, 2010 Share Posted February 9, 2010 C++ and Lua at the same time. You can do things which you find easier to do in either language, and when you need more speed for some algorithm you do it in C++. You find lots of 3rd party libraries on the internet for both too. Quote ■ Ryzen 9 ■ RX 6800M ■ 16GB ■ XF8 ■ Windows 11 ■ ■ Ultra ■ LE 2.5 ■ 3DWS 5.6 ■ Reaper ■ C/C++ ■ C# ■ Fortran 2008 ■ Story ■ ■ Homepage: https://canardia.com ■ Link to comment Share on other sites More sharing options...
Wchris Posted February 9, 2010 Share Posted February 9, 2010 Hello all.. What would be the ideal language to create a game in leadwerks? C + +, Lua or BlitzMax? Ask in matter of performance. Thanks (: Noone sofar posted differences in FPS between c++ and blitzmax or Lua. I suppose it's because there is no difference or negligible. But i would be happy to see someone prove me wrong and write samples in each language to compare FPS The language won't allow you to write bad unoptimized code and still get performance. For example, i have read somewhere that Josh pointed out we should avoid calling LE engine commands that browse lists in the main loop. What i want to say is that what will have the most influence on FPS is the way you code, not the language you use. Also, i'm currently experimenting postfilter shaders, and i can tell you that poorly written shaders can drop FPS like hell whatever language you use in main program. Quote Windows 7 home - 32 bits Intel Quad Q6600 - nVidia GTX 460 1GB - 2 GB RAM Link to comment Share on other sites More sharing options...
Marleys Ghost Posted February 9, 2010 Share Posted February 9, 2010 Noone sofar posted differences in FPS between c++ and blitzmax or Lua. I suppose it's because there is no difference or negligible. But i would be happy to see someone prove me wrong and write samples in each language to compare FPS I did a test for myself but I couldn't be sure if there was something screwy going on or not to take any notice of the results. Quote AMD Bulldozer FX-4 Quad Core 4100 Black Edition 2 x 4GB DDR3 1333Mhz Memory Gigabyte GeForce GTX 550 Ti OC 1024MB GDDR5 Windows 7 Home 64 bit BlitzMax 1.50 • Lua 5.1 • MaxGUI 1.41 • UU3D Pro • MessiahStudio Pro • Silo Pro 3D Coat • ShaderMap Pro • Hexagon 2 • Photoshop, Gimp & Paint.NET LE 2.5/3.4 • Skyline • UE4 • CE3 SDK • Unity 5 • Esenthel Engine 2.0 Marleys Ghost's YouTube Channel • Marleys Ghost's Blog "I used to be alive like you .... then I took an arrow to the head" Link to comment Share on other sites More sharing options...
Chris Paulson Posted February 10, 2010 Share Posted February 10, 2010 You'll get different answers from people about speed and whether it matters depending on how far down the road of development they are. Beleive me once you got: - Pathfinding Motion graphs/blend trees AI (FSM, HFSM, BTs) Lots of physics IK animation Lots of line picks Agent Steering Cover maps etc (all the things you need to make a half decent game) you'll start noticing a BIG difference and you'll be looking to squeeze every ms you can. There is more to a game other than shaders, pretty lights, fluffy cloads and waves... Quote Link to comment Share on other sites More sharing options...
Gard Posted February 10, 2010 Author Share Posted February 10, 2010 Thanks everbody for answers. I will do some simple tests, to see how will the FPS. Anything a post here. Thanks (: Quote Link to comment Share on other sites More sharing options...
Alberto Posted February 10, 2010 Share Posted February 10, 2010 C++ will give the best performance, but they are give good performance. Is the progamming language really that important for performance ? I mean, You code in C++ or Lua just the game logic all the rest depend on the engine There are so many other bottlenecks in an engine On the other hand I wonder wether Lua is suitable for an advanced A.I. I already asked this question in an other thread I own many AI books, all of them are written in C++ Can I port their code in Lua ? In theory yes, you can code everything just using if..than statement but I dont think it is an easy task In other words, in my opinion the choice of the programming language dpende on the complexity of the game logic rather than on performance Quote Link to comment Share on other sites More sharing options...
Chris Paulson Posted February 10, 2010 Share Posted February 10, 2010 Is the progamming language really that important for performance ? I mean, You code in C++ or Lua just the game logic all the rest depend on the engine There are so many other bottlenecks in an engine On the other hand I wonder wether Lua is suitable for an advanced A.I. I already asked this question in an other thread I own many AI books, all of them are written in C++ Can I port their code in Lua ? In theory yes, you can code everything just using if..than statement but I dont think it is an easy task In other words, in my opinion the choice of the programming language dpende on the complexity of the game logic rather than on performance There is more to AI then simple "if then" code. For example: - Cover point analyse for FP shooters.. Motion graphs (animation) Pathfinding graphs Etc etc AI for a descent FP shooter is doing a lot of maths working on a large amount of data. Speed matters! Thats why AAA titles have to run AI in mutiple threads/cell processors etc. Quote Link to comment Share on other sites More sharing options...
Josh Posted February 10, 2010 Share Posted February 10, 2010 I would not use Lua for the base-level AI, for a complicated game. I would use it to handle AI reactions and changes in behavior, but not for any math intensive stuff. For example, you might make the bot change from "sad" to "angry", but you would use machine code to handle those actual behaviors. For other less complex games, Lua will do just fine for simple AI. Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
Pixel Perfect Posted February 10, 2010 Share Posted February 10, 2010 To put it simply .... the more your game has to do in code, the more difficult you will find it to fit that in between each frame render in order to maintain a decent frame rate. This is where the raw speed and performance of a language comes into play; before you get to that point you will see no difference. Most people have relatively little or no code executing between frame renders at the moment so they see little or no difference between any of the languages. This is simply because they have not really started to tackle what is really needed in a game engine to make a game. If you intend making a very simple game then you will get away with using LUA (which at times may execute 50 times slower than C++ for example) but if you intend making a modern day contender for a FPS, RPG etc then basing your engine design totally on LUA would be impractical. Well written routines in C++ will execute the fastest of all the languages mentioned with BlitzMax and C# falling in between and LUA trailing well behind at the end. Lua can be combined with other languages successfully and used with serious engine designs but in this case it is normally relegated to a scripting language carrying out high level logic with all the clever and tricky stuff being done underneath in faster code, as Josh was highlighting above. It's all a question of choosing what is right for your game but also listening to those with experience, because unless you have been there before these things are not always obvious at the beginning but will hit you hard later on if you get it wrong. Quote Intel Core i5 2.66 GHz, Asus P7P55D, 8Gb DDR3 RAM, GTX460 1Gb DDR5, Windows 7 (x64), LE Editor, GMax, 3DWS, UU3D Pro, Texture Maker Pro, Shader Map Pro. Development language: C/C++ Link to comment Share on other sites More sharing options...
Naughty Alien Posted February 11, 2010 Share Posted February 11, 2010 ..in my game where some quite complex scenery arise at some points(30+ characters doing some stuff simultaneously, dialogues, lipsync, AI, etc)..i figured out that speed difference between Bmax and C++ practically 'doesnt' exist (it does exist but its so so so minor that FPS is absolutely unnoticable)..and it was not worth to sacrifice, clean look and simplicity of code in bmax for exchange with less than 0.2 msec speed difference i have gained with C++ .. so, in my book, I highly recommend Bmax.. Quote Link to comment Share on other sites More sharing options...
Rick Posted February 11, 2010 Share Posted February 11, 2010 It would also depend on how you write it. You can bloat C/C++ to a point where you kill any performance gains from it. I think the benefit is that you have more control over how C/C++ works and can get pretty low level on speed intensive code to make a bigger difference. You could even mix some assembly in there to get even faster results if you so wanted to. The speed you will get will come from removing any "fanciness" that C++ has and get bare bones. That part of the code will probably look pretty ugly but it will run noticeably faster than any language where you can't get lower level access. This is why everyone in the industry uses C/C++. If you ever get points in your code that become bottlenecks you can most likely always optimize it better with C/C++ than any other higher level language. On a side note I actually find C/C++ much cleaner and crispier than any language I have seen before. Something about the brackets that I love. I'm so sick of typing 'End', 'Next' at work in VB.NET it's not even funny. Quote Link to comment Share on other sites More sharing options...
Wchris Posted February 11, 2010 Share Posted February 11, 2010 It would also depend on how you write it. You can bloat C/C++ to a point where you kill any performance gains from it. That's very true Rick, the main bottleneck in performance is the programmers coding ability. I can prove this easily ... "Vista is written in C++" But ok, very skilled programmers will squeeze out more fps out of c++, but not much more that a skilled blitzmax programmer ... the problem is non skilled programmers choose blitzmax or other compiled languages because they look simpler to use than c++, they will produce slower unoptimized code and make you think it's the language fault, but it is not. Once compiled in machine code there's not a big difference in performance like naugthy alien said. Nevertheless low skilled programmers will have access to a large cut & paste library of code shared by the many users of c++, and much more help in forums. So C++ is still a language of choice. And if you want to integrate external API like Raknet or a SQL database ... it'll be easyer to find headers and help with C++, but that's not a matter of performance. The performance is boosted by the help you get. Help is important, because the more help you get from skilled programmers, the more you'll be able to produce optimized code, they will show you how to. That's the main advantage of C++. Of course Lua is not compiled, so it'll be slower, like all interpreted languages. Quote Windows 7 home - 32 bits Intel Quad Q6600 - nVidia GTX 460 1GB - 2 GB RAM Link to comment Share on other sites More sharing options...
Pixel Perfect Posted February 11, 2010 Share Posted February 11, 2010 ..in my game where some quite complex scenery arise at some points(30+ characters doing some stuff simultaneously, dialogues, lipsync, AI, etc)..i figured out that speed difference between Bmax and C++ practically 'doesnt' exist (it does exist but its so so so minor that FPS is absolutely unnoticable)..and it was not worth to sacrifice, clean look and simplicity of code in bmax for exchange with less than 0.2 msec speed difference i have gained with C++ .. so, in my book, I highly recommend Bmax.. I'd agree, there is no reason why a game couldn't be written using BlitzMax, in fact it's a good choice for people new to programming (which in no means undermines BM as it's a very capable language). The differences between C++, BlitzMax and C# are much closer. But your statement fascinates me, are you saying that you have your entire engine written in both languages and are able to run benchmark tests between them? How much processing time is taken up by your code on average per game cycle, min and max values would be a good insight if you have these figures? Do you use multithreading or any other processes devised to average out peak processing demands over multiple game cycles? You are far closer than most of us to having a completed game and some feedback on this would be really useful. Quote Intel Core i5 2.66 GHz, Asus P7P55D, 8Gb DDR3 RAM, GTX460 1Gb DDR5, Windows 7 (x64), LE Editor, GMax, 3DWS, UU3D Pro, Texture Maker Pro, Shader Map Pro. Development language: C/C++ Link to comment Share on other sites More sharing options...
Rick Posted February 11, 2010 Share Posted February 11, 2010 I was wondering the same thing. It would seem unlikely to me that anyone would write their game in 2 languages. 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.