Page 1 of 1

Question about making a 2D Maple-Story game

Posted: Sat Apr 03, 2010 4:29 am
by ejulius
Greetings,

My name is Edward. I am a student in UCI. I am currently taking a project course called Game Development. We, my team, want to make a game like Maple-Story, with cartoony graphics of small eggs people (with swords and shields and stuff).

We are thinking about using the Love engine, it's a pretty neat engine in my opinion.

My concerns is about the camera. How do you make it so that when i hit the left key, the character will move and so will the background? How would you actually do that? Do you just load the whole map, and as you move left, or right, the background moves? So the camera will move with the character in the game?

This is my first time making a game, I am utterly clueless. So any help, pointers, and suggestions you can give is highly appreciated.

Cheers! :ultrahappy:

Re: Question about making a 2D Maple-Story game

Posted: Sat Apr 03, 2010 7:45 am
by nevon
You've set your goal very high if this is your first game project ever. Perhaps you should learn to crawl before you try to run.

Anyway, there's a camera library available... Somewhere... That should be quite helpful.

Re: Question about making a 2D Maple-Story game

Posted: Sat Apr 03, 2010 7:50 am
by bartbes
No, it shouldn't, it's an outdated behemoth.

The easiest way to move the camera is by just keeping an offset variable somewhere and drawing everything with that offset.

Re: Question about making a 2D Maple-Story game

Posted: Sat Apr 03, 2010 7:57 am
by Robin
Alternatively, you can use love.graphics.translate():

Code: Select all

function love.draw()
    love.graphics.push() -- pushes a new graphics context to the stack
    love.graphics.translate(xoffset, yoffset) -- these are the offset variables bartbes was talking about
                                              --(use love.graphics.translate(xoffset, 0) for horizontal scrolling only)
    -- DRAW GAME STUFF HERE
    love.graphics.pop() -- pops graphics context from the stack
    -- DRAW UI STUFF HERE
end

Re: Question about making a 2D Maple-Story game

Posted: Sat Apr 03, 2010 9:47 am
by nevon
bartbes wrote:No, it shouldn't, it's an outdated behemoth.
Ah, that would explain why I couldn't find it on the Wiki.

Re: Question about making a 2D Maple-Story game

Posted: Mon Apr 05, 2010 3:18 pm
by zachwlewis
Robin wrote:Alternatively, you can use love.graphics.translate():

Code: Select all

function love.draw()
    love.graphics.push() -- pushes a new graphics context to the stack
    love.graphics.translate(xoffset, yoffset) -- these are the offset variables bartbes was talking about
                                              --(use love.graphics.translate(xoffset, 0) for horizontal scrolling only)
    -- DRAW GAME STUFF HERE
    love.graphics.pop() -- pops graphics context from the stack
    -- DRAW UI STUFF HERE
end
How do I mark posts as awesome?

Re: Question about making a 2D Maple-Story game

Posted: Mon Apr 05, 2010 5:20 pm
by kikito
zachwlewis wrote:How do I mark posts as awesome?
The only thing I could find is the little "Bookmark topic" at the bottom. But that bookmarks the whole topic, not individual posts.