Future features

General discussion about LÖVE, Lua, game development, puns, and unicorns.
Green_Hell
Citizen
Posts: 94
Joined: Thu Feb 21, 2008 1:11 am

Re: Future features

Post by Green_Hell »

alxs wrote:
Green_Hell wrote:I understand but I still think the external application is better solution. Let small applications do their work and do it best.
I don't see any arguments :)
I don't need any. ;) You can't change my mind. It's just my vision.
alxs also wrote:Why exactly do you think it's a bad solution?
Because I don't like when application supply functionality of other applications. I think it's unneeded functionality in case of distribution. I's my vision and vision of many other professional software products. For example (compiler x linker, back-end x front-end, OS x package manager).
>>I love LÖVE.<<
Green_Hell
Citizen
Posts: 94
Joined: Thu Feb 21, 2008 1:11 am

Re: Future features

Post by Green_Hell »

I think this discussion is pointless. I don't want to flame. I wanted to say what I think. We both said it and it's up to rude to decide. We can just wait and obey him :)
>>I love LÖVE.<<
User avatar
alxs
Prole
Posts: 31
Joined: Fri Feb 29, 2008 5:22 pm

Re: Future features

Post by alxs »

I am reading the source code now... No offence, guys, but it's a mess.

You have lots of external libraries, evreything is unsorted and you suffer from the typical desease of beginners - creating way too many classes.
In programming - the less is more. Simplicity is the key :)

I have some questions:
1. It seems that love.graphics:setFont() changes ALL the drawn fonts somehow. Weird. If I use this code:
love.graphics:draw("test", 70, 250, 200, love.align_left)
love.graphics:setFont(rpgfont)
love.graphics:draw("test2", 310, 250, 200, love.align_center)
The font will be set the same for both strings! What’s the logic behind this strange behavior?
2. What’s “FontTexGame”?
3. I see that you use certain format for comments – is it for some automated documentation tool?
4. Are you using OpenGL to render 2D graphics in 3D?
5. Why the heck do you need a special library to provide access to the FileSystem??? Isn't C funtions enough?
6. What's "balance"? Is it resource management by counting references?
7. Is there full source code available with all the libaries and VS projects?
8. What's with all the "printf's" in graphic mode???

That's all for now :)
Alex
User avatar
alxs
Prole
Posts: 31
Joined: Fri Feb 29, 2008 5:22 pm

Re: Future features

Post by alxs »

Ok, to be constructive, here are my suggestions:

1. Clearly split system-dependent and system-independent code
Here are some ideas about directory structure:
In the root folder there is only love.cpp
Then there are these folders:
“system” – for all system-dependent stuff, which is further split by platforms
“utils” or “common” - for the auxiliary stuff, like math, command-line parsing, etc.
“lua” – for all Lua interfaces.
“libraries” – for all libraries interfaces/wrappers.
etc.

2. Why do you need to use SWIG when you only have a small number of Lua connections??? Shooting mosquitoes with cannon?

3. Now the most important – architectural change

In my experience the best way of doing 2D library, especially cross-platform – is to allocate Width x Height x 4 buffer and do all drawing manually.

Then to use platform-dependent blitting to flush this buffer to video memory. This way you have minimal dependencies, consistent graphics across platforms, freedom of graphics routines (you write what you need), no bloatware (again, you use only what you need).

I have lots of code for such architecture already and am willing to make it public domain if you want to switch to this scheme.

I understand that you don’t have lots of time. I’d like to start something like “Love 2”. If you will like it – we can gradually switch to it. I see it’s the best way now, to start from scratch.

I will do this anyway because I need a 2D Lua engine. But I prefer to do it under your “LOVE” label and make the code and tools public.
Alex
User avatar
mike
Administrator
Posts: 364
Joined: Mon Feb 04, 2008 5:24 pm

Re: Future features

Post by mike »

