Question about making a 2D Maple-Story game

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
Post Reply
ejulius
Prole
Posts: 3
Joined: Sat Apr 03, 2010 4:13 am

Question about making a 2D Maple-Story game

Post 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:
User avatar
nevon
Commander of the Circuloids
Posts: 938
Joined: Thu Feb 14, 2008 8:25 pm
Location: Stockholm, Sweden
Contact:

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

Post 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.
User avatar
bartbes
Sex machine
Posts: 4946
Joined: Fri Aug 29, 2008 10:35 am
Location: The Netherlands
Contact:

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

Post 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.
User avatar
Robin
The Omniscient
Posts: 6506
Joined: Fri Feb 20, 2009 4:29 pm
Location: The Netherlands
Contact:

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

Post 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
Help us help you: attach a .love.
User avatar
nevon
Commander of the Circuloids
Posts: 938
Joined: Thu Feb 14, 2008 8:25 pm
Location: Stockholm, Sweden
Contact:

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

Post 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.
User avatar
zachwlewis
Citizen
Posts: 70
Joined: Fri Mar 19, 2010 7:58 am
Location: Huntsville, AL
Contact:

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

Post 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?
User avatar
kikito
Inner party member
Posts: 3153
Joined: Sat Oct 03, 2009 5:22 pm
Location: Madrid, Spain
Contact:

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

Post 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.
When I write def I mean function.
Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 3 guests