Search found 1341 matches

by ivan
Mon Nov 12, 2018 5:43 am
Forum: Libraries and Tools
Topic: amour - a basic scene graph library
Replies: 7
Views: 629

Re: amour - a basic scene graph library

There are significant advantages when scene graphs are used correctly. In my experience it's really about grouping things together. For example, if rendering things in order is important, then you are going to need some sort of scene-graph-like structure anyways. ...or let's say that you want to tra...
by ivan
Fri Nov 09, 2018 9:49 pm
Forum: General
Topic: Getting LOVE2D to run faster and AI stuff
Replies: 6
Views: 237

Re: Getting LOVE2D to run faster and AI stuff

The enemy is programmed to fire a circular bullet (with setBullet enabled) from the center of its own body Fixture:setFilterData can disable the collision between the two. Without "setFilterData" the two fixtures will push each other apart so there may be "knockback" to the enemy as well. if I stab...
by ivan
Fri Nov 09, 2018 8:53 am
Forum: General
Topic: Getting LOVE2D to run faster and AI stuff
Replies: 6
Views: 237

Re: Getting LOVE2D to run faster and AI stuff

You can use body:setBullet to mitigate the tunneling.
A constant timestep is highly recommended if you expect stable behavior for joints.
Love2D itself is already fast, but you can use profiling to optimize your Lua scripts.
Good luck!
by ivan
Sat Nov 03, 2018 8:26 pm
Forum: Support and Development
Topic: Why are these variables not increasing [SOLVED]
Replies: 3
Views: 330

Re: Why are these variables not increasing

x,z are numbers and you cannot have multiple references to a number variable. So when you write x=42 z=42 y = {x,z} it's equivalent to writing y = {42,42} Your code changes y[1] and y[2] but does not change x,z. Note that the assignment operator "=" works differently with numbers as opposed to table...
by ivan
Sat Nov 03, 2018 5:11 am
Forum: Support and Development
Topic: My game runs fine on my computer, but...
Replies: 5
Views: 511

Re: My game runs fine on my computer, but...

It's a nice looking game so good job. You could check if canvases are supported and show an error message if necessary. https://love2d.org/wiki/love.graphics.getSupported https://love2d.org/wiki/love.graphics.getCanvasFormats Of course, there are ways to draw stuff on the screen without using canvas...
by ivan
Tue Oct 30, 2018 6:18 am
Forum: Libraries and Tools
Topic: amour - a basic scene graph library
Replies: 7
Views: 629

Re: amour - a basic scene graph library

Welcome to the forums, Alexanderdna. I think it's a cool idea, in fact I use a similar scene graph in my projects. I have released my code too - it's not perfect but I hope that you might find it useful: https://bitbucket.org/itraykov/love2d-scene-graph/src/ I like your idea of using width/height fo...
by ivan
Fri Oct 26, 2018 5:34 am
Forum: Support and Development
Topic: How i can load some external lua file?
Replies: 4
Views: 285

Re: How i can load some external lua file?

Your game shouldn't load code from arbitrary locations - it's NOT safe to do that. Furthermore "C:/" doesn't mean anything across other platforms like Linux and Android. You want your game to be cross platform, right? Custom files could be loaded from the "AppData" folder but even that has to be don...
by ivan
Thu Oct 25, 2018 5:07 pm
Forum: Support and Development
Topic: Generating collision boxes based on images with transparency?
Replies: 8
Views: 519

Re: Generating collision boxes based on images with transparency?

it seems like Constrained Delaunay triangulation is what I'm looking for... none of the individual fixtures violate the Box2D restrictions. I'm afraid it's not that simple. Like I said, Box2D has polygon limitations - for example: - the vertex angle cannot be below a certain threshold - the side le...
by ivan
Thu Oct 25, 2018 4:29 pm
Forum: Support and Development
Topic: [SOLVED] How I can better performance and FPS of my game?
Replies: 12
Views: 608

Re: How I can better performance and FPS of my game?

Sure, your program will be slower when profiling - you should only use the profiler when debugging. This is because all function calls are hooked and tracked by the profiler. Apart from loading, each frame of your game should never take longer than 10-30 milliseconds to execute. Even if your game is...
by ivan
Thu Oct 25, 2018 3:40 pm
Forum: Support and Development
Topic: [SOLVED] How I can better performance and FPS of my game?
Replies: 12
Views: 608

Re: How I can better performance and FPS of my game?

FPS is not a good measure of performance because sometimes you have slow code that executes infrequently so the game stutters occasionally while maintaining 60FPS the rest of the time. So yea, profiling is the way the go so that your game runs smoothly all the time.