Search found 118 matches
- Tue Jun 20, 2017 12:00 pm
- Forum: Support and Development
- Topic: Help (Need Help For My Module)
- Replies: 14
- Views: 8536
Re: Help (Need Help For My Module)
It's really hard to help you if you can not tell us what is wrong. That gets even harder if the code provided runs like a charm. I included this code to a very very leightweight main as this: Object = {} function Object:Box(x,y,w,h) local t = {x=x,y=y,w=w,h=h,id = id or #Object +1} table.insert(Obje...
- Tue Jun 20, 2017 11:45 am
- Forum: General
- Topic: remove physics object when colliding ?
- Replies: 2
- Views: 2165
Re: remove physics object when colliding ?
I would strongly suggest not doing that manually. Box2D is a really solid implementation, has lots of additional features a physics engine would need and lots of optimizations to the collision step. Being written in C++ it is better than what you will be able to write (very very most likely and defi...
- Sun Jun 18, 2017 8:01 pm
- Forum: General
- Topic: A big issue with love.update(dt)
- Replies: 14
- Views: 9389
Re: A big issue with love.update(dt)
For example: Have you tried comparing "keypressed" key value and scancode to what you currently use? Whether or not it is equal to what you expect it to be.
Besides that. I saw no problem with the code you posted either. It was counting up by 1 per frame when "s" is pressed.
Besides that. I saw no problem with the code you posted either. It was counting up by 1 per frame when "s" is pressed.
- Thu Jun 15, 2017 11:39 am
- Forum: General
- Topic: physic object collision detection ?
- Replies: 3
- Views: 3086
Re: physic object collision detection ?
Collision events are handled by the world. You can set callback events which provide you with a reference to the fixture of both colliding elements and a contact object which has some more data. Via the fixture you can access the shape. You can also supply userdata to the fixture to have a reference...
- Thu Jun 15, 2017 11:00 am
- Forum: Support and Development
- Topic: Suggestions for P2P network testing environment
- Replies: 0
- Views: 1404
Suggestions for P2P network testing environment
Hey! I was starting to work on a piece of networking and started to run into an issue. My goal is to have a truly P2P game. Where both clients execute all events and differences (desynchronisation) will result in breaking the game leading to a disconnect / game over. This allows for a large extent o...
- Tue Jun 13, 2017 8:43 pm
- Forum: General
- Topic: Drawing UI Bits: composition or direct paint?
- Replies: 7
- Views: 6950
Re: Drawing UI Bits: composition or direct paint?
As RaycatRakitta said. It's for simplicitys sake. A prime example for a canvas would be a topdown map. Let's say you have some houses, a path, a grass texture, etc. You don't want to draw everything in one picture. Because then modifying anything would mean opening up photoshop or pait.net or gimp o...
- Mon Jun 12, 2017 8:45 am
- Forum: General
- Topic: Drawing UI Bits: composition or direct paint?
- Replies: 7
- Views: 6950
Re: Drawing UI Bits: composition or direct paint?
If you have a lot of static elements that don't change or don't change often. A canvas can increase performance. Personally I'm not using it for my UI for two reasons. 1. I want the UI to be dynamic (hover animations, etc). Which means I'd have to add and remove stuff from the canvas, redraw it, etc...
- Tue Jun 06, 2017 12:44 pm
- Forum: General
- Topic: Good grid based movement
- Replies: 6
- Views: 7999
Re: Good grid based movement
Someone on reddit had an issue with movement recently and posted his code. It's doing exactly that! Here's the pastebin ! The basic idea is to have two locations. The location on the grid and the location on the screen. For gameplay you only modify the location on the grid. For rendering (drawing) y...