Hello all!
I'm new here. I just started to play around with the engine and I'm truly amazed - big thanks to the authors for making love2d!
First of all - STATEMENT-I'm not a programer. I rather consider myself an art person My last programing experience was a very simple 2d rpg game that I wrote 10 years ago in vicual c++. I hardly remember anything about programing except the basics of basics, so dont be suprised by the questions I'm going to ask
question:
1. I put every object that I draw into love.draw callback. It doesnt seem to be good idea since most of the objects don't have to be refresh very often, for example buttons (in example top part of window.
2. I load background image which is displayed as white color instead of actual image, can't figure out what is wrong since i load it and draw it exactly the same way as it is I do for sprites and they are displayed corecty. load img in love.load,draw in love.draw:
love.graphics.draw(img_back,0,0)
3. One of the game character is going to have earthquake spell. I'm going to visualize it by "shaking" the view. Is there quick and easy way to do it?
many thanks for help and once again - thumbs up for all love2d contributors
virtualfi
PS: why the hell everybody has "obey" word in their avatars???
basic questions
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
- bartbes
- Sex machine
- Posts: 4946
- Joined: Fri Aug 29, 2008 10:35 am
- Location: The Netherlands
- Contact:
Re: basic questions
It's not that bad, but if you really want to optimize here you can try framebuffers.virtualfi wrote: question:
1. I put every object that I draw into love.draw callback. It doesnt seem to be good idea since most of the objects don't have to be refresh very often, for example buttons (in example top part of window.
PO2 Syndromevirtualfi wrote: 2. I load background image which is displayed as white color instead of actual image, can't figure out what is wrong since i load it and draw it exactly the same way as it is I do for sprites and they are displayed corecty. load img in love.load,draw in love.draw:
In generalvirtualfi wrote: 3. One of the game character is going to have earthquake spell. I'm going to visualize it by "shaking" the view. Is there quick and easy way to do it?
You must be a victim of The Evil Plot.virtualfi wrote: PS: why the hell everybody has "obey" word in their avatars???
Re: basic questions
wow, quick and promt reply - thanks!
PO2 syndrome... hehe, I've drawn buttons and strites in power of 2 size. Old habit from 16bit architecture
As fo love.graphics.transform - a cant find anything about that in wiki, could you please provide.
When i just call it without parameters it gives me error indicating that this method doesnt exist at all
As for "evil plot" - sexy idea
PO2 syndrome... hehe, I've drawn buttons and strites in power of 2 size. Old habit from 16bit architecture
As fo love.graphics.transform - a cant find anything about that in wiki, could you please provide.
When i just call it without parameters it gives me error indicating that this method doesnt exist at all
As for "evil plot" - sexy idea
- Robin
- The Omniscient
- Posts: 6506
- Joined: Fri Feb 20, 2009 4:29 pm
- Location: The Netherlands
- Contact:
Re: basic questions
It's actually love.graphics.translate. You can use it as such:virtualfi wrote:As fo love.graphics.transform - a cant find anything about that in wiki, could you please provide.
When i just call it without parameters it gives me error indicating that this method doesnt exist at all
Code: Select all
love.graphics.translate(math.random(-5, 5),math.random(-5, 5)) -- the numbers determine the amount of shaking
Help us help you: attach a .love.
Re: basic questions
this is it! thanks!
- bartbes
- Sex machine
- Posts: 4946
- Joined: Fri Aug 29, 2008 10:35 am
- Location: The Netherlands
- Contact:
Re: basic questions
I keep calling it transform.. sorry, my bad.
- Robin
- The Omniscient
- Posts: 6506
- Joined: Fri Feb 20, 2009 4:29 pm
- Location: The Netherlands
- Contact:
Re: basic questions
Yeah I know, I keep tripping up over that one myself.bartbes wrote:I keep calling it transform
Help us help you: attach a .love.
Who is online
Users browsing this forum: Google [Bot] and 13 guests