Some of your examples are more trivial than others, but yes I'm starting to see what you mean; a lot of work sidestepping a non-issue. Fair enough. I count myself lucky that I need none of the functionalities listed in my games' designs (yet!)
Optimization Stuff
Re: Optimization Stuff
Re: Optimization Stuff
https://github.com/a327ex/BYTEPATH
This game is made with love2d, is reasonably-scaled and use garbage collection.
Lua is slow because it's a scripting langage, if you want speed and manually manage memory you should use C.
Re: Optimization Stuff
You didn't understand my message, it's a reasonable scale love2d game.
Lua is a scripting language, it's slow by design, if you want something more powerfull use Unity or directly C / C++.
For you what is an example of a reasonably scaled game ?
-
- Party member
- Posts: 543
- Joined: Wed Oct 05, 2016 11:53 am
Re: Optimization Stuff
Perhaps it's splitting hairs, but I wouldn't consider lua to be slow by design, but rather by its implementation. You could write a C compiler that outputs very inefficient stuff, or even just gauge the difference between vanilla (5.1) lua and luajit.
Re: Optimization Stuff
We can't just say that "Lua is slow by design" or "C is fast by design". There is a lot of work involved to make something fast, from the highest to lowest levels, from compiler developers to game developers. And being fast is not the only relevant thing; in fact, most of the code written has probably no interest in being fast (or faster, everything is relative). Also, although the language in itself leads the implementation, only the last is actually doing something and can be fast or slow (edit: beaten by the previous post).
A large scale game is first a complexity issue, not necessarily a performance issue. Lua will probably make things an order of magnitude easier in that regard. Furthermore, it's not about using Lua or C/C++, we can use both; the level of interoperability that Lua has with C (especially with LuaJIT) allows to implement in lower level languages the things that require low-level optimizations.
Using only C as the basis to make anything just because of performance concerns is probably nothing more than an irrelevant optimization. There are probably more advantages in using only C because of its ubiquity and proximity to the machine/OS, e.g. the Linux kernel.
A large scale game is first a complexity issue, not necessarily a performance issue. Lua will probably make things an order of magnitude easier in that regard. Furthermore, it's not about using Lua or C/C++, we can use both; the level of interoperability that Lua has with C (especially with LuaJIT) allows to implement in lower level languages the things that require low-level optimizations.
Using only C as the basis to make anything just because of performance concerns is probably nothing more than an irrelevant optimization. There are probably more advantages in using only C because of its ubiquity and proximity to the machine/OS, e.g. the Linux kernel.
- zorg
- Party member
- Posts: 3465
- Joined: Thu Dec 13, 2012 2:55 pm
- Location: Absurdistan, Hungary
- Contact:
Re: Optimization Stuff
By that metric, Valve's Portal is not a reasonably (large) scale(d) game Unless you start including graphical transforms and shaders, which Bytepath does do as well, regardless of the "core gameplay" being an asteroids clone.
Me and my stuff True Neutral Aspirant. Why, yes, i do indeed enjoy sarcastically correcting others when they make the most blatant of spelling mistakes. No bullying or trolling the innocent tho.
Re: Optimization Stuff
I'm working on a city builder in the style of the impressions classics (Pharaoh, Caesar ...), I can support reasonably big maps and have hundreds, maybe thousands of active objects already. I implement optimized code from the get go where I know it's going to be mandatory anyway but I also have some ridiculously unoptimzied and still heavily used code like the rendering of every single image (sprite, tile, text glyph etc.) which I know I can easily make twice as fast as it is - I just haven't decided on a final rendering system.
The game is still single threaded, I have the jit compiler turned off and yet it works surprisingly good on my system with a CPU that's almost a decade old. I don't create a lot of unneeded garbage, but I also don't stop the collector.
Todays systems are just crazy fast, you have a hard time wasting all that power with simple games done 35 years ago on homecomputers 3-5 orders of magnitudes less powerful than what we use today. Heck I'd say, given the general required skills and content production capacity as available, you should be able to make a game like Skyrim with Löve these days.
Re: Optimization Stuff
Sounds promising. Can you say exactly how big your maps are, in terms of tiles/cells? Are you maintaining a solid 60 fps?
Who is online
Users browsing this forum: No registered users and 4 guests