Search found 66 matches

by Dattorz
Mon Jun 24, 2013 2:30 am
Forum: Libraries and Tools
Topic: An entity component example + Take 2!
Replies: 3
Views: 2420

Re: An entity component example + Take 2!

So I am currently using a little class-based OOP library in my engine. I have a base class "Entity" that represents something in the game world, and I subclass it to perform different drawing behaviors - ActorEntity represents an "actor" with a "costume" (a set of anima...
by Dattorz
Wed Jun 19, 2013 1:06 am
Forum: Support and Development
Topic: Is there a point to getters and setters in Lua?
Replies: 15
Views: 11255

Re: Is there a point to getters and setters in Lua?

well, lua numbers don't really have an identity, at least not like the reference types (tables etc) do By identity, I was referring to mathematical identity (EG. a = a). I'm not sure if adding 0 will change its floating point representation (probably not, but). As for overhead, there are far bigger...
by Dattorz
Tue Jun 18, 2013 3:00 am
Forum: Support and Development
Topic: Is there a point to getters and setters in Lua?
Replies: 15
Views: 11255

Re: Is there a point to getters and setters in Lua?

Thanks for all the responses, everyone! I've been toying around a little bit and discovered a couple new things. First, I found that the standard Lua interpreter runs quite a bit slower simply by calling into a setter function versus directly accessing the variable. I timed direct variable access an...
by Dattorz
Mon Jun 17, 2013 2:49 am
Forum: Support and Development
Topic: Is there a point to getters and setters in Lua?
Replies: 15
Views: 11255

Re: Is there a point to getters and setters?

I understand the point of encapsulation. I'm just questioning whether there's any reason to make getter/setter functions since AFAIK Lua doesn't provide much in the way of proper encapsulation - anyone can directly access the variable regardless. It's not like C++ or Java where private variables exi...
by Dattorz
Mon Jun 17, 2013 12:25 am
Forum: Support and Development
Topic: Is there a point to getters and setters in Lua?
Replies: 15
Views: 11255

Is there a point to getters and setters in Lua?

Right now I'm doing some massive API reworking to my LOVE-based game engine, Klua. This project has the first Lua code I ever wrote and it's quite ugly, thus I am revising a large portion of it. One of the things I'm looking to change is the use of thin getter/setter functions. I think at the time I...
by Dattorz
Sat Jun 15, 2013 5:48 pm
Forum: Libraries and Tools
Topic: Super simple script for running love projects on mac
Replies: 21
Views: 10198

Re: Super simple script for running love projects on mac

Why not just put this in your bash profile?

Code: Select all

export PATH=$PATH:/Applications/love.app/Contents/MacOS
After all, that's what $PATH is for.
by Dattorz
Sat Jun 15, 2013 1:03 am
Forum: Libraries and Tools
Topic: Super simple script for running love projects on mac
Replies: 21
Views: 10198

Re: Super simple script for running love projects on mac

I keep a terminal window open to my project directory and just type love . and press Enter. Since it gets added to command history, I can just give the terminal window focus, then press Up and Enter to relaunch. If you aren't on Linux you'll probably need to manually add love to your $PATH environme...
by Dattorz
Sat Jun 15, 2013 12:19 am
Forum: Support and Development
Topic: Prevent game cheating?
Replies: 13
Views: 7430

Re: Prevent game cheating?

IMHO, the best method would be to record a local replay from the player's input, and then send those input sequences to the server, which then validates the input by playing it back in-game. In order for this to work properly, you need to be sure of two things: - If you are drawing any random number...
by Dattorz
Sat Feb 02, 2013 8:57 pm
Forum: General
Topic: good practices, good habits
Replies: 5
Views: 3351

Re: good practices, good habits

Tiled is completely unusable for me until it gains the ability to quickly add pre-defined fixed-size objects into a level. Currently Tiled is optimized for a system where most objects have different sizes, rotations, and other properties versus what most games need, which is most objects of a given ...
by Dattorz
Sat Feb 02, 2013 2:58 am
Forum: General
Topic: Switching to Linux from Win7
Replies: 10
Views: 5566

Re: Switching to Linux from Win7

KDE user here. Some notes about Linux in general: - LOVE works great! - New users often try to install software like they do on Windows by navigating to the website and then downloading and installing from there. On Linux you generally don't want to do this - it's actually more headache than it's wo...