Search found 270 matches
- Fri Dec 25, 2020 12:55 pm
- Forum: General
- Topic: Obstacles in game
- Replies: 6
- Views: 8384
Re: Obstacles in game
Also, if you imagine yourself making more complex games in the future, it'd be interesting to invest some time in making simpler games first that will give you an easier challenge in learning different techniques, design patterns and such. There are two cool articles talking about this, not specific...
- Fri Dec 25, 2020 12:46 pm
- Forum: General
- Topic: Obstacles in game
- Replies: 6
- Views: 8384
Re: Obstacles in game
I am currently having trouble drawing random obstacle. I don't know how to write an algorithm that creates a obstacle that goes in my direction and crate new obstacle every few seconds. Hi. What have you tried already, can you show some code? The things you're asking are very simple, so maybe it's ...
- Tue Dec 08, 2020 9:54 am
- Forum: Support and Development
- Topic: Need help with making surface of image clickable.
- Replies: 10
- Views: 9840
Re: Need help with making surface of image clickable.
You can see the same mistake in your other files. How about any time you write a " function somethingsomething() ", go ahead and already add the " end " that will close it, just so you don't forget that anything between the name and the end will belong to the body of that functio...
- Tue Dec 08, 2020 9:50 am
- Forum: Support and Development
- Topic: Need help with making surface of image clickable.
- Replies: 10
- Views: 9840
Re: Need help with making surface of image clickable.
For every 'function' definition there needs to be an 'end' to close it. So when you do something like this: -- Call Backs -- function love.load() function Player.load() -- debug -- io.setvbuf('no') --Player Movement -- function love.update(dt) if love.keyboard.isDown('d') then Player.x = Player.x + ...
- Wed Dec 02, 2020 9:26 pm
- Forum: Support and Development
- Topic: How to make smooth camera movement?
- Replies: 6
- Views: 5653
Re: How to make smooth camera movement?
Wow, that's a thorough analysis there. Thanks Pedro!
- Wed Dec 02, 2020 9:22 pm
- Forum: Support and Development
- Topic: Need help with making surface of image clickable.
- Replies: 10
- Views: 9840
Re: Need help with making surface of image clickable.
When I want to print some debug string or number, I use the console. For this you need to create a conf.lua file with the 'console' attribute set to true, the opposite of this: https://github.com/RNavega/2DMeshAnimation-Love2D/blob/master/conf.lua#L2 Then add a... io.setvbuf('no') ...at the start of...
- Sun Nov 29, 2020 8:21 pm
- Forum: Support and Development
- Topic: How to make smooth camera movement?
- Replies: 6
- Views: 5653
Re: How to make smooth camera movement?
I think the LERP in the form (a + (b-a)*t) is faster than the form (a*(1-t) + b*t) used in that function because there's one less multiplication op.
- Sun Nov 22, 2020 9:54 pm
- Forum: Support and Development
- Topic: How to know if a object is [top|bottom|left|right] using another object?
- Replies: 5
- Views: 3885
Re: How to know if a object is [top|bottom|left|right] using another object?
You could have two functions, one for a horizontal comparison and another for vertical comparison. So for example the horizontal function just returns if the object is to the left, center, or right of the reference object.
- Mon Nov 02, 2020 5:32 am
- Forum: Libraries and Tools
- Topic: Groverburger's 3D Engine (g3d) v1.5.2 Release
- Replies: 218
- Views: 484373
Re: Groverburger's 3D Engine (G3D) New and Improved!
I don't see real-time or baked shadows in there, but I can see fog being used. This article explains how to implement fog with a shader: https://webglfundamentals.org/webgl/lessons/webgl-fog.html The fog factor can be the distance from the vertex to the camera (instead of just the depth of the verte...
- Mon Nov 02, 2020 4:03 am
- Forum: Libraries and Tools
- Topic: Groverburger's 3D Engine (g3d) v1.5.2 Release
- Replies: 218
- Views: 484373
Re: Groverburger's 3D Engine (G3D) New and Improved!
Oh my bad, i didn't specify what i meant by lighting. What I meant was environmental lighting like shadow and flashlight. Just being realistic here. It might be better for you to try a higher-level engine that already comes with those features, like Unreal or Unity, where you mostly tick the box on...