Search found 46 matches

by louie999
Wed Jun 03, 2015 8:21 am
Forum: Support and Development
Topic: How to load values from a .txt file?
Replies: 19
Views: 7973

Re: How to load values from a .txt file?

Kingdaro wrote:Is the file in the same directory as your main.lua file?
I think no, the main.lua is in C:/Games/ but the txt file is in C:/Games/maps/
by louie999
Wed Jun 03, 2015 4:26 am
Forum: Support and Development
Topic: How to load values from a .txt file?
Replies: 19
Views: 7973

Re: How to load values from a .txt file?

I would iterate over every line and "split" the string using regular expressions, like this: local images = {} for line in love.filesystem.lines("yourtextfile.txt") do local x, y, path = string.match(line, "(%d*),(%d*),\"(.*)\"") table.insert(images, {x = ton...
by louie999
Tue Jun 02, 2015 5:16 pm
Forum: Support and Development
Topic: How to load values from a .txt file?
Replies: 19
Views: 7973

How to load values from a .txt file?

Here's basically what I want to happen: So I have a txt file which contain values such as x, y position of a image and then the path to the image itself, like: 400,300,"IMAGE_FILE_PATH" then on the love.load() I want to "get" those values from the file, how can I do that? :| Thx ...
by louie999
Fri Mar 06, 2015 3:28 pm
Forum: General
Topic: Will this be hard or easy?
Replies: 2
Views: 1603

Re: Will this be hard or easy?

It will be hard. Finishing a game is always hard. From what you write, it seems you haven't finished a game before. If you go ahead and start an overly ambitious project, you will most likely get frustrated quickly and then stop. My advice for you: Start small. Make some simple and small games, may...
by louie999
Fri Mar 06, 2015 9:09 am
Forum: General
Topic: What's everyone working on? (tigsource inspired)
Replies: 1791
Views: 1502559

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

Gonna try and make a turn-based 2D war game with lots of units and lots of explosions. :awesome:
by louie999
Fri Mar 06, 2015 9:06 am
Forum: General
Topic: Will this be hard or easy?
Replies: 2
Views: 1603

Will this be hard or easy?

So i have this great idea for a game that i want to make, its gonna be a war game where each player's take turns,it will have many units,such as Tanks,Fighter jets,Aircraft Carriers,Destroyers etc. just wondering will this be easy to make? I'm not pro at lua but i know a little bit about it. :)