Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags

Hows everyone's project coming

A topic by Rob Miracle created Jul 30, 2017 Views: 629 Replies: 10
Viewing posts 1 to 11
(+1)

How are your projects developing? 

Any help we can provide?

just getting started using the corona engine and lua for the first time, is pretty neat :)

Great!  Keep us informed on your progress!

ok i seem to have a basic grasp on it

pretty powerfull toy, I love how you just connect physics directly to the image object and stuff works. no tick or update loops. Feels a lot more intuitave compared to unitys 2D also.

lua is however missing a few things i am used  to such as vectors and object orientated stuff (like if i want to make my own enemy class)

i found a vector class online. but i struggled to make it work, so i hardcoded some basic stuff 

 and it seems that by using lua tables you can replicate object orientated programming but it is not as convenient

I would ask the question about vectors in our forums:  https://forums.coronalabs.com. I'm sure some of our developers have solved this.  Lua isn't fully object oriented, but you can get close as you have discovered.

Rob

(+1)

You can find many different solutions to get your object oriented classes going in Lua but as an experienced Corona developer, I would suggest something like this:


local function createEnemy()

local enemy = display.newImageRect(....)

enemy.isAttacking = false

enemy.valueHealth = 100

...

return enemy

end


It's pretty much what you've discovered with the tables but I wanted to include an example here.

Here are some of the assets I've created so far. It's the first time I'm creating my own assets and it's been fun! I guess I'll start sharing something more when I put together a prototype that I'm OK with.

(+1)

thanks that worked :) nice example  code

(+1)

Lookin' good @madclown.

Glad it helped :)


Thank you Rob. Hope I can come up with a prototype soon. I'm struggling to find some time to work on the game but I managed to put some of the mechanics in their place.

I don't have a game yet, but I have some "cool" story. I try to make a game in defold at first time and it goes hard and slow. So, yesterday, when I worked hard on future game, my antivirus decided to close the Defold and delete it from computer. Apparently, the program is tired of my inept suffering )))