Jump to content

Leadwerks speed


Dalaware
 Share

Recommended Posts

Hi

Any thoughts on this which language would be the best to run the Leadwerks engine,

There seems to be quite a choice of languages

I mean really does the language affect the speed of the compiled final release program. :)

Intel Dual core 6600 2,40GHz, Nvidia GeForce GTX 285, 2GB Ram, Windows 7 Ultimate

Link to comment
Share on other sites

For the speed...you may need to try it, depends on what you are doing i assume.

AFAIK Lua will be the slowest, as it is an interpreter.

 

In general C/C++ will be the fastest, but as LE is programmed in BlitzMax, i don't

know if BlitzMax would be faster.

 

Do you have any programming experience?

(Win7 64bit) && (i7 3770K @ 3,5ghz) && (16gb DDR3 @ 1600mhz) && (Geforce660TI)

Link to comment
Share on other sites

If I recall correctly from another thread you are not a programmer, in which case I would strongly recommend LUA or (when Framewerk has been compiled in the DLL and the headers are updated) C# which are easiest to pick up IMHO.

 

Depending on what kind of game you are making I doubt you will notice a significant difference.

 

Cheers!

Link to comment
Share on other sites

If you are doing a lot of AI or other processing code, a compiled language will be needed. If you are doing something simpler, Lua will be fine. You can also use a combination of a compiled language together with Lua.

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

Hi

This is what I like about being here at the Leadweks forum the way you get prompt replies.

DaDonik: I do have a little programming experience in C/C++ /Blitzbasic but I could never get my head around OOP

the code just seams to look so complicated, but to tell the truth I have made a Pong game and side scrolling games

and small Windows tools for work, but never a 3D game, its like I have already mentioned in a previous post making the basic design

Of a 3D game where to put all the parts and then organisation of a 3D game seams somewhat daunting

I know that most people here are seasoned programmers by some of the posts I read here at

Leadwerks forum I read somewhere that Josh is writing Tutorials and I like the way he’s labelled the tutorials (Beginner and so on)

perhaps some one could write a tutorial on organisation.

Well thanks again and a happy new year to all.

Intel Dual core 6600 2,40GHz, Nvidia GeForce GTX 285, 2GB Ram, Windows 7 Ultimate

Link to comment
Share on other sites

Hi

This is what I like about being here at the Leadweks forum the way you get prompt replies.

DaDonik: I do have a little programming experience in C/C++ /Blitzbasic but I could never get my head around OOP

the code just seams to look so complicated, but to tell the truth I have made a Pong game and side scrolling games

and small Windows tools for work, but never a 3D game, its like I have already mentioned in a previous post making the basic design

Of a 3D game where to put all the parts and then organisation of a 3D game seams somewhat daunting

I know that most people here are seasoned programmers by some of the posts I read here at

Leadwerks forum I read somewhere that Josh is writing Tutorials and I like the way he’s labelled the tutorials (Beginner and so on)

perhaps some one could write a tutorial on organisation.

Well thanks again and a happy new year to all.

 

This is just my personal opinion but I would really try to get a grip on OOP. I find OOP systems much easier to develop because they closely reflect real-life. Next to that, maintenance is much easier due to the fact each piece of code does not have to be repeated anywhere and code is much more reusable.

 

Again, this is my personal opinion on the subject. I do not wish to engage in a flame war over which language is best :(

 

Cheers!

Link to comment
Share on other sites

I think it's good to learn C++, because then you can do anything, and you can use it at the office too. Just don't make the mistake and learn old C++ (with pointers and new/delete operators), but learn the new C++ with references (instead of pointers) and STL (to replace pointers and new/delete needs) and Boost libraries.

  • Downvote 3

Ryzen 9 RX 6800M ■ 16GB XF8 Windows 11 ■
Ultra ■ LE 2.53DWS 5.6  Reaper ■ C/C++ C# ■ Fortran 2008 ■ Story ■
■ Homepage: https://canardia.com ■

Link to comment
Share on other sites

@Lumooja, pointers aren't old C++, they are C++. C++ gives you the power to decide which memory you want to use, stack or heap.

I would like to see how STL could replace pointers? They have smart pointers which you don't want to use, but STL is for data management.

I agree on using boost, I'm still waiting until it's STL standard!

Link to comment
Share on other sites

C++ gives you the power to decide which memory you want to use, stack or heap.

 

The nice thing about the day we live in is that we generally don't have to care about where stuff is stored, which is personally the way I like it. But I agree that it is nice that it gives you the opportunity to care for those times when it goes matter.

Link to comment
Share on other sites

I always thought it would, but I guess if you are creating and freeing it properly, it may not be noticeable. Though, I always was curious how the heck ANY game ends up with so much **** on the screen with decent frames.

52t__nvidia.png nVidia 530M cpu.gif Intel Core i7 - 2.3Ghz 114229_30245_16_hardware_memory_ram_icon.png 8GB DDR3 RAM Windows7_Start.gif Windows 7 Ultimate (64x)

-----

IconVisualStudio16.png Visual Studio 2010 Ultimate google-Chrome.png Google Chrome PhotoshopLinkIndicator.png Creative Suite 5 icon28.gif FL Studio 10 MicrosoftOfficeLive.png Office 15

-----

csharp.png Expert cpp.png Professional lua_icon.png Expert BMX Programmer

-----

i-windows-live-messenger-2009.pngskype-icon16.pngaim_online.pnggmail.pngicon_48x48_prism-facebook.pngtunein-web.pngyahoo.giftwitter16.png

Link to comment
Share on other sites

Combine the power of C++ with some optimization and this is what you get. There are two problems with this:

1) Most of the time ppl just use the wrong container, method, ... to do things. How often do I hear someone using STL lists where a simple vector would do, or use algorithms to handle a container while the container has method to handle the same thing! The most ridiculous thing I ever heard were people wanting to write their own "vector container" because it didn't had a method they needed, which could be done with a for_each loop.

