Search found 9 matches

by NC22
Wed Aug 10, 2011 5:03 pm
Forum: Support and Development
Topic: about drawing images
Replies: 9
Views: 3289

Re: about drawing images

thx! Simple and helpful solution posted by Robin local nwimage = love.graphics.newImage function love.graphics.newImage(source) if type(source) == "string" then source = love.image.newImageData(source) end local w, h = source:getWidth(), source:getHeight() local wp = math.pow(2, math.ceil(...
by NC22
Wed Aug 10, 2011 4:33 pm
Forum: Support and Development
Topic: about drawing images
Replies: 9
Views: 3289

about drawing images

I test LOVE game on two computers. One of them is netbook with mobile graphic card , second is usual PC. When I run game on netbook all images who have not standard size (26x26 25x25 etc) Love render as white cubes . On PC all renders fine. Have any ideas how to fix that? Is the problem of compatibi...
by NC22
Sun Jul 24, 2011 7:55 am
Forum: Support and Development
Topic: problem with newPolygonShape function
Replies: 9
Views: 6293

Re: problem with newPolygonShape function

You don't need to translate your vertices. "newPolygonShape" accepts local body coordiates. lol. I do similar mistake again . I cant remember how that works ) thx for advices . newCircleShape But its not a ellipse . It just have radius. But i try do physic of some character that have not ...
by NC22
Sun Jul 24, 2011 7:52 am
Forum: Support and Development
Topic: problem with newPolygonShape function
Replies: 9
Views: 6293

Re: problem with newPolygonShape function

Provide a .love
here is a .love
uncomment 39 line for look where dots of ellipse generated . But i cant see where love.graphics.polygon("line", egofizika:getPoints()) render
by NC22
Sun Jul 24, 2011 7:14 am
Forum: Support and Development
Topic: problem with newPolygonShape function
Replies: 9
Views: 6293

Re: newPolygonShape

Robin Sorry . What rule i broke ? I try translate rules in my native language and most of them i got. World is there worldsize = 16000 world = love.physics.newWorld(0, 0, worldsize, worldsize) body creates with cords for example in 1000,1000 by function self.body = love.physics.newBody(world, x, y,...
by NC22
Sun Jul 24, 2011 7:05 am
Forum: Support and Development
Topic: How to create animations from sprite sheets?
Replies: 6
Views: 3563

Re: How to create animations from sprite sheets?

self.frame = 0 self.hitanimation = {} self.hitanimation[0] = love.graphics.newQuad(0,0, 10,10,self.width,self.height ) --self.width and self.height - is total size of image --0,0 x y point in pixels in your image where your first frame starts from -- 10 ,10 size of the first frame self.hitanimation...
by NC22
Sun Jul 24, 2011 3:50 am
Forum: Support and Development
Topic: problem with newPolygonShape function
Replies: 9
Views: 6293

problem with newPolygonShape function

I dont got how to use it. It first attempt I try to create ellipse by simple math local t =0 for n = 1,8 do local x,y =0 x=(self.width/2)*math.cos(t*math.pi) y=(self.height/2)*math.sin(t*math.pi) self.dots[n]={} self.dots[n].x=self.body:getX()-x self.dots[n].y=self.body:getY()-y t=t+0.25 end that gi...
by NC22
Sat Jul 16, 2011 4:43 am
Forum: Support and Development
Topic: Question about physic objects
Replies: 5
Views: 3214

Re: Question about physic objects

Yes. That was a problem. Thanks for help!
by NC22
Sat Jul 16, 2011 1:35 am
Forum: Support and Development
Topic: Question about physic objects
Replies: 5
Views: 3214

Question about physic objects

I try to make my own physic object with some image, but image dont match with physic model. size of image 56x56 . here is a code for example function love.load() love.graphics.setLineWidth(2) world = love.physics.newWorld(-650, -650, 650, 650) world:setGravity(0, 150) boximage = love.graphics.newIma...