Hi all!
I explored löve 1 week ago and I'm very happy with it
I will ask my questions here, in this thread. Now I just have one:
SCROLLING
I am a newbie at game dev, but I did some simple stuff in C++ with SDL. Basically you can copy surfaces, or part of them on top of other surfaces. I had a big "game world" surface and I cut out screensized pieces of it and basically scrolling was done.
But you can't copy surfaces (images) on top of each other in Löve, so I can't make the big "world surface".
How should I make scrolling here? Please help me.
I must tell you that with the coming release of 0.6.0 CAMERA is becoming near-obsolete, for my own game I've decided on dropping it when I get around to it.
as a first project, today I made PONG. Good learning experience.
The top and the bottom of the screen are shapes of a static body in the physics world.
The player walls are also shapes of static bodies, if the players push their buttons, I modify their positions with body:setPosition().
There is only 1 dynamic object, the ball itself.
The problem is when there is the serving phase, I randomize the starting velocities of the ball, I set these with body:setvelocity().
The ball won't move at all UNLESS I set gravity in the physics world, which obviously is just PLAIN BAD in this game. I dont want any gravity!
I got to set the gravity at least ~ (0, 1) or the ball won't move at all. I made the program print out the randomized and current velocity values of the ball. If there is no gravity, it will print that the ball has for example a velocity = -120, 70 but it won't move at all.
This is not directly related to gravity. You see, what I think has happened is that the ball "fell asleep". You need to call :setSleep(false) on the body at the start of every update. In LÖVE 0.6.0 you will be able to just call :setAllowSleep(false) on the body once after it is created.
I'll just consider this thread to be a reason for me not to post a new thread asking a newbie question.
Does anyone have a simple example of basic collision? I just need something to give me an idea of how it works, so I kind implement it into my own code.