Search found 63 matches
- Sun Dec 07, 2014 1:23 pm
- Forum: Support and Development
- Topic: Trouble understanding classes
- Replies: 15
- Views: 10056
Re: Trouble understanding classes
It seems to me that you have a problem understanding OOP in general, not necessarily OOP applied to Lua. IMHO, the way classes work in Lua is overcomplicated and the basic OOP principles get lost under a layer of unfriendly syntax. I'd suggest doing an OOP crash course in a language that's been buil...
- Sat Dec 06, 2014 5:30 pm
- Forum: Support and Development
- Topic: [SOLVED] Player Sinks Into Ground After Collision
- Replies: 5
- Views: 3502
Re: fixture:setUserData()
First off, the user data can be anything. It's just a reference that you can set to whatever info you want the fixture to have, in order for you to be able to distinguish between them in the callbacks. It can be a string, or a table or an instance of a class that you wrote. Second, you should use Az...
- Sat Dec 06, 2014 2:53 pm
- Forum: Support and Development
- Topic: [SOLVED] Multiple Colliders On 1 Object / Sprite
- Replies: 4
- Views: 2558
Re: Multiple Colliders On 1 Object / Sprite
@i_love_u : you need to reset the jump counter only when the player touches the ground again. You are currently resetting it on all collisions. In the beginContact() callback, you need to check the identity of the two fixtures and, if it's the player and the ground, reset the jump counter. You will ...
- Sat Dec 06, 2014 2:36 pm
- Forum: Libraries and Tools
- Topic: Debug draw for box2d physics World
- Replies: 30
- Views: 24251
Re: Debug draw for box2d physics World
Thanks for the update, random generation works properly now.
- Thu Dec 04, 2014 2:40 pm
- Forum: General
- Topic: No one streams lua/love coding?
- Replies: 4
- Views: 2708
Re: No one streams lua/love coding?
Why would one stream while coding? What's the message to transmit and what's the audience?
- Thu Dec 04, 2014 1:58 pm
- Forum: Libraries and Tools
- Topic: Löve "Light vs. Shadow" Engine v2
- Replies: 140
- Views: 120349
Re: Löve "Light vs. Shadow" Engine v2
@drunken_thor : speaking of optimizations and speed, while nosing around in the code, I think I noticed that the library currently draws all shadows, for all bodies, for each light. From what I can see, it doesn't take into account whether there is something between a body and a light, or whether th...
- Wed Dec 03, 2014 9:12 pm
- Forum: Libraries and Tools
- Topic: Debug draw for box2d physics World
- Replies: 30
- Views: 24251
Re: Debug draw for box2d physics World
This is really helpful for debugging physics issues, I was thinking about writing something similar for my own use but found this first :) Thanks a lot. I do have one observation to make: your math.randomseed(1) call will forever break random number generation in the project that is being debugged. ...
- Mon Dec 01, 2014 9:31 am
- Forum: Support and Development
- Topic: World:rayCast() callback order
- Replies: 2
- Views: 1766
Re: World:rayCast() callback order
Sorry, I might not have been clear enough - I was thinking that each rayCast() call went to it's own thread; things would've been a bit more complicated if it were so.
Thanks for the clarification
Thanks for the clarification
- Sun Nov 30, 2014 8:30 pm
- Forum: Support and Development
- Topic: Trying to change my enemy's image when collision detected
- Replies: 3
- Views: 2759
Re: Trying to change my enemy's image when collision detecte
From what I can see at a glance, you're calling check_collision() from love.update(). The update() method is called loads of times per second which means that the "img_hit" image stays on for a frame, at most. You need to implement a mechanism that allows the image to stay as "img_hit...
- Sun Nov 30, 2014 8:23 pm
- Forum: Support and Development
- Topic: World:rayCast() callback order
- Replies: 2
- Views: 1766
World:rayCast() callback order
Casting a ray through the map has big chances of hitting more than one entity. For each entity, the callback method is called. The wiki says that: You cannot make any assumptions about the order of the callbacks. http://www.love2d.org/wiki/World:rayCast However, I need to get these callbacks in a ma...