Search found 33 matches

by waraiotoko
Thu Feb 16, 2012 5:29 pm
Forum: Support and Development
Topic: Basic concepts of OOP
Replies: 10
Views: 5994

Re: Basic concepts of OOP

thelinx wrote:You just define enemy.add as

Code: Select all

function enemy.add(self, args)
  print(args.race, args.weapons)
end
Agreed!
by waraiotoko
Thu Feb 16, 2012 5:05 pm
Forum: Support and Development
Topic: Basic concepts of OOP
Replies: 10
Views: 5994

Re: Basic concepts of OOP

bartbes wrote:You shouldn't be using the arg table anymore, it's been deprecated back in lua 5.1, use ... now.
Sorry, didn't realize my manual was that old.
by waraiotoko
Thu Feb 16, 2012 4:54 pm
Forum: Support and Development
Topic: Basic concepts of OOP
Replies: 10
Views: 5994

Re: Basic concepts of OOP

...can I get a way of direct define the values I really want and don't define it all the rest/between? I would need some kind of enemy:add(...) "variable/value" parser instead of direct lua variable assign? I think what you're looking for is a function with the format: function foo(...) w...
by waraiotoko
Tue Feb 07, 2012 11:27 pm
Forum: Support and Development
Topic: How's my style?
Replies: 4
Views: 2543

Re: How's my style?

The last comment is that ui:drawTextWindow's implementation is just too big. It does too many things. You seem to understand that; you have tried to "make it easier to understand" by adding comments. Instead, move each chunk to its own function (probably a local private function)... Thank...
by waraiotoko
Tue Feb 07, 2012 9:13 pm
Forum: Support and Development
Topic: [SOLVED] Running Love in a new terminal (Linux)
Replies: 2
Views: 2082

Re: [SOLVED] Running Love in a new terminal (Linux)

I was going to recommend making a small shells script and just close Love through that, glad you figured it out!
by waraiotoko
Tue Feb 07, 2012 7:15 pm
Forum: Support and Development
Topic: Shooting enemies
Replies: 7
Views: 3199

Re: Shooting enemies

Yeah, insert them in a table so you can show some nice explosions before removing them :crazy: or don't remove them if you want them to be show them dead on the floor or can be risen again as zombies :D I never delete enemies, you could potentially resurrect them even after re-starting the game and...
by waraiotoko
Tue Feb 07, 2012 6:48 pm
Forum: Support and Development
Topic: Shooting enemies
Replies: 7
Views: 3199

Re: Shooting enemies

If you spawn many enemies and kill them rapidly your game crashes (cannot index enemy table), since you edit the table you're looping through.
by waraiotoko
Tue Feb 07, 2012 6:35 pm
Forum: Support and Development
Topic: How to load map from txt file
Replies: 6
Views: 4687

Re: How to load map from txt file

You could save everything to a .lua file and just load it with the built in Lua functions.

EDIT: Nevermind, didn't read enough replies. TSerial seems like what you need.
by waraiotoko
Tue Feb 07, 2012 6:31 pm
Forum: Support and Development
Topic: How's my style?
Replies: 4
Views: 2543

How's my style?

I've been programming a SRPG for a few days now and am slowly building useful tables and functions to use during development. I really don't have someone who can comment on my style in person, so I figured that some advice from the Love2D community would be nice. This code stands on it's own, so you...
by waraiotoko
Mon Jan 16, 2012 6:59 am
Forum: Libraries and Tools
Topic: Some tries with steering
Replies: 7
Views: 5364

Re: Some tries with steering

This is really, really neat. Going to look at the source tomorrow.