Search found 32 matches

by mangadrive
Tue Oct 08, 2013 5:30 am
Forum: Support and Development
Topic: Saving multiple tables within a table?
Replies: 7
Views: 4330

Re: Saving multiple tables within a table?

Thank you, but again my problem isn't saving them. Tserial in fact saves them. Unless you mean your process has a different way of loading them.. I cannot figure out how to redistribute the serialized data from the file back into the game from the files to the appropriate tables, then passed to the ...
by mangadrive
Tue Oct 08, 2013 12:03 am
Forum: Support and Development
Topic: Saving multiple tables within a table?
Replies: 7
Views: 4330

Re: Saving multiple tables within a table?

I'm sorry for late replies, I haven't had internets D: I appreciate the suggestions, but it wasn't due to the identity. I do realize in my haste to compile the game I didn't change it, but the original problem doesn't stem from that. Every time I serialize a table that contains more than one thing I...
by mangadrive
Tue Oct 01, 2013 10:22 am
Forum: Support and Development
Topic: Saving multiple tables within a table?
Replies: 7
Views: 4330

Re: Saving multiple tables within a table?

I don't get errors, but the data simply doesn't reload. It allows the save, but it's like the save is blank... unless i explicitly only use one and only one table as the save data. Perhaps I'm missing something but a table inserted with all your objects is still a table right? Why would that not sav...
by mangadrive
Tue Oct 01, 2013 9:59 am
Forum: Support and Development
Topic: Saving multiple tables within a table?
Replies: 7
Views: 4330

Saving multiple tables within a table?

I've had zero luck with this using Tserial and other serialization libraries/functions. For example this works (note: there's 2 different types of serialization there I was testing): player = { x = 300, y = 300, width = 64, height = 64, speed = 100, } function love.keypressed( key, unicode) if key =...
by mangadrive
Mon Sep 30, 2013 11:59 pm
Forum: General
Topic: snap object to grid
Replies: 15
Views: 8088

Re: snap object to grid

Thanks for the suggestions and I looked over them. I hard coded it because it's a static 4x4 box. So it's only 8 checks for x,y and total. The box won't be moving and I've committed to my resolution because I designed the UI first, albeit a weird resolution size but I'm the guy making it so that's m...
by mangadrive
Mon Sep 30, 2013 2:47 am
Forum: General
Topic: snap object to grid
Replies: 15
Views: 8088

Re: snap object to grid

So just a note for anyone that may search this: I ended up actually hard coding all the values like a GUI element for the selection pointer because while math.floor and the tile considerations do work, it's problematic on a tile map or grid that's not centered on 0. You can offset it by adding/subtr...
by mangadrive
Sun Sep 29, 2013 7:51 pm
Forum: General
Topic: snap object to grid
Replies: 15
Views: 8088

Re: snap object to grid

I knew it was something simple like this and I didn't have math.floor considered.

Thank you very much.
by mangadrive
Sun Sep 29, 2013 6:55 am
Forum: General
Topic: snap object to grid
Replies: 15
Views: 8088

snap object to grid

I have a selector that goes over a tilemap that is 64x64. I have it snapping to tiles if an enemy is present, but for the life of my can't seem to create a free targeting option that would just allow me to select the blank tile with a mouse and snap the selector to that tile. function ents.TargetLoc...
by mangadrive
Sat Mar 16, 2013 1:19 am
Forum: Support and Development
Topic: Iteration
Replies: 6
Views: 4627

Re: Iteration

Thanks, I finally did realize that after working in the console a bit. I've been over thinking loops to a great degree. I fixed most of these problems by simply creating an array with each tile's x/y on it and just flagged it occupied/non occupied. It will get it's current position and compare with ...
by mangadrive
Sat Mar 16, 2013 12:13 am
Forum: Support and Development
Topic: Iteration
Replies: 6
Views: 4627

Re: Iteration

Ok, so now..I can trigger this for an "if' only once, but If I use an Else or else if, I have the same problem of the action performing for each enemy in the list. Example if (enemy.x + 96 <= 384 and v.x == enemy.x + 96 and v.y == enemy.y) then -- Check Horizonal , if occupied -- Move Vertical ...