Page 5 of 6

Re: Grid Engine

Posted: Sat Nov 20, 2010 10:53 pm
by arquivista
One key point of LOVE is that works more like an realtime engine than classic step-by-step language is understand gamestates. You really need to dominate well that and understand it since is a masterkey to do things right in LOVE. It's probably the key concept in LOVE.

When I start I have some hard times till I start to use gamestates and that opened and simplified a lot of things. For example it will also simplify and get ways of use same keys with different result simply switching from gamestates.
You should check Kikito' library Mindstate (http://love2d.org/wiki/MindState). There is another libraries using gamestates (HUMP for example I think).
ZenX2 wrote: I have been reluctant to do this simply because it makes it difficult to program.
Really, if you start "gamestating" things will be easier and not harder to program.

EDITED: Check also forum for discussions like
http://love2d.org/forums/viewtopic.php? ... 43&p=20998

Re: Grid Engine

Posted: Sat Nov 20, 2010 11:12 pm
by Lap
arquivista wrote: Really, if you start "gamestating" things will be easier and not harder to program.
100% agree. You should see how terribly messy things have gotten in one of my projects because I didn't incorporate gamestates from the get go. I'm pretty sure some of you guys would convulse looking at it.

Re: Grid Engine

Posted: Sun Nov 21, 2010 12:27 am
by ZenX2
I don't think gamestates are absolutely necessary, but I might write them for my class library.
Also, I wrote two quick functions for saving text to files and am adding JSON support.

Re: Grid Engine

Posted: Sun Nov 21, 2010 12:43 am
by TechnoCat
ZenX2 wrote:Also, I wrote two quick functions for saving text to files and am adding JSON support.
Lua is already a pretty good configuration language. Try using a Lua table instead of JSON.

Re: Grid Engine

Posted: Sun Nov 21, 2010 1:08 am
by ZenX2
JSON is a pure-lua table encoding module, that lets you convert tables to strings and back.
While working on saving, I figured out how to automatically require files in the ext and ents directories :cool:
Too bad enumerate doesn't work outside of the .love :cry:

Re: Grid Engine

Posted: Sun Nov 21, 2010 9:13 am
by Robin
ZenX2 wrote:Too bad enumerate doesn't work outside of the .love :cry:
You shouldn't try to access files outside of the .love and the write directory. In SELÖVE, you can't do it at all.

Re: Grid Engine

Posted: Mon Nov 22, 2010 12:35 am
by ZenX2
I've gotten multiple-keys working, and it sucks. The movement is awkward, the activation is strange, you can press the key fast to move extra fast, and overall it isn't too great. Sorry, I'll upload this version, but I won't be continuing development with it. :P
EDIT: By it I mean the controls I was semi-pressured by two strangers to use :crazy:

Re: Grid Engine

Posted: Thu Nov 25, 2010 7:35 pm
by ZenX2
I've decided to switch to MiddleClass, because my class system was malfunctioning.
Of course, having to say class("name") or name:new() is ugly, so I fixed it to use class.name() and name() :crazy:
Following a brief pause in development, I've started working on some features useful for an adventure game, like a dialogue menu.

Re: Grid Engine

Posted: Thu Nov 25, 2010 7:41 pm
by thelinx
You can already do name() with MiddleClass.

Re: Grid Engine

Posted: Thu Nov 25, 2010 8:17 pm
by ZenX2
Oh yeah, I had thought that you couldn't until I looked in the code. At least I can now say class.name().
It's basically the same as my previous library, but inheritance works.
EDIT: New version! Adds pausing with p or the Pause(true or false) function, dialogue menus, and some work on saving.