mod performance

mod performance

Discuss game development here, from a distinct game project to an accessible third-party mutator, down to the interaction and design of individual units if you like.

Moderator: Moderators

Post Reply
User avatar
dcore221
Posts: 110
Joined: 09 Jul 2010, 19:53

mod performance

Post by dcore221 »

which uses least system resources or gives best performance?

animation
lua vs cob

modals
3do vs s3o

unit attributes
fbi/tdf vs lua

any others you would add?
User avatar
Pressure Line
Posts: 2283
Joined: 21 May 2007, 02:09

Re: mod performance

Post by Pressure Line »

I think Lua is marginally slower than bos/cob (we are talking about fractions of an fps here, even on a low end machine)

pathfinding is the major bottleneck in Spring, iow if you are wanting to make "omg the mod/game which gets the highest fps consistently" as its major criterion, make something like comshooter, but with no unit animations.

Otherwise, don't worry about it.
User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14673
Joined: 17 Nov 2005, 02:43

Re: mod performance

Post by Forboding Angel »

Assuming you want to get uber technical.

1. Cob

Many of us still use cob because that's what we like (personally I prefer it, but that's jsut because cob is quite a bit easier to deal with imo).

Then the others are nobrainers :-)

2. s3o

3. Lua
User avatar
Das Bruce
Posts: 3544
Joined: 23 Nov 2005, 06:16

Re: mod performance

Post by Das Bruce »

(personally I prefer it, but that's jsut because cob is quite a bit easier to deal with imo).
Forb is objectively wrong. :P
If you don't know cob already, learn lua. All the other scripting is done in lua.
User avatar
Pressure Line
Posts: 2283
Joined: 21 May 2007, 02:09

Re: mod performance

Post by Pressure Line »

Notice that he didn't ask for "which would be better for my workflow to learn?" but "which would be better for my fps?"
Google_Frog
Moderator
Posts: 2464
Joined: 12 Oct 2007, 09:24

Re: mod performance

Post by Google_Frog »

I think Lua is marginally slower than bos/cob (we are talking about fractions of an fps here, even on a low end machine)
If the difference is that small use lua.

The only advantage of cob is by the time you bludgeon it into working the average computer will be faster than if you used lua. Cob is something extra to learn as you will need a lua.
User avatar
Pressure Line
Posts: 2283
Joined: 21 May 2007, 02:09

Re: mod performance

Post by Pressure Line »

Tobi wrote:In other news, I now also tested call-out speed (random series of 1000 moves and turns: 50/50 move/turn, 50/50 now/speed, random destinations, axes and speeds). The results:

Code: Select all

COB: 90000*1k calls in 10147 ms -> 8870000 calls/second
Lua: 40000*1k calls in 11754 ms -> 3403000 calls/second
So unfortunately COB is about 2.6x faster for practically infinitely long move/turn sequences. (On the other hand, Lua is about 4.2x faster for simple call-ins.)
But notice you are talking about the difference between 8870 and 3403 calls per THOUSANDTH of a second in terms of simple animations, other stuff lua does faster.

Realistically, unless you are trying to get this to run on your 166MHz P1, its not an issue.

I believe Lua unit/weapondefs load slightly [and again, we are probably talking milliseconds here] quicker, because they don't have to get parsed into Lua first.

But realistically, if you write slow code, waste polies on models, make your textures bigger than they need to be and use too many movetypes your mod will run 'slow' no matter what file format or language you use.
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Re: mod performance

Post by AF »

Also keep in mind if you go with cob you forfeit some pretty standard things, e.g. cob has no strings. What's more for anything beyond simple movements, aka things that need coordination with lua gadgets, you need cob<->lua calls, which are horrendously slow in comparison.

Use lua, only use cob to maintain existing scripts
User avatar
dcore221
Posts: 110
Joined: 09 Jul 2010, 19:53

Re: mod performance

Post by dcore221 »

didt realize theirs a war going on :]

thanks for replys very informative
il stick with cob for now
is there any chance that lua will get faster as techniques improve?
User avatar
FLOZi
MC: Legacy & Spring 1944 Developer
Posts: 6242
Joined: 29 Apr 2005, 01:14

Re: mod performance

Post by FLOZi »

The difference isn't even measured its purely guesswork afaik. If you don't already have dozens of cobs laying around, use lua.
User avatar
lurker
Posts: 3842
Joined: 08 Jan 2007, 06:13

Re: mod performance

Post by lurker »

Lua itself is MUCH faster, it just has a disadvantage on certain calls.
User avatar
bobthedinosaur
Blood & Steel Developer
Posts: 2702
Joined: 25 Aug 2004, 13:31

Re: mod performance

Post by bobthedinosaur »

This is just idiotic. There is no lua is always faster than cob or vice versa. Because you can code things differently to do the same thing and what is the most important is efficiency, whether it is lua or cob. Granted there are some speed differences with how spring handles lua vs tdf or cob, yet the real issue is how clean and simple of a script to do the same job.
Google_Frog
Moderator
Posts: 2464
Joined: 12 Oct 2007, 09:24

Re: mod performance

Post by Google_Frog »

dcore221 wrote:is there any chance that lua will get faster as techniques improve?
If this is the only reason for your choice use lua. It is much more flexible and there is no significant speed difference, the people here are just splitting hairs over speed.
Post Reply

Return to “Game Development”