Search found 110 matches

by Xugro
Sun Jul 17, 2022 5:56 pm
Forum: Support and Development
Topic: Coding challenge: convex shapes
Replies: 10
Views: 4239

Re: Coding challenge: convex shapes

You can just use brute force. This will work within a few attempts (most of the time). I attached a simple example.
by Xugro
Sun Jul 17, 2022 3:21 pm
Forum: Support and Development
Topic: Coding challenge: convex shapes
Replies: 10
Views: 4239

Re: Coding challenge: convex shapes

Just a small nitpick: Just keep in the green, cyan or magenta areas. You cannot move point A into the magenta area, because this would decrease the overall area of the polygon which is against togFoxs first point: Starting with the square, each time the player receives a reward, two segments (or one...
by Xugro
Sun Jul 10, 2022 4:38 pm
Forum: Support and Development
Topic: I have 1 question.
Replies: 10
Views: 4865

Re: I have 1 question.

How can I make a game like duskers? Specifically the map generation (universe and ship generation). How would you generate those two things with pen and paper? This should give you an idea how to write an algorithm. My first instinct: universe generation Temporarily place a point on a random spot o...
by Xugro
Sat Jun 25, 2022 7:22 pm
Forum: Support and Development
Topic: how to record and play game input?
Replies: 13
Views: 3885

Re: how to record and play game input?

Roughly, it would consist of this. If you use love.keypressed/keyreleased/textinput, you need to record the call with all the parameters that you use, together with their timestamp. The timestamp would be a variable updated by love.update(). If you use joystick callbacks, same thing. In love.update...
by Xugro
Mon Jun 20, 2022 7:59 pm
Forum: Support and Development
Topic: help me with my game plz
Replies: 3
Views: 1639

Re: help me with my game plz

You iterate over all shops in love.update, but you use the same variable to determine a collision. And this variable gets overwritten in every iteration of the loop. So only the last button will work - and it does. For this to work you have to make a collision variable for every button. I added a va...
by Xugro
Fri Jun 17, 2022 11:13 pm
Forum: General
Topic: Need help creating a specific function
Replies: 12
Views: 4861

Re: Need help creating a specific function

The x and y position are independent and therefore can be calculated independently. I just calculated the formula for x, but for y it is the same: lerp.jpg The first part is a sketch of the function. Before the delay and after the delay + the duration the enemies do not move. In between I used an li...
by Xugro
Sat May 14, 2022 4:53 pm
Forum: General
Topic: Android Start game as Service and alerts message Update! please
Replies: 2
Views: 2474

Re: Android Start game as Service and alerts message Update! please

Without taking a look at the specifics: I think you have to copy love-android and add the Android Service code yourself. If you want to use features of Android services from within your lua files, then you need to add those to the love sourcecode as well, I guess.
by Xugro
Fri Apr 29, 2022 10:11 pm
Forum: Support and Development
Topic: my code dose not work I need someone who is more experianced then me to help me
Replies: 4
Views: 2922

Re: my code dose not work I need someone who is more experianced then me to help me

Please create a .love file and attach it to your post. There is a tutorial in the wiki: How to Create a .love-file . Then everything is packed together (your code, the collision library and the images) and we can take a look what is going on. And please describe your problem: What is happening and w...
by Xugro
Sun Apr 10, 2022 2:00 pm
Forum: Support and Development
Topic: my code dose not work HELP!!!
Replies: 4
Views: 2457

Re: my code dose not work HELP!!!

Just add one "end" at the end of your source code and it works. I can use wasd to move around and every so often an enemy spawns and falls down. One simple tip: Format your source-code so that you can read it easier. After formatting it was obvious that an "end" was missing. I at...
by Xugro
Fri Jul 02, 2021 11:00 pm
Forum: General
Topic: Optimization issues -- How do I keep my game from lagging?
Replies: 4
Views: 7381

Re: Optimization issues -- How do I keep my game from lagging?

I used ProFi to profile your game. The report is attached. It is not much, because I only ever get three frames before your fixed timestamp accumulator updates itself to death. Here are some timings around player:update(dt) : accumulator: 0.00076811399776489 [ProFi] Report written to MyProfilingRepo...