RTS-ish system for multiple 'entities'

General discussion about LÖVE, Lua, game development, puns, and unicorns.
Post Reply
User avatar
RonanZero
Citizen
Posts: 90
Joined: Mon Oct 20, 2014 3:33 am

RTS-ish system for multiple 'entities'

Post by RonanZero »

Whatever you call it, think RTS or grunt enemies, I need a LOT of the exact same 'entity' as I call it on the screen at once. Ya it's just a table with x and y values and some images and of course it's own think/draw function. Now I would just call draw function in the normal love.draw but that only let's me make one of them, if I add more it will use a hivemind (exact same values I guess) or something.
while true do end;
User avatar
undef
Party member
Posts: 438
Joined: Mon Jun 10, 2013 3:09 pm
Location: Berlin
Contact:

Re: RTS-ish system for multiple 'entities'

Post by undef »

Uhm, is there a question?
twitter | steam | indieDB

Check out quadrant on Steam!
User avatar
s-ol
Party member
Posts: 1077
Joined: Mon Sep 15, 2014 7:41 pm
Location: Cologne, Germany
Contact:

Re: RTS-ish system for multiple 'entities'

Post by s-ol »

RonanZero wrote:Whatever you call it, think RTS or grunt enemies, I need a LOT of the exact same 'entity' as I call it on the screen at once. Ya it's just a table with x and y values and some images and of course it's own think/draw function. Now I would just call draw function in the normal love.draw but that only let's me make one of them, if I add more it will use a hivemind (exact same values I guess) or something.
Read up on lua OOP (object orientated programming)!

s-ol.nu /blog  -  p.s-ol.be /st8.lua  -  g.s-ol.be /gtglg /curcur

Code: Select all

print( type(love) )
if false then
  baby:hurt(me)
end
Post Reply

Who is online

Users browsing this forum: Google [Bot] and 5 guests