Search found 87 matches

by BOT-Brad
Thu May 21, 2015 2:27 pm
Forum: Support and Development
Topic: Saving & Loading large files
Replies: 15
Views: 991

Re: Saving & Loading large files

Yes! Saving everything as seperate ser return values with "\f" splitting them apart works really well! It saves ALMOST as fast as just chucking the entire object into ser to serialize (Where Ser could save the entire object in about 1 second before, it now takes perhaps 1.3 seconds to Ser each submo...
by BOT-Brad
Thu May 21, 2015 12:26 pm
Forum: Support and Development
Topic: Saving & Loading large files
Replies: 15
Views: 991

Re: Saving & Loading large files

-snip- It's not very elegant, and you have to make sure none of the items reference any cake , etc. But it's the only way around this limitation that I can think of. -snip- I already automatically strip each object of any object references before it is saved, and then 're-attach' them after, so tha...
by BOT-Brad
Wed May 20, 2015 11:11 pm
Forum: Support and Development
Topic: Saving & Loading large files
Replies: 15
Views: 991

Re: Saving & Loading large files

If you can cleanly split your data in several large subdivisions, you could try writing multiple modules . Do you mean something similar to this example; This is kinda what I am doing now super_object = {} super_object.items = super_massive_list_of_stuff super_object.data = another_massive_table_of...
by BOT-Brad
Wed May 20, 2015 11:04 pm
Forum: Support and Development
Topic: Enemy Knockback Problem
Replies: 2
Views: 330

Re: Enemy Knockback Problem

I think I fixed your bug :awesome:. In player.lua the mapColl function, you had this; -- LEFT/RIGHT COLLISION if self.xvel < 0 then if not tileCollision(map,self,"left") then self.x = self.newX else self.x = self.newX + map.tilesize - (self.newX % map.tilesize) self.xvel = 0 end elseif self.dir == "...
by BOT-Brad
Wed May 20, 2015 10:46 pm
Forum: Support and Development
Topic: Saving & Loading large files
Replies: 15
Views: 991

Re: Saving & Loading large files

Ah, yes, I see the issue. It is unavoidable to have so many constants there, because there's just so many tables that all need to be numbered. :P I hope it is a fixed bug in LuaJIT, Lua 5.2 can load it just fine. BTW, I could strip all extra whitespaces from Ser output, it saves some space, getting...
by BOT-Brad
Tue May 19, 2015 9:58 pm
Forum: Support and Development
Topic: Saving & Loading large files
Replies: 15
Views: 991

Re: Saving & Loading large files

So attached is the saved data produced by using Ser (savedata.ser) and Serpent (savedata.serpent). Both saves were 'captured' at the exact same time (Well, right after one another), so are save-files of the exact same data. You can see that Ser is around ~11.3Mb in size, whereas Serpent is ~8.2Mb. I...
by BOT-Brad
Tue May 19, 2015 5:43 pm
Forum: Support and Development
Topic: Saving & Loading large files
Replies: 15
Views: 991

Re: Saving & Loading large files

I really should google a bit better first, huh? So turns out loadstring returns a 2nd value that details the error message if things go wrong. Turns out I get this error; [string "local _ = {}..."]:110018: main function has more than 65536 constants More than 65,536 constants! So maybe I should try ...
by BOT-Brad
Tue May 19, 2015 5:29 pm
Forum: Support and Development
Topic: Saving & Loading large files
Replies: 15
Views: 991

Saving & Loading large files

Currently been testing with a few different serialisation libraries such as Serpent, tserialize and Ser. I'm trying to save a fairly large amount of data, of which it has been mostly cleaned up and any redundant data removed. Right now, Ser runs the fastest by a comfortable distance, but produces sl...
by BOT-Brad
Sun May 17, 2015 5:47 pm
Forum: Support and Development
Topic: [Solved]Can't get my images working.
Replies: 5
Views: 512

Re: Can't get my images working.

Thank you, BOT-Brad, that does solve my black-image issue! But, then, my word become white to, you know any way of changing their colour to black without changing image's behaviour? Sure function love.draw() love.graphics.setColor(255, 255, 255, 255) love.graphics.draw(image, imgx, imgy) love.graph...
by BOT-Brad
Sun May 17, 2015 5:39 pm
Forum: Support and Development
Topic: [Solved]Can't get my images working.
Replies: 5
Views: 512

Re: Can't get my images working.

In your code in the main.lua on line 6, you have love.graphics.setColor(0,0,0) This will make everything you draw black. Making your draw function like this will fix your issue; function love.draw() love.graphics.setColor(255, 255, 255, 255) love.graphics.draw(image, imgx, imgy) love.graphics.print(...