Search found 55 matches

by MrFariator
Sat Sep 23, 2017 8:46 pm
Forum: Support and Development
Topic: More scripts than main?
Replies: 2
Views: 63

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: 263

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: 341

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: 225

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: 998

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: 274

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: 274

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: 423

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...
by MrFariator
Mon Jul 03, 2017 5:02 pm
Forum: Libraries and Tools
Topic: [library] bump.lua v3.1.4 - Collision Detection
Replies: 222
Views: 36073

Re: [library] bump.lua v3.1.4 - Collision Detection

I had a similar problem with my game (player would get stuck when walking from one tile to the next because gravity would interrupt the movement), and the fix was to step movement in two different calls to bumpWorld:move(). In my case because my game is a 2d platformer, I first step the character on...
by MrFariator
Sat Jul 01, 2017 8:45 pm
Forum: Support and Development
Topic: In-App Purchases?
Replies: 3
Views: 337

Re: In-App Purchases?

Since it's a solution provided by Apple it's probably a fine choice, though I have no experience with it (I've only implemented IAP in Unity with a service I can't remember the name of anymore). I think it's best to just to go with whatever doesn't have a terrible track record or dubious history, or...