alxs wrote:I am reading the source code now... No offence, guys, but it's a mess.
Yes, I know. What you have to take into consideration is that this is the first major project that either of us has undertaken and we all have different ways of doing things, essentially we were never thinking that our programming code was going to be graded (aka: someone was going to look at it.. ever). LÖVE has gotten way more attention than we thought it would get.
alxs wrote:You have lots of external libraries, evreything is unsorted and you suffer from the typical desease of beginners - creating way too many classes.
In programming - the less is more. Simplicity is the key :)
Oh, you should have seen it before the last major cleanup... it was an unholy mess.
alxs wrote:I have some questions:
Alright... what do you want now?? </fake anger>
alxs wrote:1. It seems that love.graphics:setFont() changes ALL the drawn fonts somehow. Weird. If I use this code:
love.graphics:draw("test", 70, 250, 200, love.align_left)
love.graphics:setFont(rpgfont)
love.graphics:draw("test2", 310, 250, 200, love.align_center)
The font will be set the same for both strings! What’s the logic behind this strange behavior?
That is because the draw() function is called consecutively and the font isn't reset at the beginning of the function.

Code: Select all

love.graphics:setFont(oldfont) -- this is necessary
love.graphics:draw("test", 70, 250, 200, love.align_left)
love.graphics:setFont(rpgfont)
love.graphics:draw("test2", 310, 250, 200, love.align_center)
alxs wrote:2. What’s “FontTexGame”?
Seems like somebody is snooping. ;)
FontTexGame is an internal test game, so that we can make/test/fix functions before exposing them to Lua.
alxs wrote:3. I see that you use certain format for comments – is it for some automated documentation tool?
I believe that was the idea, yes, but I haven't seen it come to pass yet.
alxs wrote:4. Are you using OpenGL to render 2D graphics in 3D?
Eh.. yes? Not sure what you are asking. Wait for rude to come.. he knows.
alxs wrote:5. Why the heck do you need a special library to provide access to the FileSystem??? Isn't C funtions enough?
I believe that this was done so that we could read from zip files as well as folders.
alxs wrote:6. What's "balance"? Is it resource management by counting references?
Wait for rude.
alxs wrote:7. Is there full source code available with all the libaries and VS projects?
Rude.
alxs wrote:8. What's with all the "printf's" in graphic mode???
Are you asking why we are using printf to output errors and such? Is there any better way until we have developed an internal gui for displaying messages?
alxs wrote:That's all for now :)
For now? Jesus...
Hehe, that's alright. You're keeping us on our toes.. which is good.

About your second post: I am completely dumb when it comes to graphics and SWIG stuff so once again: rude will answer you.
Now posting IN STEREO (where available)
User avatar
alxs
Prole
Posts: 31
Joined: Fri Feb 29, 2008 5:22 pm

Re: Future features

Post by alxs »

mike wrote:What you have to take into consideration is that this is the first major project that either of us has undertaken and we all have different ways of doing things, essentially we were never thinking that our programming code was going to be graded (aka: someone was going to look at it.. ever).
Well, at least you know that the curly braces should be one directly above another :)

When I stumbled upon your engine and before openning the first source code file I said to myself - if these guys also understand where the curly braces belongs - I am totaly with them! :)

I really löve your engine, sorry if I am sometimes unbearable with demands, questions and complains, I don't want to patronize you or anything, it's just my 10+ years of experience as a professional programmer skew the way I look at things :)

I do wish only the best for the löve engine.
Alex
User avatar
mike
Administrator
Posts: 364
Joined: Mon Feb 04, 2008 5:24 pm

Re: Future features

Post by mike »

That's ok, we do appreciate the help... but as I said: we weren't expecting this much attention at this early stage (especially since we are all occupied with our edumacations as well).
Now posting IN STEREO (where available)
User avatar
rude
Administrator
Posts: 1052
Joined: Mon Feb 04, 2008 3:58 pm
Location: Oslo, Norway