2) Some people reading optimization tips say: "hell, I didn't do this, let me change that". This often results in minimal performance gain, and total unreadable code. Premature optimization is the root of all evil!!! You should write your code until it works, profile it and handle bottleneck by bottleneck. I once remember we profiled some educational engine, and the most used method taking the most CPU time was an Exists() method of the bitmap class. But again, this only took 1% of the total CPU time, most was drawn inside windows' GDI rendering.

 

C++ isn't easy, you need to do everything by hand. Yes you need to write your own assignment operator and copy constructor or disable them if you don't need them, yes you need to encapsulate, yes you need to check for memory leaks, yes, yes, yes... What I often do with some code that is really important, like for example resource handling, is writing my code until it works, let it rest one or two days and take a look at it again. This takes time, so I don't afford to do this for everything. But I must say it helps in my case.

Link to comment
Share on other sites

Boost libraries make something easier (like reference counted pointers and stuff) but those come with an incredible cost. If you keep using boost::shared_ptr you will get an enermous slow down in your system perofrmance. But if you use intrusive pointers (boost::intrusive_ptr), it will give you the fastest code that you can have in any language (with a big cost of extra coding). C++ is the most direct way of handling the memory and hardware, but because (on the contrary to popular belief) nothing is automatic on hardware, you have to deal with most things by yourself (like collecting your garbage). This would bring you some extra effort, but your app becomes in the fastest possible way. I am a skilled C++ and C# developer, and I can say that if you are seeking for performance, you have to go as far as you can from the framework based business (like C#, Java or VB.Net). Even Delphi would be a lot faster than C# because it has direct access to the LW DLLs, there is no framework or extra layers, managed code sh*t or so. But if you are a beginner or if you don't want to write longer, then you will have do with what you get from the managed code (either slow or even more slower).

  • Upvote 1
  • Downvote 1
Link to comment
Share on other sites

I generally agree. I think the problem just now is most people don't see a problem in performance because very few are pushing their game engine in any way. Once people have large amounts of NPCs, path finding and AI running against them they will start to realise just how precious those few milliseconds become per frame loop and how much more important optimisation and efficiency are. It's not till you get to these points that you start to appreciate the difference between languages.

 

Multithreading and the ability to divide work across game loop iterations becomes important too as mechanisms to maximise use of the available CPU time without slowing the frame rate. I also agree with Theo's method of combining good coding practice with profiling, this is one of the most effective ways of streamlining your code.

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

But if you are a beginner or if you don't want to write longer, then you will have do with what you get from the managed code (either slow or even more slower).

 

If you are speaking directly about game dev then yes, but if you are talking strictly just development of any kind, .NET & Java will provide more opportunities than C++ will. The business world has gone mad for them.

Link to comment
Share on other sites

Pixel Perfect is speaking the truth, most people don't mind about the performance. Only the old people like me remembers those good old days when performance was the key of a successful software engineering project :unsure: I am writing code for 21 years. I have started to C about 20 years ago and I have used almost every popular language on the market so far. Nowadays people care about the visibility most. I can't say I blame them, because (for example) if an engine is faster but it does not produce better results will not be preferable.

 

But the popular concern "C# or Java provide more than C++ does" is not completely true. C# may only provide a less coding interface, but your result may be like Windows Vista if you don't be careful (tons of eye candy but requiring 1GB of RAM for displaying a start menu in 10 minutes) which will definitely have to be replaced with an alternate version. C++ gives you direct control of hardware, which is indeed harder to manage but much faster and incomparably customizable.

 

Rick is speaking the truth too, different kinds of development may need some other type of development tools (rapid application development, mobile development, etc.). Also with an alternate language to C++, if you can use some other things (like multi core execution, math-co processor, etc.) you may get rid of the disadvantage of using framework stuff. In this case, your app may be much faster than a traditional C++ program. Anyways, I will continue developing my projects in C++ :)

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...