Search found 779 matches

by Boolsheet
Fri Apr 15, 2011 7:33 am
Forum: Support and Development
Topic: Weird Error: "pure virtual method called"
Replies: 11
Views: 3425

Re: Weird Error: "pure virtual method called"

BlackBulletIV wrote:No I'm not calling destroy twice.
But that's why it's crashing. (even with garbage collecting stopped)
You have two self.stuck.joint:destroy() functions in Player.lua. It looks like there is a condition where the game ends up calling both.
by Boolsheet
Fri Apr 15, 2011 6:33 am
Forum: General
Topic: Game crashes when closing
Replies: 18
Views: 4420

Re: Game crashes when closing

miko wrote:... so this is why this crashes.
To be more specific, it allocates a huge amount of resources that have to be freed on closing. That takes forever and makes it look like it stopped working.
by Boolsheet
Thu Apr 14, 2011 11:24 pm
Forum: Support and Development
Topic: Weird Error: "pure virtual method called"
Replies: 11
Views: 3425

Re: Weird Error: "pure virtual method called"

BlackBulletIV wrote:But... The game doesn't work properly if I don't do that.
I don't see how calling destroy twice on the same joint could accomplish more, it just sets a boolean value.
Well, you have more experience with Box2D and I didn't look through your code. Perhaps someone else knows more?
by Boolsheet
Thu Apr 14, 2011 11:29 am
Forum: Support and Development
Topic: Weird Error: "pure virtual method called"
Replies: 11
Views: 3425

Re: Weird Error: "pure virtual method called"

Actually, it's your code that destroys the joint twice, which makes LÖVE go boom.
The destroy function is not checking if it already has been called, so do it yourself (for now)! ;)
by Boolsheet
Wed Apr 13, 2011 12:13 pm
Forum: General
Topic: Game crashes when closing
Replies: 18
Views: 4420

Re: Game crashes when closing

What? Why? Don't tell it's just because it takes a bit for beginners to understand what's really going on. Well, the function is called setFont and not setAndCreateFont. It delivers more than it should! :P I told bartbes once that this makes it easier to fall into this trap and he said: "yes, ...
by Boolsheet
Wed Apr 13, 2011 7:19 am
Forum: General
Topic: Game crashes when closing
Replies: 18
Views: 4420

Re: Game crashes when closing

Create all your fonts at the loading stage. You're wasting a lot of time and memory if you do it on every update. (main.lua line 57)
Make sure you always pass a font object to love.graphics.setFont in the update and draw functions.
by Boolsheet
Thu Apr 07, 2011 3:28 am
Forum: Support and Development
Topic: Cursor Movement
Replies: 5
Views: 2788

Re: Cursor Movement

How would I go about fixing the lag? The difference you see between the system cursor and your drawn cursor probably comes from vertical synchronization. If vsync is enabled, the graphics card will not send the next frame until the monitor has fully drawn the last one. This means the framerate gets...
by Boolsheet
Tue Apr 05, 2011 6:42 pm
Forum: Support and Development
Topic: Documentation discuss about Image format supported
Replies: 5
Views: 1969

Re: Documentation discuss about Image format supported

I've never seen a list on the wiki. LÖVE should be able to load everything that is on the feature list of DevIL.
http://openil.sourceforge.net/features.php

Some more obscure ones might fail though.
by Boolsheet
Sat Apr 02, 2011 11:22 pm
Forum: Support and Development
Topic: Compiling Games
Replies: 21
Views: 6885

Re: Compiling Games

Or where else on Windows can you put them where the EXE will find them anyway? Windows will search in the following places in that order: - The directory where the exe is located that is requesting the library. - The current directory. - The System directory. 32-bit Windows default: C:\Windows\Syst...
by Boolsheet
Sat Apr 02, 2011 9:43 pm
Forum: General
Topic: Random numbers
Replies: 12
Views: 5442

Re: Random numbers

Wikipedia has a short list how some C libraries generate their numbers. http://en.wikipedia.org/wiki/Linear_congruential_generator#Parameters_in_common_use I think the last column is also interesting, it shows the range of the random number. The Windows SDK defines the following in stdlib.h: #define...