Search found 1926 matches

by raidho36
Sun Nov 17, 2019 5:26 pm
Forum: General
Topic: Rotate a picture of a Zombie
Replies: 4
Views: 115

Re: Rotate a picture of a Zombie

Well what is the nature of your problem? If zombies face the player sideways, just rotate the sprite. If zombies rotate in the opposite direction, try swapping zombie and player coordinates in the formula (subtract zombie position from player position). And I assume that the sprites rotate against i...
by raidho36
Sun Nov 17, 2019 3:18 pm
Forum: General
Topic: Rotate a picture of a Zombie
Replies: 4
Views: 115

Re: Rotate a picture of a Zombie

There's mathematical function that can compute aiming angle based on X and Y coordinates of the target:

Code: Select all

local direction = math.atan2 ( self.x - player.x, self.y - player.y )
It's an alternative variant of arctangent trigonometric function that's customized to work specifically with 2d coordinates.
by raidho36
Sun Nov 17, 2019 8:56 am
Forum: General
Topic: Coverage reports in LOVE
Replies: 9
Views: 216

Re: Coverage reports in LOVE

LuaJIT and vanilla Lua are functionally identical. That is, if you don't use LuaJIT-specific functionality (such as C data) you should be fine with just swapping the DLL. Beyond running slower, there will be no difference in the way the code runs. Well actually there will be subtle differences. For ...
by raidho36
Sun Nov 17, 2019 8:11 am
Forum: Support and Development
Topic: How to make an AI in an exactly way?
Replies: 3
Views: 151

Re: How to make an AI in an exactly way?

You'd need to make a new post. Sorry but your question is about as vague as one can make it. There are million different approaches to doing this and which one is more suitable than others depends on exactly what you want to accomplish. So we can help you with questions like "how to make a boss foll...
by raidho36
Sat Nov 16, 2019 6:28 pm
Forum: Games and Creations
Topic: Sliding maze puzzle
Replies: 3
Views: 187

Re: Sliding maze puzzle

That's a cool little puzzle, took me a few good minutes to solve. Would be nice if it had a little more indication, such as outline box and a slide direction arrow.
by raidho36
Sat Nov 16, 2019 6:11 pm
Forum: General
Topic: Pulse screen to a beat
Replies: 5
Views: 101

Re: Pulse screen to a beat

Beat detection is generally unreliable AND difficult to implement. You should make beats manually; make a simple tool that will allow you to synchronize beats with audio and export beat tracks. Then you can use these beat tracks together with audio tracks in game.
by raidho36
Sat Nov 16, 2019 6:08 pm
Forum: Support and Development
Topic: [SOLVED] Canvas and shader issue
Replies: 12
Views: 313

Re: Canvas and shader issue

Shaders use transparent pixels internally. You can return transparent pixels from shader by setting their alpha values (4th color component) to something smaller than 1.
by raidho36
Sat Nov 16, 2019 6:05 pm
Forum: Support and Development
Topic: How to make an AI in an exactly way?
Replies: 3
Views: 151

Re: How to make an AI in an exactly way?

You are verbally formulating your problem, that's first step. Now try making a flowchart for what the boss should be doing. Use pen and paper, or a whiteboard. From there you will see how to implement that in code and maybe raise more specific questions.
by raidho36
Fri Nov 15, 2019 6:38 pm
Forum: General
Topic: Coverage reports in LOVE
Replies: 9
Views: 216

Re: Coverage reports in LOVE

Generally, for debugging you want to use interpreted Lua. Just swap out the DLL.
by raidho36
Fri Nov 15, 2019 1:55 pm
Forum: Support and Development
Topic: [SOLVED] Top Down Parallax scrolling and a zoomable camera
Replies: 3
Views: 139

Re: Top Down Parallax scrolling and a zoomable camera

When you zoom the camera you multiply all values by the zoom factor, in foreground and in background.