Search found 58 matches

by cval
Tue May 10, 2016 8:21 am
Forum: Support and Development
Topic: Object recycling tips
Replies: 11
Views: 6355

Re: Object recycling tips

I would also assign some variable for the type of object it is(different types most likely have different methods, etc). Then when you need to create a new object run it against the table of objects for that type. If it finds a match then re-init, otherwise create a new instance. All of my objects ...
by cval
Mon May 09, 2016 10:35 pm
Forum: Support and Development
Topic: Object recycling tips
Replies: 11
Views: 6355

Object recycling tips

Okay, some of you may have heard that it is a good practice to recycle/reuse unused object instead of creating new one. That approach is easy to implement in Lua since any table can be refilled with new instance values, and in the end you are going to create no excess overhead (except for minimal ut...
by cval
Sat May 07, 2016 5:51 pm
Forum: Support and Development
Topic: Objects table(active/inactive) - removing and adding
Replies: 20
Views: 8624

Re: Objects table(active/inactive) - removing and adding

Also a note about removing table entries in a loop - you have to count backwards to avoid loop jumps.

Code: Select all

for i=count,1,-1 do
	if objectsArray[i].active == true then
		table.remove(objectsArray,i)
	end
end
by cval
Sat May 07, 2016 8:58 am
Forum: Libraries and Tools
Topic: Alexar's Physics Editor(APE)
Replies: 59
Views: 63445

Re: [lib] Box2D Helper

Looks fantastic! May i ask, does it support World:queryBoundingBox ? If it doesn't, this is sort of suggestion for you. It could be a neat feature. Idk, like, maybe it should highlight all intersecting fixtures that are in AABB? Because in my practice, sometimes it's cheaper and faster to use this f...
by cval
Thu May 05, 2016 9:58 pm
Forum: General
Topic: What's everyone working on? (tigsource inspired)
Replies: 1791
Views: 1494427

Re: What's everyone working on? (tigsource inspired)



Now with upgraded spritebatch i can draw tons of stuff without too much of a perfomance drop.
by cval
Tue May 03, 2016 9:10 am
Forum: Support and Development
Topic: Textured Polygon
Replies: 18
Views: 7804

Re: Textured Polygon

In 0.9.0 and newer you can just use a [wiki]Mesh[/wiki], which allows you to draw textured polygons natively. This. And i want to add that as long as user is able to correctly track and calculate UV coordinates, the result will be repeating texture polygon (given that texture has correct setWrap fl...
by cval
Fri Apr 29, 2016 6:21 pm
Forum: Support and Development
Topic: Multiplayer Help
Replies: 6
Views: 5153

Re: Multiplayer Help

Because string is basically array of bytes which is easy to work with: to compose on sender side and to process on receiver side using standard string libraries. You can set up communication without using strings and using your own encode-decode format, but your data is going to be a pack of bytes a...
by cval
Wed Apr 27, 2016 10:24 pm
Forum: Libraries and Tools
Topic: APE (Another Particle Editor) for LÖVE2D
Replies: 21
Views: 32527

Re: APE (Another Particle Editor) for LÖVE2D

Oh wow, i'm thrilled with that testing gif and the fact that tool is actually is used in someone's project. Great stuff! Although i'm not really fan of games of this kind of genre (just because i've never actually played them before), the apparent amount of work that is put into upcoming project of ...
by cval
Wed Apr 27, 2016 8:45 pm
Forum: Libraries and Tools
Topic: Spritebatch extension
Replies: 7
Views: 5926

Spritebatch extension

I don't know if anyone did this already, but in my previous thread i've come with a way to change vertex data of a spritebatch. It allows user to change individual sprite geometry and vertex colors (and change color of already existing sprites), and as a bonus - change sprite drawing order. https://...
by cval
Wed Apr 27, 2016 8:06 pm
Forum: Libraries and Tools
Topic: Love2D "Serial Port Communication"
Replies: 7
Views: 6339

Re: Love2D "Serial Port Communication"

As a microcontroller enthusiast i'm interested in this kind of thing. Does it use ffi? Or love script communicates to some other application as client?