Search found 85 matches

by juno
Thu Aug 02, 2012 12:46 am
Forum: Support and Development
Topic: Objects disappearing
Replies: 2
Views: 644

Re: Objects disappearing

Your code is pretty complex so I am not sure how to fix it exactly but I'm trying to trace your problem. When your new block (from the mouse click) is spawned and collides with the sensor, it triggers beginContact. You then have this code: msg_manager:send_message(b_name,a_name,{reason="c_start"}) w...
by juno
Mon Jul 30, 2012 9:08 pm
Forum: Support and Development
Topic: [SOLVED] Verb-Noun Parser
Replies: 23
Views: 4100

Re: Verb-Noun Parser

Sounds interesting! I would say concentrate on getting the input working first. You would have to essentially program a textbox from scratch which would be done using the love.keypressed() function. Each time a key is pressed you append it to a string and print the string on the screen. You would al...
by juno
Mon Jul 30, 2012 5:24 pm
Forum: Support and Development
Topic: Lag/Optimization help?
Replies: 8
Views: 954

Re: Lag/Optimization help?

Could be that you are executing several substring commands from within a nested loop. I imagine this would rack up a bit of processing power, especially if its parsing a large amount of text for each iteration.
by juno
Sun Jul 29, 2012 11:00 pm
Forum: Support and Development
Topic: How to use Weldjoints
Replies: 3
Views: 542

Re: How to use Weldjoints

Boolsheet is right. You don't need to use weld joints in your case. Try something like: self.body = love.physics.newBody(gameworld,self.x,self.y,"dynamic") self.shape = love.physics.newRectangleShape(32,64) self.fixture = love.physics.newFixture(self.body,self.shape,1) self.fixture:setUserData("play...
by juno
Sun Jul 29, 2012 8:10 am
Forum: Support and Development
Topic: Movement sliding as an affect from linear impulse
Replies: 3
Views: 725

Re: Movement sliding as an affect from linear impulse

i dont understand what you want to do...
When I press 'd' he moves right. When I press 'a' he comes to a stop and moves left.

Do you want to stop him from sliding?
this can be done by putting

Code: Select all

    objects.char.body:setLinearDamping(1)

in your update function.
by juno
Sat Jul 28, 2012 9:13 am
Forum: Support and Development
Topic: Remove body in love.update
Replies: 5
Views: 802

Re: Remove body in love.update

Hey raen79, I found your problem. When you flip the lever you're changing lever_pressed==true which creates the platform body dynamically. Then... each time the love.updatemap() function is called, lever_pressed is still true and creates another platform body, and another... If you restrict this to ...
by juno
Fri Jul 27, 2012 7:46 am
Forum: Support and Development
Topic: Flickering text (love.graphics.print)
Replies: 8
Views: 1407

Re: Flickering text (love.graphics.print)

Hey. This solves the shivering problem. If you use love.graphics.translate to position your images/font instead... -- image love.graphics.push() love.graphics.translate(x,y) love.graphics.setColor ( 255, 255, 255, 255 ) love.graphics.draw ( img, 0, 0, 0, 1, 1, img:getWidth() / 2, img:getHeight() / 2...
by juno
Wed Jul 25, 2012 7:40 pm
Forum: Support and Development
Topic: camera zoom. And button clicking
Replies: 7
Views: 992

Re: camera zoom. And button clicking

I have my camera zoomed by 0.3. And I have a GUI system, where I want to test if the player is clicking on 'v.text'. This is under love.mousepressed(x,y) so if I have.. if x > v.x and x < v.x + medium:getWidth(v.text) and y > v.y and y < v.y + medium:getHeight() then click the button end So, how wo...
by juno
Wed Jul 25, 2012 12:37 am
Forum: Support and Development
Topic: Several questions on Box2d
Replies: 5
Views: 1665

Re: Several questions on Box2d

Good question...I was wondering how box2d handles sleeping objects. I imagine even sleeping bodies must be checked, otherwise how would the program know. Maybe only the bounding box is checked? and if a collision is detected, a more in depth SAT is performed perhaps, and the body is woken! In my own...