Search found 57 matches

by MrFariator
Sat Nov 11, 2017 11:17 am
Forum: Support and Development
Topic: Saving files in game directory
Replies: 12
Views: 330

Re: Saving files in game directory

I also faced this "problem" when developing my game's map editor, and I realized that %appdata% is your friend, not your foe. What I wound up doing was including an additional step in my build script(s): look for the "official" map levels in %appdata%, copy those files into the game's own directory ...
by MrFariator
Sat Oct 28, 2017 9:48 pm
Forum: General
Topic: What's everyone working on? (tigsource inspired)
Replies: 1576
Views: 264998

Re: What's everyone working on? (tigsource inspired)

Did a HUD this week now that my university obligations are not as bad for the rest of the semester.
Image
megalukes wrote:
Wed Sep 20, 2017 7:13 pm
mm.gif
Cool stuff.
by MrFariator
Sat Sep 23, 2017 8:46 pm
Forum: Support and Development
Topic: More scripts than main?
Replies: 2
Views: 199

Re: More scripts than main?

Require is the simplest method, and I'd recommend it when starting out. Let's say you want to create myScript.lua, perhaps inside a subfolder. This subfolder should reside in the same folder as your main.lua file. You'd basically then write the functions and code there like normal, and then in your...
by MrFariator
Fri Aug 25, 2017 8:06 pm
Forum: Support and Development
Topic: Drawing to a canvas with a closed window.
Replies: 4
Views: 319

Re: Drawing to a canvas with a closed window.

This is essentially an OpenGL thing, where it requires a context where to draw the stuff at hand (check the footnotes on this wiki page). Now, there are ways to handle OpenGL without opening a window, but you probably would have to write changes to löve's source code for it to do this exact thing. A...
by MrFariator
Wed Aug 23, 2017 6:20 pm
Forum: Support and Development
Topic: Does anyone use/recommend a standard 2D map editor (not tiled)?
Replies: 4
Views: 427

Re: Does anyone use/recommend a standard 2D map editor (not tiled)?

Just chiming in that I coded a level editor for my game (though I've fixed it a bit since that post), but the difference in my design goal was that I wanted to do as much as possible within the game or its codebase (with the exception of creating and sound). Additionally I wanted to learn how to mak...
by MrFariator
Sat Aug 12, 2017 10:12 pm
Forum: Support and Development
Topic: Problem with using calling values in a table
Replies: 2
Views: 279

Re: Problem with using calling values in a table

changeTimer + dt*1440 Try printing the values that produces. If you're using the default love.run (ie. you haven't defined it yourself), I imagine you're getting non-integer values because of the delta time. This then gives you table indexes that don't exist, thus giving you errors when you end up ...
by MrFariator
Mon Aug 07, 2017 6:13 pm
Forum: Support and Development
Topic: Transparent window with borderless window
Replies: 20
Views: 1263

Re: Transparent window with borderless window

The combination of movement with analog controls and aiming with a lightgun sort of setup might be gimmicky, but it's a very fun gimmick. That very combination brought us Sin & Punishment 2 (Wii), one of my favorite games of all time. More of that, pretty please? :3 In the case of this feature I'd p...
by MrFariator
Mon Aug 07, 2017 5:06 am
Forum: Support and Development
Topic: How do I make the draw function just draw the image and stop?
Replies: 4
Views: 338

Re: How do I make the draw function just draw the image and stop?

Yep, that's the gist of it. The terminology may be confusing, as what table and array are kinda depends on the code language in question. For example C/C++ has arrays but no "table" type as that term is usually reserved for 2D arrays. In lua everything is just a table given it's the sole container t...
by MrFariator
Mon Aug 07, 2017 3:21 am
Forum: Support and Development
Topic: How do I make the draw function just draw the image and stop?
Replies: 4
Views: 338

Re: How do I make the draw function just draw the image and stop?

You need to have some way to track that the map has already been generated. Additionally you'll need some way to store the result, so that you can draw it later at will. Examples: -- Somewhere outside love.update and love.draw; you could also make this a global by omitting the "local" if you so wish...
by MrFariator
Sat Jul 22, 2017 11:01 pm
Forum: Support and Development
Topic: Restore settings in conf.lua
Replies: 6
Views: 537

Re: Restore settings in conf.lua

You can always delay the window creation by disabling the window module in conf.lua and call love.window.setMode after conf.lua and/or your save file has been read by your game. Quoting from the wiki page: If you have disabled the window in conf.lua (i.e. t.window = false) and use this function to m...