Search found 32 matches

by sam
Fri Aug 14, 2015 10:02 pm
Forum: Support and Development
Topic: One-way requiring...
Replies: 3
Views: 1897

Re: One-way requiring...

Ah, I see. Thanks for the clarification. Definitely going to have to keep things neat if I'm going to make a larger project.
by sam
Thu Aug 13, 2015 11:57 pm
Forum: Support and Development
Topic: One-way requiring...
Replies: 3
Views: 1897

One-way requiring...

Not too sure how to word this one without it sounding weird. In my game, I have a ton of individual entity files, as many of you do. These are all required by main.lua so they can be manipulated and put into different pre-programmed levels. A side-effect of this is that every file required by main.l...
by sam
Sat Jul 25, 2015 5:03 am
Forum: Support and Development
Topic: (SOLVED) Z-Ordering graphical issues.
Replies: 5
Views: 3324

Re: Z-Ordering graphical issues.

Did you write madlib yourself? I think I might have solved it.... In madlib.lua, this is your remove function; for k, v in pairs(ents) do if v == ent then if v.destroy ~= nil then ent:destroy() end ents[k] = nil entAmt = entAmt - 1 if debug.debugMode then print("Removed ent -> " .. ent.na...
by sam
Fri Jul 24, 2015 12:25 am
Forum: Support and Development
Topic: (SOLVED) Z-Ordering graphical issues.
Replies: 5
Views: 3324

Re: Z-Ordering graphical issues.

Sorry for double-posting, but I'd really love to get this fixed. I've attached an updated version of the game to this post, this time with better graphics/bullets and more importantly the ability to toggle Z-ordering on and off with the 0 key, showing the issues I'm having. If anyone knows a better ...
by sam
Tue Jul 21, 2015 11:10 pm
Forum: Support and Development
Topic: (SOLVED) Z-Ordering graphical issues.
Replies: 5
Views: 3324

Re: Z-Ordering graphical issues.

I've taken a quick look at your code, and you seem to be sorting your entities (ents) every draw call. Do your entities change 'z' coordinates often? If they never change, it would be much better to sort the entities by their z-coordinates whenever one is added, removed, or modified. I actually don...
by sam
Tue Jul 21, 2015 8:35 pm
Forum: Support and Development
Topic: (SOLVED) Z-Ordering graphical issues.
Replies: 5
Views: 3324

(SOLVED) Z-Ordering graphical issues.

I'm attempting to Z-order my entities for my game, but the function that I supplied to table.sort seems to be shifting the entity table in some weird way, making the entities onscreen flash. Just for clarification, my ents table holds every entity in the game (each one has their own z variable) and ...
by sam
Fri May 29, 2015 1:34 am
Forum: Support and Development
Topic: Source path seems to be off..
Replies: 6
Views: 3077

Re: Source path seems to be off..

reg.lua, line 13. Try replacing dofile(fn) with [wiki]love.filesystem.load[/wiki](fn)() . Fun fact: the love filesystem only affects require, not dofile or the io.* functions. (This is because require is extensible, while dofile etc. aren't, and LÖVE never overwrites the standard library) Thanks, t...
by sam
Thu May 28, 2015 11:21 pm
Forum: Support and Development
Topic: Source path seems to be off..
Replies: 6
Views: 3077

Re: Source path seems to be off..

Finally was able to upload a .love file. Beware, super non-commented moonscript generated code ahead. This was made to be a test of a quick framework I'm making for myself for jam games, so that's why there's a ton of stuff in the lib folder that's not being used. What you should probably be looking...
by sam
Thu May 28, 2015 8:25 pm
Forum: Support and Development
Topic: Source path seems to be off..
Replies: 6
Views: 3077

Re: Source path seems to be off..

That is because that is the working directory. If you're using love.filesystem, though, that shouldn't be a problem, since it doesn't care about the working directory. I was simply trying to load in a text file from a path using dofile(). The same error occurs when I try to load in an image from a ...
by sam
Thu May 28, 2015 3:52 am
Forum: Support and Development
Topic: Source path seems to be off..
Replies: 6
Views: 3077

Source path seems to be off..

As I was programming, I attempted to load in text files from a folder inside of my source. Upon testing, it seems to be looking for files in the folder where I ran the game, not where the main source files are. https://love2d.org/imgmirrur/wQPynOC.png The first printed path is my working directory, ...