Camera

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.
User avatar
yetneverdone
Party member
Posts: 446
Joined: Sat Sep 24, 2016 11:20 am
Contact:

Re: Camera

Post by yetneverdone »

KyleFlores1014 wrote: Tue May 30, 2017 2:57 pm Ok thanks, Im gonna try to implement this hump gamestates in my game, but have you found a solution to the camera problem?
You dont need hump gamestates. The template ive provided for you works

xnick1 fixed it for you. Then just apply the camera:move(l
KyleFlores1014
Citizen
Posts: 73
Joined: Thu May 25, 2017 1:43 pm

Re: Camera

Post by KyleFlores1014 »

the stuffs.zip?
User avatar
yetneverdone
Party member
Posts: 446
Joined: Sat Sep 24, 2016 11:20 am
Contact:

Re: Camera

Post by yetneverdone »

KyleFlores1014 wrote: Wed May 31, 2017 4:46 am the stuffs.zip?
Yes, extract that to see individual files. Ive also commented everything you need to know as a primer in the main.lua
KyleFlores1014
Citizen
Posts: 73
Joined: Thu May 25, 2017 1:43 pm

Re: Camera

Post by KyleFlores1014 »

But will the camera module be fixed?
User avatar
yetneverdone
Party member
Posts: 446
Joined: Sat Sep 24, 2016 11:20 am
Contact:

Re: Camera

Post by yetneverdone »

KyleFlores1014 wrote: Wed May 31, 2017 5:04 am But will the camera module be fixed?
First of all, it's not broken, you are just implementing it wrong. After you organize your code, that should be easy to fix.
KyleFlores1014
Citizen
Posts: 73
Joined: Thu May 25, 2017 1:43 pm

Re: Camera

Post by KyleFlores1014 »

Here is my code its already organized
Attachments
game.love
(509.1 KiB) Downloaded 103 times
User avatar
yetneverdone
Party member
Posts: 446
Joined: Sat Sep 24, 2016 11:20 am
Contact:

Re: Camera

Post by yetneverdone »

KyleFlores1014 wrote: Wed May 31, 2017 8:50 am Here is my code its already organized
Okay, ill check it later and fix the camera
KyleFlores1014
Citizen
Posts: 73
Joined: Thu May 25, 2017 1:43 pm

Re: Camera

Post by KyleFlores1014 »

Oh ok thanks in advance
User avatar
yetneverdone
Party member
Posts: 446
Joined: Sat Sep 24, 2016 11:20 am
Contact:

Re: Camera

Post by yetneverdone »

KyleFlores1014 wrote: Wed May 31, 2017 12:20 pm Oh ok thanks in advance
-_- you didnt follow the template. You just organized your folder structures. Nevermind.

The problem with your code is that you're making a bunch of if/elseif statements in your love.load function, when you switched your gamestate, the load function of that gamestate is not called. Therefore all the initialization within that state is not initialized.

I suggest you follow the template i gave you, i've added a switch function to easily fix the above bug in your code.
stuffs.zip
(1.65 KiB) Downloaded 93 times
Sorry for not fixing your camera module, it's a lot of work. I can't fix it while seeing such a messy code. Sorry for the OCD i have
KyleFlores1014
Citizen
Posts: 73
Joined: Thu May 25, 2017 1:43 pm

Re: Camera

Post by KyleFlores1014 »

I rewrote my code but now i cant add the on screen controls like before. because of the local ={}
Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 1 guest