Search found 1911 matches

by ivan
Tue Jun 02, 2015 10:12 am
Forum: Libraries and Tools
Topic: Chess.lua
Replies: 14
Views: 14153

Re: Chess.lua

Attached is a rendering demo using fonts. The drawing routine is slow and highly inefficient but looks cool, so I'll post it.
by ivan
Tue Jun 02, 2015 10:09 am
Forum: Support and Development
Topic: Set FPS
Replies: 9
Views: 4535

Re: Set FPS

Sure you can have fixed 60 fps. You just have to make sure you update/draw for one frame takes always less than 16.666... miliseconds. If you can achieve that you can have fixed 60 fps. Yes, you're right to some extent. But don't forget that the Love2D application itself can lag, especially on slow...
by ivan
Tue Jun 02, 2015 4:24 am
Forum: Support and Development
Topic: Set FPS
Replies: 9
Views: 4535

Re: Set FPS

Just simple, how to set FPS? Does it possible? Not really. Let's say you set it to 60 (1/60 of a second) per frame. But the "love.update" step could take 2/60 or longer depending on your Lua code. Or your CPU might be busy with some other process. In general, you can't expect a constant F...
by ivan
Tue Jun 02, 2015 4:06 am
Forum: Libraries and Tools
Topic: Chess.lua
Replies: 14
Views: 14153

Re: Chess.lua

I wrote a very crude front-end for the moves validator using a chess font (somebody removed quads from Love 0.9 and I'm too lazy to read the docs). Note that castling doesn't work and EPS captures need more testing. Other than that it seems to work fine. Love2D would be a nice front-end for a chess ...
by ivan
Mon Jun 01, 2015 4:57 am
Forum: Support and Development
Topic: kill a process
Replies: 8
Views: 2280

Re: kill a process

this won't require administrator privileges so it should be easy. i want to kill a specified process, simply that. if you wanna know why, it has to do with anti piracy for a fangame im making... (i wouldnt be allowed to make it if i didnt put this in) Might be possible using "os.execute" ...
by ivan
Sun May 31, 2015 8:08 pm
Forum: Libraries and Tools
Topic: Chess.lua
Replies: 14
Views: 14153

Re: Chess.lua

Just wanted to mention that we've released our old "Touch Chess" iOS app for free on Windows: http://2dengine.com/chess/ It's uses the Faile engine. And yes, I'm aware of the asynchronous issue and the awful title screen. http://2dengine.com/chess/screens/iphone/3.png http://2dengine.com/c...
by ivan
Sat May 30, 2015 11:12 am
Forum: Support and Development
Topic: about distributing on windows...
Replies: 11
Views: 4841

Re: about distributing on windows...

The only reliable way to do that is making the server the only source of truth. Yep. Would it be really that bad if people used your engine? What's the worst that can happen? These questions are not rhetorical. You are investing a significant amount of time & effort in preventing that. Going on...
by ivan
Sat May 30, 2015 10:35 am
Forum: Support and Development
Topic: Movement Relative to Mouse
Replies: 13
Views: 4626

Re: Movement Relative to Mouse

Sure, if you need the angle you can get it from the 'heading' vector. I wouldn't be worried about performance too much, this is more of a 'design' question. With games, updating objects usually happens more frequently than rendering them and in general it's better keep these two things separate - li...
by ivan
Sat May 30, 2015 8:32 am
Forum: General
Topic: Fire Particle!
Replies: 6
Views: 3576

Re: Fire Particle!

Hi and welcome to the forums.
Throw in some additive blending for an ultimate effect:

Code: Select all

function love.draw(dt)
    love.graphics.setBlendMode("additive")
    love.graphics.draw(particleSystem, love.graphics.getWidth()/2, love.graphics.getHeight()/2, 0, 0.25, 0.25)
end
by ivan
Sat May 30, 2015 8:00 am
Forum: Support and Development
Topic: Movement Relative to Mouse
Replies: 13
Views: 4626

Re: Movement Relative to Mouse

Hi, you're on the right path there. Assuming that "c" is the length/magnitude of the vector {a,b} you would normalize it like so: if c > 0 then na = a/c nb = b/c 1 = na^2 + nb^2 = sqrt(na^2 + nb^2) end I have a question though, that is what kind of value that given by p.changeInVelocity va...