Search found 85 matches
- Thu Aug 02, 2012 12:46 am
- Forum: Support and Development
- Topic: Objects disappearing
- Replies: 2
- Views: 2633
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...
- Mon Jul 30, 2012 9:08 pm
- Forum: Support and Development
- Topic: [SOLVED] Verb-Noun Parser
- Replies: 23
- Views: 11388
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...
- Mon Jul 30, 2012 5:24 pm
- Forum: Support and Development
- Topic: Lag/Optimization help?
- Replies: 8
- Views: 4103
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.
- Sun Jul 29, 2012 11:00 pm
- Forum: Support and Development
- Topic: How to use Weldjoints
- Replies: 3
- Views: 2778
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:setUser...
- Sun Jul 29, 2012 1:01 pm
- Forum: Support and Development
- Topic: Movement sliding as an affect from linear impulse
- Replies: 3
- Views: 3133
- Sun Jul 29, 2012 8:10 am
- Forum: Support and Development
- Topic: Movement sliding as an affect from linear impulse
- Replies: 3
- Views: 3133
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
in your update function.
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.
- Sat Jul 28, 2012 9:13 am
- Forum: Support and Development
- Topic: Remove body in love.update
- Replies: 5
- Views: 3015
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 ...
- Fri Jul 27, 2012 7:46 am
- Forum: Support and Development
- Topic: Flickering text (love.graphics.print)
- Replies: 8
- Views: 5066
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...
- Wed Jul 25, 2012 7:40 pm
- Forum: Support and Development
- Topic: camera zoom. And button clicking
- Replies: 7
- Views: 3365
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...
- Wed Jul 25, 2012 12:37 am
- Forum: Support and Development
- Topic: Several questions on Box2d
- Replies: 5
- Views: 4398
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...