Search found 75 matches

by Lacotemale
Mon May 04, 2015 12:10 pm
Forum: Support and Development
Topic: Saving objects
Replies: 18
Views: 5539

Re: Saving objects

Ah thanks! Thought it said to just put in the object in the docs. Btw, how do I register an object array? Got error: Trying to serialize unregistered userdata If I add to Equipment because Items have this: image = love.graphics.newImage("assets/items/small/"..fileName..".png"), i...
by Lacotemale
Sun May 03, 2015 7:34 pm
Forum: Support and Development
Topic: Saving objects
Replies: 18
Views: 5539

Re: Saving objects

Right Lady ain't working either for me, just gonna post a love file at this point... before I start getting miffed about it. (already too late I think) :D errLady.png Love File: (too big to upload here) https://copy.com/rLo0JYyeycoUL87r?download=1 Left click to run save. Class for player registered ...
by Lacotemale
Sun May 03, 2015 6:44 pm
Forum: Support and Development
Topic: Saving objects
Replies: 18
Views: 5539

Re: Saving objects

Well I can see that taking this out from spell makes it work: image = love.graphics.newImage("assets/spells/"..fileName..".png"), Obviously it was the image it couldn't handle, so I could pass in a string instead. This means I can use Ser I think with just some minor changes. How...
by Lacotemale
Sat May 02, 2015 3:20 pm
Forum: Support and Development
Topic: Saving objects
Replies: 18
Views: 5539

Re: Saving objects

error.png ^ This is what I get but I think its because I add objects to equipment, spells, and skills. That is the difference why your attempt works. Thanks for trying though. player = Player:new(plrX-16, plrY-24, 32, 50, "Jake",selectedP,selectedPClass, 20, 10) table.insert(party[1].skil...
by Lacotemale
Fri May 01, 2015 3:41 pm
Forum: Support and Development
Topic: Saving objects
Replies: 18
Views: 5539

Re: Saving objects

All im doing in main is this:

Code: Select all

serialize(player)
Player object code attached.
Player.lua
(499 Bytes) Downloaded 170 times
by Lacotemale
Fri May 01, 2015 1:12 pm
Forum: Support and Development
Topic: Saving objects
Replies: 18
Views: 5539

Saving objects

Hi all,

So I found this lib called Ser and planned on using it to save/load data. However, it doesn't accept my player object. I then tried to save as a plain file but I would need to do it line by line.

With Ser do I also need to do it line by line for each object table?

Any help would be great.
by Lacotemale
Mon Mar 09, 2015 9:20 pm
Forum: Support and Development
Topic: Image Collision
Replies: 11
Views: 8425

Re: Image Collision

No worries. Changed it slightly. Seems to work fine now. So all I did is check ahead of where we are going to move by 1 pixel. If we wouldn't be able to move there then don't. :) Also moved that function out of the update. It doesn't need to be inside that. Just call a check on it when you need to s...
by Lacotemale
Mon Mar 09, 2015 1:50 pm
Forum: Support and Development
Topic: Image Collision
Replies: 11
Views: 8425

Re: Image Collision

Sounds kinda strange. I'm not sure without having a .love file or code to test.
by Lacotemale
Sun Mar 08, 2015 7:51 pm
Forum: Support and Development
Topic: Image Collision
Replies: 11
Views: 8425

Re: Image Collision

Something like the following should work: function checkCollision(playerx,playery,playerw,playerh, enemyx,enemyy,enemyw,enemyh) return playerx < enemyx+enemyw and enemyx < playerx+playerw and playery < enemyy+enemyh and enemyy < playery+playerh end function love.update(dt, key) if love.keyboard.isDo...
by Lacotemale
Thu Mar 05, 2015 9:55 pm
Forum: Games and Creations
Topic: .: Adventure 2.0 :.
Replies: 3
Views: 2045

Re: .: Adventure 2.0 :.

I got it from here:

http://raptrstudios.weebly.com/games.html

Download the source and create love file to run. (for non-Windows)

Btw, you need to replace the screen var in the conf with window. :)