Search found 64 matches

by Virox
Mon Jun 21, 2010 6:37 am
Forum: General
Topic: New website design!
Replies: 14
Views: 9878

Re: New website design!

²
by Virox
Sun Jun 20, 2010 2:01 pm
Forum: Games and Creations
Topic: Proto-RTS
Replies: 69
Views: 43071

Re: Proto-RTS

I'm glad to see this project is still active. Looking forward to further developments!
by Virox
Sun Feb 28, 2010 2:42 pm
Forum: Support and Development
Topic: Code Optimizing & Performance trics
Replies: 18
Views: 9893

Re: Code Optimizing & Performance trics

Does it make a difference when you draw something with coordinates existing out of integers or decimals(floating point numbers)? Actually is it good to work constantly with decimals in general? or is it better to work with math.floor or math.ceiling? (although they are slow to...) thank god that bar...
by Virox
Sun Feb 28, 2010 2:30 pm
Forum: Support and Development
Topic: Code Optimizing & Performance trics
Replies: 18
Views: 9893

Re: Code Optimizing & Performance trics

There is no way when this happens exactly unless you call the garbage collector explicitly, and even then you can only be sure it is collected afterwards , the GC just collects whenever it detects your program is not doing anything time-critical. so it's not like that the collector is run automatic...
by Virox
Sun Feb 28, 2010 2:15 pm
Forum: Support and Development
Topic: Code Optimizing & Performance trics
Replies: 18
Views: 9893

Re: Code Optimizing & Performance trics

Some questions If you have a loop running through a table. for i, item in pairs( itemtable ) do if condition = true then itemtable[i] = nil end end So this should make some items in the table nil. - I heard the garbage collector picks them out and removes them from the table at some point? is this c...
by Virox
Sun Feb 28, 2010 10:40 am
Forum: Support and Development
Topic: Code Optimizing & Performance trics
Replies: 18
Views: 9893

Re: Code Optimizing & Performance trics

Thx for the explanation.

I've found a great page where they test several lua code performances.
http://trac.caspring.org/wiki/LuaPerformance
by Virox
Sat Feb 27, 2010 3:14 pm
Forum: Support and Development
Topic: Code Optimizing & Performance trics
Replies: 18
Views: 9893

Re: Code Optimizing & Performance trics

bartbes wrote:Prevent as much table lookups as possible.
do you mean loop through a table using pairs or table?

bartbes wrote:In lines that get called more than once don't use anonymous functions

I have no clue about what you are talking about, anonymous functions?

Keep those tips coming :)
by Virox
Sat Feb 27, 2010 10:41 am
Forum: Support and Development
Topic: Code Optimizing & Performance trics
Replies: 18
Views: 9893

Code Optimizing & Performance trics

I didn't find a topic grouping several issues, tips, trics to make your code as optimized as possible and achieve a better performance. Things you should bear in mind when making your game a fast as possible. Like how to handle variables, loops, tables, garbage collection... These are things I've fo...
by Virox
Thu Feb 25, 2010 9:40 pm
Forum: Libraries and Tools
Topic: what is this code doing?
Replies: 4
Views: 4274

Re: what is this code doing?

wel self.button is actually a metatable existing out of keys and values n = key and b = value (this example a button) the code itself is a for loop, iterating through every key of the table (in this example every button added to the table) b:update(dt) <-- this will update the button Someone correct...