Search found 46 matches

by louie999
Wed Jul 06, 2016 3:22 pm
Forum: General
Topic: Access to the directory of the game?
Replies: 15
Views: 10009

Access to the directory of the game?

Haven't visited this site in awhile :) Just a question, is there such a function that I can use to read an external file (like a '.txt' file) from the directory of my game. If, example, my game's .exe resides in "D:/Stuff/MyGameFolder" and there's a text file in "D:/Stuff/MyGameFolder...
by louie999
Wed Jul 06, 2016 3:14 pm
Forum: General
Topic: Can we use Love2D directly within a C++ program ?
Replies: 6
Views: 5336

Re: Can we use Love2D directly within a C++ program ?

Why'd you wanna use it with C++? To extend its functions?
by louie999
Tue Aug 25, 2015 3:14 pm
Forum: Support and Development
Topic: Some questions about love.thread
Replies: 2
Views: 1876

Some questions about love.thread

In the game I'm making I want it to be that people can mod my game, but I want to restrict the use of some functions by the user, can I do that by using love.thread?
by louie999
Sun Aug 23, 2015 6:58 am
Forum: Support and Development
Topic: Need help with random map/city generator
Replies: 42
Views: 15942

Re: Need help with random map/city generator

Thanks guys, the map generator is still not 100% complete but atleast the loop problem is fixed :D local function GENERATE_BUILDINGS(maxsize, maxb) local cb = 0 while generating do local rand1 = math.random(1, 100) local rand2 = math.random(1, 100) local randx, randy = lmt.random(1, maxsize), lmt.ra...
by louie999
Sat Aug 22, 2015 3:07 pm
Forum: Support and Development
Topic: C++/C in Love2D?
Replies: 7
Views: 7514

Re: C++/C in Love2D?

Ah ok, C is good too. Though I have another question, how can I call a lua function from C ? like call love.graphics.setColor from C, how will I be able to do it ? Edit: I tried this: ffi = require "ffi" ffi.cdef[[ #include <stdio.h> int main() { printf("Hi"); } ]] But it resulte...
by louie999
Sat Aug 22, 2015 2:05 pm
Forum: Support and Development
Topic: Need help with random map/city generator
Replies: 42
Views: 15942

Re: Need help with random map/city generator

Ok, so I tried making a map generator, I also put the t.console in conf.lua to true because I laid down alot of print() functions around the map generator code so I can really make sure that it's working properly, but my problem is some time after the map generation begins then my game will suddenly...
by louie999
Sat Aug 22, 2015 9:59 am
Forum: Support and Development
Topic: C++/C in Love2D?
Replies: 7
Views: 7514

C++/C in Love2D?

Will it be possible to run C++/C(more preferably C++) with Love2D ? If so then how?
by louie999
Sat Aug 22, 2015 9:08 am
Forum: Support and Development
Topic: 'attempt to call method 'getDimensions' (a nil value)'
Replies: 2
Views: 1941

Re: 'attempt to call method 'getDimensions' (a nil value)'

OOPS, thanks for pointing that out, I totally forgot about the new image thing. :death:
by louie999
Fri Aug 21, 2015 3:07 pm
Forum: Support and Development
Topic: 'attempt to call method 'getDimensions' (a nil value)'
Replies: 2
Views: 1941

'attempt to call method 'getDimensions' (a nil value)'

I don't know why it always gives me that error, here's the part of my code where the error happens: wazmb.__TILE = {} local tt = wazmb.__TILE tt._TILE_SET_ = "gfx/tiles/tileset.png" tt._TILESIZE = 32 tt.TILESETW, tt.TILESETH = tt._TILE_SET_:getDimensions() I really have no idea why that ha...
by louie999
Thu Aug 20, 2015 4:07 am
Forum: Support and Development
Topic: Need help with random map/city generator
Replies: 42
Views: 15942

Re: Need help with random map/city generator

Here's how I would do it: Just focus on putting down some roads and buildings first. Try just drawing a few roads between different points, and putting buildings in the places the roads aren't, or, putting the buildings down first, and drawing the roads around them. A pathfinding library like Jumpe...