Poster | Thread |
BoingBear
| |
Re: Experienced coders, bring me up to date a bit on coding systems. Posted on 15-Jan-2017 21:53:33
| | [ #21 ] |
|
|
|
Regular Member |
Joined: 28-Oct-2015 Posts: 140
From: Unknown | | |
|
| @Zylesea
Do you know which version of Lua Hollywood is based on, or compatible with? That would help me choose which version of the "Programming in Lua" book to purchase. |
|
Status: Offline |
|
|
Bugala
| |
Re: Experienced coders, bring me up to date a bit on coding systems. Posted on 16-Jan-2017 6:30:46
| | [ #22 ] |
|
|
|
Cult Member |
Joined: 21-Aug-2007 Posts: 649
From: Finland | | |
|
| @BoingBear
Yes, I have "programming in LUA" i think 2nd or 3rd edition, i used that one to learn about object oriented programming (or the LUA equivalent of that).
But what I am looking for now is if there are some ready codes available that i can use so that i can simply attach to my classes in such way that they would for example get physical behavior and different kind of movements for them, without myself needing to make them from scratch.
It sounded based upon one of the earlier replies (#4) that for example Unity Engine is basically something like that, I just guess it doesnt have direct LUA support?
Sorry if my question is bit messy, but one of the problems is that I am not even sure which terms to use. Before previous year I had always avoided doing anything but with the simplest way, and that included avoiding using classes, hence I am having difficulty in grasping this whole thing. |
|
Status: Offline |
|
|
Zylesea
| |
Re: Experienced coders, bring me up to date a bit on coding systems. Posted on 16-Jan-2017 8:50:40
| | [ #23 ] |
|
|
|
Elite Member |
Joined: 16-Mar-2004 Posts: 2263
From: Ostwestfalen, FRG | | |
|
| @BoingBear
Quote:
BoingBear wrote: @Zylesea
Do you know which version of Lua Hollywood is based on, or compatible with? That would help me choose which version of the "Programming in Lua" book to purchase. |
Don't know for sure, but a good guess is 5.1. At least the Hollywood guide references to "Programming in Lua" _2nd_ edition. Myself, I just purchased a copy of the 3rd edition, got the German translation from a sale on ebay rather cheap 16,99 EUR, will arrive in a few days. For those interested: http://www.ebay.de/itm/192076791027?_trksid=p2060353.m2749.l2649&ssPageName=STRK%3AMEBIDX%3AIT
_________________ My programs: via.bckrs.de MorphOS user since V0.4 (2001) |
|
Status: Offline |
|
|
Templario
| |
Re: Experienced coders, bring me up to date a bit on coding systems. Posted on 16-Jan-2017 12:13:48
| | [ #24 ] |
|
|
|
Elite Member |
Joined: 22-Jun-2004 Posts: 3663
From: Unknown | | |
|
| @Bugala The LUA examples are compatibles with Hollywood, and where to find these examples? because in the LUA site, I can't find these.
|
|
Status: Offline |
|
|
NutsAboutAmiga
| |
Re: Experienced coders, bring me up to date a bit on coding systems. Posted on 16-Jan-2017 22:54:17
| | [ #25 ] |
|
|
|
Elite Member |
Joined: 9-Jun-2004 Posts: 12818
From: Norway | | |
|
| @Bugala
move() { self.x = self.x + 1; }
and
fly() { self.y = self.y - 1; }
you don't need self as long as x or y is private or public variable in the class.
also in C/C++ you can use -= or += looks alot cleener.
move() { x += 1; }
and
fly() { y += - 1; }
for a more correct gavity you might wont to do.
move() { x += speed; if (speed >0) speed--; }
and
fly() { falling_speed += gravity; y += falling_speed; }
If you set falling speed to negative value each time you press UP key, the bird should fly up.Last edited by NutsAboutAmiga on 16-Jan-2017 at 11:03 PM. Last edited by NutsAboutAmiga on 16-Jan-2017 at 11:00 PM.
_________________ http://lifeofliveforit.blogspot.no/ Facebook::LiveForIt Software for AmigaOS |
|
Status: Offline |
|
|