Hello, I'm Asher. I'm both new to the forums as well as LUA and Love2D. So I wanted to know where everyone thinks I should get started, obviously I need to learn LUA, so I figure that's the first step, but if there is anything any of you think I should know, please tell me.
I have learned the Basics of a few other languages (so I understand all the underlying functionality of programming) including Processing, very little of Basic and also Python. The reason I hopped around was for logistical reasons, but the two languages I really want to learn are LUA and C++. so any help is much appreciated.
Where to Start?
Re: Where to Start?
AsherOS wrote:Hello, I'm Asher. I'm both new to the forums as well as LUA and Love2D. So I wanted to know where everyone thinks I should get started, obviously I need to learn LUA, so I figure that's the first step, but if there is anything any of you think I should know, please tell me.
I have learned the Basics of a few other languages (so I understand all the underlying functionality of programming) including Processing, very little of Basic and also Python. The reason I hopped around was for logistical reasons, but the two languages I really want to learn are LUA and C++. so any help is much appreciated.
the first few chapters of programing in Lua http://www.lua.org/pil/ are worth a read so that you can get your head around the syntax etc, then check out the tutorials on the wiki.
Re: Where to Start?
If you are new to Lua I would say, start by learning how tables work since tables are the primary and unique data storage that the language offers. Love2D is only a tool so I wouldn't really spend too much time 'learning how it works'. The point of a game engine is that you don't need to know how everything works.
C++ on the other hand is much more complicated. You don't really need to know C++ if you want to make games in Love2D. I suppose that if you want to learn C++ the easiest route is to start learning the STL data structures like vectors, lists, maps and so on. Once you know the ins and outs of STL you can try making your own data structures which will introduce you to templates and object oriented design.
C++ on the other hand is much more complicated. You don't really need to know C++ if you want to make games in Love2D. I suppose that if you want to learn C++ the easiest route is to start learning the STL data structures like vectors, lists, maps and so on. Once you know the ins and outs of STL you can try making your own data structures which will introduce you to templates and object oriented design.
Re: Where to Start?
Thanks for the replies. I figure I'll start out with that LUA intro guide. And don't worry I know Love2D is only a framework, but it seems like the best option for making 2D games with LUA. As for C++, I'll learn that when I have a strong background in programming with simpler languages.
Thanks again. Also, is there anything on Programming structure for games? Because that's always the hardest thing for me to wrap my head around, when it comes to programming.
Thanks again. Also, is there anything on Programming structure for games? Because that's always the hardest thing for me to wrap my head around, when it comes to programming.
- Taehl
- Dreaming in associative arrays
- Posts: 1025
- Joined: Mon Jan 11, 2010 5:07 am
- Location: CA, USA
- Contact:
Re: Where to Start?
The structure of a game is unique to every game. Out of the six-ish games I've made with Love, every one of them worked very differently. The general idea is Input (player presses buttons) -> Update (make game objects do things) -> Draw (show the game stuff on the screen), but that's where the similarities start to break down.
Last edited by Taehl on Tue Sep 06, 2011 4:45 am, edited 1 time in total.
Earliest Love2D supporter who can't Love anymore. Let me disable pixel shaders if I don't use them, dammit!
Lenovo Thinkpad X60 Tablet, built like a tank. But not fancy enough for Love2D 0.10.0+.
Lenovo Thinkpad X60 Tablet, built like a tank. But not fancy enough for Love2D 0.10.0+.
Re: Where to Start?
Just use a structure that makes sense to you. Frameworks like LÖVE give you a lot of flexibility.
Re: Where to Start?
Thanks! I'll keep that in mind. could someone give me an example, using a platformer game? I understand inputs and outputs, but I was more wondering about the things that are handled by the game, like the AI. How do you make the AI modular?
- SoggyWaffles
- Citizen
- Posts: 72
- Joined: Sun Jan 02, 2011 3:27 am
- Location: Wyoming, USA
Re: Where to Start?
The main things I learned from coming to Lua from Python:
- +Lua's table structure is VASTLY different
+Lua isn't a traditional OOP structure. It doesn't have the built in class structure that Python has
"Beneath the clouds lives the Earth-Mother from whom is derived the Water of Life, who at her bosom feeds plants, animals and men." ~Larousse
Re: Where to Start?
This is a bit of a tricky question. The short answer I believe is: depends on how specific the behavior of your AI agents will be. For platformers it's pretty easy to make modular behaviors because 99% of the time agents need to either move or rotate.AsherOS wrote:I understand inputs and outputs, but I was more wondering about the things that are handled by the game, like the AI. How do you make the AI modular?
State machines are good for some types of AI but are not modular at all because the transitions between states are usually coded into the states themselves. There's another approach called behavior trees. I actually wrote a couple of articles on programming AI in Lua using behvaior trees:
http://2dengine.com/doc_1_3/gs_ai.html
http://2dengine.com/doc_1_3/gs_ai2.html
Re: Where to Start?
Thanks, your tutorials are very helpful. I guess I'll have to get my LUA feet going now.
Who is online
Users browsing this forum: Google [Bot] and 2 guests