Re: Future features

Post by rude »

Gah. In no particular order:

(Numerals to improve reading experience(tm))
  1. The menu was removed for a reason; it wasn't that important.
  2. Yes, having to do the whole start menu thing for each demo is retarded. I was happy with having an installer at all at the time (hail Mike), so I didn't care. Next time: shortcut to folder.
  3. The source code is just fine, what you're trying to say is that it doesn't work for you. 8-) I should send you some of the older iterations with tons of more classes. You would probably get a heart attack.
  4. We tried splitting up the files into folders, but we spent to much time wondering where to put new files and it made looking for files more time consuming. I mostly use Visual Studio anyway, so I just use the "filters" there. That said, I do like the way SDL does it, so maybe we can steal that structure. Use the power of your 10+ years EXP to restore the HP of our file structure without doing Ctrl+A-Del on the src folder.
  5. Which classes do you think are unnecessary? (Do not make this into a OO vs. functional programming discussion. I like both. Don't ruin it). You may feel there is too much abstraction going on; that is because of potential DirectX-versions of everything later.
  6. Q: "Are you using OpenGL to render 2D graphics in 3D?" A: Yes.
  7. We need PhysFS because it provides a simple interface to compressed files, like Mike said. C functions are enough if time happens to stand still at your planet.
  8. "balance": You got it right. Very primitive, though. Just tested a couple of classes to see if Lua/SWIG delivered on the garbage collection.
  9. There is no full source code for VS, but there's this "Windows SDK". Merge it with the love source. Yes, we use PHP to do some stuff :twisted:. I will hear naught of it!
  10. SWIG: Because creating a Lua interface takes a lot of time, no matter how small. We can update the interface by the click of one .bat file by using SWIG.
  11. I am personally open to architectural changes, but we started LÖVE to learn C++, Lua, OpenGL etc, so as for "LOVE 2"; it will be cold day in hell before we let you do all the fun parts :twisted:. Also, I'm not sure what you're trying to suggest anyway. It was more of a your-architecture-sucks kind of comment :D. It sounds like you want to do what SDL does, which I thought was slow as death itself.
  12. Good idea with "Made in LÖVE", LÖVE-award, etc.
  13. OBEY: Just thought it would be funny if all the avatars said "OBEY". And actually, it is ^.^
Anyway, it's nice that you have a burning desire to help us. This way we can soak up more Santa Power (knowledge). :mrgreen:
User avatar
alxs
Prole
Posts: 31
Joined: Fri Feb 29, 2008 5:22 pm

Re: Future features

Post by alxs »

Also in no particular order :)

I've started coding the LOVE 2 project, basically just creating a solid and (hopefully) logical structure from scratch and adapting pieces of my existing code.

I'll send it to you for comments as soon as it will reach some "stable" phase :)

I've read about PhysFS and it, indeed, makes sense to use it. I already re-compiled the DLL without all the crap for Quake and Descent support.

I will code only the Windows platform, so somebody will have to fill in the missing parts for other OS'es :)

I also love both OO and functional, probably because I started with the functional programming. So - no problem with that.
I usually go with the most sensible, clear and compact approach :)

Does OpenGL allow the whole buffer copy into video memory? As for the slowness - for 2D it isn't slow, really.
Sure, copying to video memory takes time, but if you work with alpha you need to _read_ from memory a lot and if it's video memory - THAT will be slow.
Alex
User avatar
rude
Administrator
Posts: 1052
Joined: Mon Feb 04, 2008 3:58 pm
Location: Oslo, Norway

Re: Future features

Post by rude »

alxs wrote:I've started coding the LOVE 2 project, basically just creating a solid and (hopefully) logical structure from scratch and adapting pieces of my existing code.
Very well, but like I said: we're not going to let you do all the fun parts. 8-)
Post Reply

Who is online

Users browsing this forum: Bing [Bot], darkfrei and 62 guests