Search found 52 matches
- Wed Jun 08, 2016 10:47 am
- Forum: Support and Development
- Topic: How to get the final position after multiple graphical operation
- Replies: 15
- Views: 8149
Re: How to get the final position after multiple graphical operation
@Linkpy, your formula for the determinand is wrong. Should be det = @matrix[1] * (@matrix[5] * @matrix[9] - @matrix[6] * @matrix[8]) det -= @matrix[2] * (@matrix[4] * @matrix[9] - @matrix[6] * @matrix[7]) det += @matrix[3] * (@matrix[4] * @matrix[8] - @matrix[5] * @matrix[7]) Also, when composing th...
- Wed Jun 08, 2016 9:53 am
- Forum: Support and Development
- Topic: How to get the final position after multiple graphical operation
- Replies: 15
- Views: 8149
Re: How to get the final position after multiple graphical operation
It's curious because SFML use 4x4 matrix, using it like a 3x3 for 2D operations... I don"t understand :crazy: My guess is they uses 4x4 matrices in order to apply perspective. If you are interested (as I think) in 2D operations, augmented 3x3 matrices suffice. However, please keep in mind that...
- Tue Jun 07, 2016 9:05 pm
- Forum: General
- Topic: How do you organize your project(s) ?
- Replies: 12
- Views: 7301
Re: How do you organize your project(s) ?
It's somewhat odd that so may developers devised a similar project structure. I've also seen very badly unstructured projects that works perfectly, but an organized one put the mind at ease when working on it. Personally I'm adopting something like the following structure +- root +- assets +- data <...
- Mon Jun 06, 2016 10:30 am
- Forum: Support and Development
- Topic: How to get the final position after multiple graphical operation
- Replies: 15
- Views: 8149
Re: How to get the final position after multiple graphical operation
The "formula" is simply to apply the matrix operations by yourself. I don't think the trasformation matrix can be retrieved from the graphics subsystem.
- Tue May 31, 2016 7:52 am
- Forum: Support and Development
- Topic: How can I make scrolling text boxes? (or get the number of lines of text?)
- Replies: 7
- Views: 5446
Re: How can I make scrolling text boxes? (or get the number of lines of text?)
Give the canvas destination rectangle (or, at least, the maximum line length in pixels) I would break the texts on whitespaces. Then, iterating the words I would build every single line of text, measuring the line width. Upon reaching the maximum length, store the current line and start new one. loc...
- Fri May 27, 2016 9:33 am
- Forum: General
- Topic: Instantiation issue?
- Replies: 4
- Views: 1948
Re: Instantiation issue?
It should also beshiftyp wrote:Got it. it needs to be newTest.x = x instead of self.x
I'm stupid.
Code: Select all
function test.new(x)
local self = {}
setmetatable(self, test)
self.x = x
return self
end
Code: Select all
:
- Thu May 19, 2016 1:45 pm
- Forum: General
- Topic: What's everyone working on? (tigsource inspired)
- Replies: 1791
- Views: 1511693
Re: What's everyone working on? (tigsource inspired)
I opted for a similar approach, in some projects, but using a queue of closures with priority. That way I simply enqueue the drawing snippets without the need to define a specification format to be interpreted.Jasoco wrote:I created my own DrawPool library for it too.
- Wed May 11, 2016 10:36 am
- Forum: Support and Development
- Topic: Object recycling tips
- Replies: 11
- Views: 6369
Re: Object recycling tips
So to recap this - default (strong) tables are collected only when there is no more references to them (and collection cycle happens), and weak tables can be collected on next collection cycle. Am i right? It isn't the table the object of the garbage-collection, but the objects/functions/whatever t...
- Wed May 11, 2016 7:47 am
- Forum: Support and Development
- Topic: Object recycling tips
- Replies: 11
- Views: 6369
Re: Object recycling tips
However, developer who actualy is concerned about this is not going to use GC-d language for perfomance-sensitive applications. That is exactly my point. If I'm going to be real concerned about garbage-collector related issues, and I'm working on a performance-critical piece of software, and I can ...
- Tue May 10, 2016 9:00 pm
- Forum: Support and Development
- Topic: Object recycling tips
- Replies: 11
- Views: 6369
Re: Object recycling tips
i think it is going to be way better if i lift the burden off garbage collector's shoulders as much as i can, since it allows to minimize things like fps spikes during collection cycle etc. I have the exact opposite opinion. :) The garbage-collector exists with the sole aim to relieve us, the progr...