Just saying hello :)

General discussion about LÖVE, Lua, game development, puns, and unicorns.
User avatar
Ethnar
Prole
Posts: 7
Joined: Sat Nov 15, 2008 7:07 pm
Location: Poland
Contact:

Just saying hello :)

Post by Ethnar »

Hey there,

I just wanted to join the band and praise the LOVE. :) It works great and is very (well, almost ridiculously ;) ) easy. It's just awesome. So far (just starting a little project on my own) everything I really needed was already included.

I have just one little question regarding packages (*.love files) and managing files in the code. I was trying to use io.open() function to check whether a file exists and if it does, load it with love.graphics.newImage(). Usually this works fine, however - it seems that once everything is packed into *.love, io.open() doesn't check the package itself for the file, only the path where *.love file is placed. Is there any LOVE method to check if file exists or read files at all?

Cheers, :)
Ethnar

PS I'm not really sure that posts like this belong here, but I hope I won't hurt anyone placing it here ;)
PS2 Sorry if my actual question is trivial/covered in reference manual, I just wanted to use it as an excuse to say hi ^^
User avatar
rude
Administrator
Posts: 1052
Joined: Mon Feb 04, 2008 3:58 pm
Location: Oslo, Norway

Re: Just saying hello :)

Post by rude »

Hello, and thanks! ^^

To access files (in both .love and folder cases), you should use love.filesystem, and avoid standard io. Specifically, you can use love.filesystem.exists() to check for existing files.
User avatar
mike
Administrator
Posts: 364
Joined: Mon Feb 04, 2008 5:24 pm

Re: Just saying hello :)

Post by mike »

PS: Hi! :D
Now posting IN STEREO (where available)
User avatar
Ethnar
Prole
Posts: 7
Joined: Sat Nov 15, 2008 7:07 pm
Location: Poland
Contact:

Re: Just saying hello :)

Post by Ethnar »

Thank you for the answer regarding files Rude, your post was most helpful.

Also, thanks for a warm welcome, it's much appreciated. :)

Well, time to get back to work. ;)
User avatar
qubodup
Inner party member
Posts: 775
Joined: Sat Jun 21, 2008 9:21 pm
Location: Berlin, Germany
Contact:

Re: Just saying hello :)

Post by qubodup »

Ethnar wrote:
letta.png
letta.png (23.78 KiB) Viewed 8464 times
Hello :)
Attachments
letta.tex.txt
(1.36 KiB) Downloaded 312 times
lg.newImage("cat.png") -- made possible by lg = love.graphics
-- Don't force fullscreen (it frustrates those who want to try your game real quick) -- Develop for 1280x720 (so people can make HD videos)
User avatar
rude
Administrator
Posts: 1052
Joined: Mon Feb 04, 2008 3:58 pm
Location: Oslo, Norway

Re: Just saying hello :)

Post by rude »

What is the meaning of this? (@qubodup)
User avatar
qubodup
Inner party member
Posts: 775
Joined: Sat Jun 21, 2008 9:21 pm
Location: Berlin, Germany
Contact:

Re: Just saying hello :)

Post by qubodup »

rude wrote:What is the meaning of this? (@qubodup)
It's a running gag or something. Wait, don't they call this 'meme' now?

It's also elegant. (both)

And elegant + elegant = 2elegant, which is doublepluselegant.

And elegant = good & gentlewoman-like
lg.newImage("cat.png") -- made possible by lg = love.graphics
-- Don't force fullscreen (it frustrates those who want to try your game real quick) -- Develop for 1280x720 (so people can make HD videos)
User avatar
appleide
Party member
Posts: 323
Joined: Fri Jun 27, 2008 2:50 pm

Re: Just saying hello :)

Post by appleide »

Hi :)
Just curious are you Ethnar from Wesnoth?

@qubodup. I cringed at myself. :<
User avatar
qubodup
Inner party member
Posts: 775
Joined: Sat Jun 21, 2008 9:21 pm
Location: Berlin, Germany
Contact:

Re: Just saying hello :)

Post by qubodup »

appleide wrote:@qubodup. I cringed at myself. :<
? I fail to follow you :oops:
lg.newImage("cat.png") -- made possible by lg = love.graphics
-- Don't force fullscreen (it frustrates those who want to try your game real quick) -- Develop for 1280x720 (so people can make HD videos)
User avatar
Ethnar
Prole
Posts: 7
Joined: Sat Nov 15, 2008 7:07 pm
Location: Poland
Contact:

Re: Just saying hello :)

Post by Ethnar »

I must admit I got confused by you, qubodup, as well. Guess you just found it funny that my post has letter-like structure.

Hello appleide. That's right, as far as I'm concerned Ethnar on Wesnoth and here is the same person. :) Did I draw so much attention that you actually remember me? ;)

And well, I should get to the point, right? :)

So, I'm writing that little ^^ project of mine and it seems that I have some issues with performance. I started writing alpha-version of an RPG client and the work is going pretty smooth... except that two friends of mine, with not that good GPUs get 1 fps... tops. On my machine, I get 30 fps which ain't really that bad - using benchmark posted around here, on this forum I get 330 fps +-40 depending on amount of objects.

Now is there something I can do to improve my code? The display method is pretty much optimized: I don't display obscured blocks, put a reasonable limit on the amount of fields displayed outside the scene... perhaps another file format would help? Enabling an option or two? Switch color depth (if that's possible and assuming default is 32-bit)?
Perhaps something a linux (ubuntu or gentoo) user can do to increase performance?

I attach a file - controls are:
Arrows - walk,
R - rotate screen
Q - quit
F - fullscreen

Don't mind few bugs - I'm aware of them and they'll be fixed soon. If I can tweak performance. :)
Attachments
GEE.love
(35.36 KiB) Downloaded 376 times
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests