Search found 1588 matches

by zorg
Sun May 28, 2017 7:08 pm
Forum: General
Topic: Very high CPU usage on Debian 8
Replies: 9
Views: 227

Re: Very high CPU usage on Debian 8

The only idea i have remaining is this, try testing with -two- empty projects; one with a conf.lua file off of the wiki, and set vsync to false in that (since it's enabled by default). If the one without vsync takes up way less CPU than the other, then my best guess is that vsync is achieved with a ...
by zorg
Sun May 28, 2017 1:46 am
Forum: Support and Development
Topic: Can you scan a table to find specific values?
Replies: 6
Views: 83

Re: Can you scan a table to find specific values?

Actually, the only issue i can see with my code is that they should check ic, not ic+1, since you did write that it should not add itself if the ic is already at one of the banned values; i misread that.
by zorg
Sun May 28, 2017 1:09 am
Forum: Support and Development
Topic: Can you scan a table to find specific values?
Replies: 6
Views: 83

Re: Can you scan a table to find specific values?

You actually have two variables , and you have 9 values in total. In any case, there's two solutions: - Not modifying what you have now, write a loop checking whether ic + 1 is in the table, and not incrementing it if it is. - Modifying the banned_ic table a tiny bit, namely swapping the keys and th...
by zorg
Sat May 27, 2017 11:07 pm
Forum: General
Topic: Need help with shotgun blast logic
Replies: 8
Views: 112

Re: Need help with shotgun blast logic

Actually, now that i look at the above function, it's just that i'm a bit too used to seeing methods instead of "global" functions like that, called with minimal parameters. (Like, each entity, player or mook, having their own functions; whereas that calculating one could basically be re-used; both ...
by zorg
Sat May 27, 2017 10:05 pm
Forum: General
Topic: Need help with shotgun blast logic
Replies: 8
Views: 112

Re: Need help with shotgun blast logic

You should really store the data for individual bullets in separate table entries though... as with everything else, otherwise it will be infinitely more harder than it needs to be. function CalculateDxDy(x, y, startX, startY) local mouseX = x local mouseY = y -- the "base" angle for a shot local an...
by zorg
Sat May 27, 2017 9:35 pm
Forum: General
Topic: Convert text file to map wall
Replies: 1
Views: 56

Re: Convert text file to map wall

Hi and welcome to the forums! Not sure where tutorials would be, but this in and of itself is not too hard of a problem. You open a file, you read in contents, you iterate over contents and parse them however you want to. (there are multiple ways to read in a file though, and i'm not even going to t...
by zorg
Sat May 27, 2017 9:30 pm
Forum: General
Topic: Need help with shotgun blast logic
Replies: 8
Views: 112

Re: Need help with shotgun blast logic

So, as you said, all of your rotation and shooting is working fine; so, the logic behind spread shots would be simply this: - Spawn more than one bullet - From the "base" angle of the player, have a spread parameter (in degrees or radians, whichever you use already) and a fragment count parameter (o...
by zorg
Sat May 27, 2017 5:21 am
Forum: Support and Development
Topic: wrong bitmap Font rendering in löve 0.10.2
Replies: 14
Views: 493

Re: wrong bitmap Font rendering in löve 0.10.2

Some non-bitmap fonts have licenses that only permit using glyph shapes as "baked" textures in games, i.e. you can't distribute the ttf/odf font files themselves, but having a bitmap of select characters is (with attribution, probably) fine; IANAL though.
by zorg
Fri May 26, 2017 8:53 pm
Forum: Support and Development
Topic: Cutout Animation
Replies: 4
Views: 82

Re: Cutout Animation

No worries; still, both approaches will result in their own animation style; still, the cutout way means a bit more freedom at runtime, if you think about it, since you can orient each shape in ways that might not fit into one (or more) texture(s); granted it will consume a bit more processing power...
by zorg
Fri May 26, 2017 8:31 pm
Forum: Support and Development
Topic: Cutout Animation
Replies: 4
Views: 82

Re: Cutout Animation

Well, depends on what you mean by "spreadsheet" animation; but in any case, it's not too hard to do basic bone-like transforms in conjunction with SpriteBatches, that have all possible "limb parts" in a texture, for example; You also store all the joint positions, and data regarding them.