Search found 399 matches

by Kadoba
Sat Jun 18, 2011 9:00 am
Forum: Libraries and Tools
Topic: middleclass & extras: middleclass 3.0 is out!
Replies: 243
Views: 77884

Re: middleclass & middleclass-extras: OOP for LUA

I use the .lua extensions on all my require paths and I don't have any trouble. I believe it only expands the dots if it can't find the literal file first. (Although this may be different outside windows)
by Kadoba
Thu Jun 16, 2011 11:59 am
Forum: Support and Development
Topic: Polygon Collision?
Replies: 8
Views: 3728

Re: Polygon Collision?

It sounds like HardonCollider would be best suited for you. It's very easy to set up and use.
by Kadoba
Tue Jun 14, 2011 6:10 pm
Forum: General
Topic: Draw Order
Replies: 10
Views: 4896

Re: Draw Order

Unless you have some information you can (given an object's position) use to tell which object will come next, you won't be able to sort faster than table.sort does. Using a linked list wont make things faster. If it did, you'd had invented a sorting algorithm that can sort faster than in O(n logn)...
by Kadoba
Mon Jun 13, 2011 9:51 pm
Forum: General
Topic: Creating shortcut functions, is it bad form?
Replies: 8
Views: 1760

Re: Creating shortcut functions, is it bad form?

Basically, reliance on globals make your program easier to break and more confusing to follow. They're relatively well behaved in lua but can still cause problems. Imagine somebody wanted to create a lua library and they have never heard of love2d and wanted to create, say, a voice networking librar...
by Kadoba
Mon Jun 13, 2011 7:27 pm
Forum: General
Topic: Creating shortcut functions, is it bad form?
Replies: 8
Views: 1760

Re: Creating shortcut functions, is it bad form?

If you do create shortcuts then create them like slime did. And strictly speaking, yes your example is bad form but mostly because you're putting things directly in the global scope. However if you define shortcuts locally in each file it won't pollute the global scope, it will let you keep your sho...
by Kadoba
Mon Jun 13, 2011 5:31 pm
Forum: General
Topic: Draw Order
Replies: 10
Views: 4896

Re: Draw Order

Sorry I guess I wasn't very clear about my problem. I'm already using layers and layers are fine enough if you aren't concerned about the draw order of individual objects within those layers. But let's say I want to base the draw order of a game object off its Y position so those with a smaller Y va...
by Kadoba
Mon Jun 13, 2011 3:20 pm
Forum: General
Topic: Draw Order
Replies: 10
Views: 4896

Re: Draw Order

You may want to look at my implementation which is contained in my framework . The main files you'll want to look at are World.lua (the draw, _updateLists, and _setLayers are the most important to this case), and Entity.lua . I'm having trouble seeing the big picture but the idea is to use linked l...
by Kadoba
Mon Jun 13, 2011 3:53 am
Forum: General
Topic: Draw Order
Replies: 10
Views: 4896

Draw Order

So I'm trying to get my game objects to draw in an order based on a draw index. Basically objects that have a lower draw index gets drawn first. So if I have two objects and object A has a draw index of 2 and object B has a draw index of 1 then object B will get drawn first and object A will get dra...
by Kadoba
Sun Jun 12, 2011 6:16 pm
Forum: Games and Creations
Topic: Monopoly game (playable demo)
Replies: 7
Views: 8628

Re: Monopoly game (playable demo)

A cross platform 2d game framework powered by SDL and OpenGL with an API exposed in lua? That'll never work. :crazy: Maybe if it had a rocking pastel theme.
by Kadoba
Sat Jun 11, 2011 9:16 pm
Forum: Libraries and Tools
Topic: My Adventure Game Engine - Making Way For Adventure Engine 2
Replies: 367
Views: 147641

Re: My Adventure Game Engine - Making Way For Adventure Engi

I think the real danger is that by adding too many features code becomes hard to use and unmaintainable. Customizable code usually means giving the user room to work rather than trying to do everything for them.