Page 2 of 4

Re: Problem with Libraries

Posted: Sat Mar 17, 2012 10:35 am
by Robin
YGOFreak1997 wrote:How you probably know by now, I am quite new to computer programming, but a class is kind of a program and a method is part of this "program" you can call within your code, right?
Nope. This is part of Object Oriented Programming, which is a bit abstract. People new to programming often have difficulties understanding it.

Here's a very basic and shallow explanation of classes:

A class is like a species, or a type. For example, you would have a class called House. And there is not just one house, but a lot of them. My house is a House, your house is a House. So the class House is a bit abstract, but my house and your house are called instances, and they are actual houses.

In programming languages, classes can have methods, that say what you can do with those classes. For example, the class Dog has the method bark(). So if we have a Dog called lassie, we can do lassie:bark().

I recommend getting familiar with more basic parts of programming before diving in OOP, but that's your call.

Re: Problem with Libraries

Posted: Sat Mar 17, 2012 5:38 pm
by YGOFreak1997
Thank you!

Yeah I actually didn't hink that it would be easy. A programming language is at least as difficult to learn as a normal language. You're a pro, it hink, can you give a newbie like me some advice or a point to start? As I wrote above, i thought that it would be good to start a not oo difficult project at first and then look things up that I don't know...

Re: Problem with Libraries

Posted: Sat Mar 17, 2012 6:33 pm
by Robin
YGOFreak1997 wrote:As I wrote above, i thought that it would be good to start a not oo difficult project at first and then look things up that I don't know...
I agree. The most important thing you need to do when learning to program is keep practising. It probably won't hurt if you try some programming books. Some of my friends really like Head First Java, although that's about Java, not Lua, so I don't know if it will help you... maybe other people have good book suggestions.

Re: Problem with Libraries

Posted: Sat Mar 17, 2012 8:45 pm
by YGOFreak1997
Well, before Lua/Löve, I also tried Visual Basic and Unity/JavaScript. I think Lua is good to start and I will stay with Lua and learn later somethinf like C++ or C# in combination with Unity...

Re: Problem with Libraries

Posted: Mon Mar 19, 2012 7:09 pm
by meoiswa
Trying to make a *networked game without enough programming ability is likely to be a waste of your time. I'd suggest you rather try making small demos and prototypes first.
Anyways, networking is a mildly complex topic in programming, and more so in gaming, you will need a proper understanding of concepts such as OOP, serializing, and obviously, networking.
If you're looking for a good idea for starting, try making a Nyan Cat In Space (iPhone game) clone, its a very simple endless platforming game. This is a project you could make without knowing OOP. Just using what the Wiki gives you should be more than enough (Steer away from love.physics, you don't want to use that for such simple game mechanics!) It would be a perfectly playable game, and it will allow you to develop techniques in both programming and designing a game.

Re: Problem with Libraries

Posted: Mon Mar 19, 2012 7:46 pm
by Trappingnoobs
YGOFreak1997 wrote:Hey Guys, you can call me a noob, but i just don't get my code to function. It's a problem with some Libraries i think. I just want to implement a few Libraries like parts of Hump and LUBE. AnAL is working, but with LUBE and the other things, iget an error, i'll upload a zipped version of my project so that you can test the code. Please help me, this is my very first game and i want that my multiplayer works ^^

P.S.: If you have any Ideas to make the code or the File management better, tell me, too, please ^^

YGOFreak1997 ^^
I'm sorry, but I just have to say how much I laughed at this bit:
AnAL is working, but with LUBE and the other things

Re: Problem with Libraries

Posted: Mon Mar 19, 2012 9:57 pm
by YGOFreak1997
Hahaha xDDD Oh yeah I didn't see this coming ^^

Re: Problem with Libraries

Posted: Mon Mar 19, 2012 10:09 pm
by YGOFreak1997
@meoiswa I actually thought about making a 2D Platformer but when I thought about how to realise it I got stuck at an important problem: How do you define the "Platforms" or the "Ground", for example? Do you have to do that with things like collision detection (for example HardonCollider) or is there anorher way to realize this? Whatever, l'll try out this networking stuff (I think it's easy if I just use my basic idea: Connect to a client and send the position of the enemy tank every Frame to your connected Partner) and if it gets too difficult, I'll start a Platformer ^^

Re: Problem with Libraries

Posted: Mon Mar 19, 2012 11:56 pm
by meoiswa
There are much simpler ways.
Try this exercise. Try and explain to yourself what is the ground as simply as possible, isn't it something that stops you from falling when you touch it? Then you can deduce that you could simulate the interaction between yourself and the ground by having an object in contact with the "ground" not move downwards.

For example:

Code: Select all

love.update(dt)
   if ball.y > ground then
      ball.y = ball.y - 10
   end
end
Where ground is the height of the ground and ball.y is the vertical position of the ball.

There are plenty of tutorials out there explaining how to do this, but trying to figure it out with simplistic approaches like this will help you figure out more complex stuff later on

Re: Problem with Libraries

Posted: Tue Mar 20, 2012 5:48 am
by YGOFreak1997
So this code above moves the ball downwards until it reaches thes bottom, doesn't it? And how can I do Platforms? This is slightly more complex, I think...