Search found 3 matches

by AdonisMF
Wed Jun 08, 2022 7:19 pm
Forum: Support and Development
Topic: [SOLVED] Collectible Object Spawns On Player Which Increases Score More Than Once
Replies: 12
Views: 2726

Re: Collectible Object Spawns On Player Which Increases Score More Than Once

When you choose a new position for the apple, do it in a loop that repeats until the new position isn't close to the player (i.e. brute force it), something like this: local function isCloseToPlayer(extraSpace) return (P.y + P.h > T.y - extraSpace) and (P.y < T.y + T.h + extraSpace) and (P.x + P.w ...
by AdonisMF
Wed Jun 08, 2022 1:20 am
Forum: Support and Development
Topic: [SOLVED] Collectible Object Spawns On Player Which Increases Score More Than Once
Replies: 12
Views: 2726

Re: Collectible Object Spawns On Player

The apple doesn't disappear it just gets repositioned, and if the apple spawns on the player it increases by a lot then disappears.
by AdonisMF
Tue Jun 07, 2022 11:44 pm
Forum: Support and Development
Topic: [SOLVED] Collectible Object Spawns On Player Which Increases Score More Than Once
Replies: 12
Views: 2726

[SOLVED] Collectible Object Spawns On Player Which Increases Score More Than Once

Hello everyone! The game I'm working on my first small Love game to learn Lua and Love2d mechanics the game consists of a player who collects apples to increase the score. There is a timer and a high score feature to see how many you can collect in a limited amount of time. What I want to happen Wha...