Search found 175 matches

by Hexenhammer
Mon Oct 07, 2013 8:12 pm
Forum: Games and Creations
Topic: Ore Miner
Replies: 18
Views: 11085

Re: Ore Miner

The oscillating field of view thingy makes my heard hurt But what should I do? Remove the oscillation effect. In real life the field of view does not change if your character does not move. The way you implemented this is seriously strange, I have never seen it before. I guess you aim for a"to...
by Hexenhammer
Sun Oct 06, 2013 9:36 pm
Forum: Games and Creations
Topic: Ore Miner
Replies: 18
Views: 11085

Re: Ore Miner

The oscillating field of view thingy makes my heard hurt :death:
by Hexenhammer
Thu Oct 03, 2013 10:27 pm
Forum: Libraries and Tools
Topic: Math & Collisions library
Replies: 42
Views: 23228

Re: mlib: Math Library

I read somewhere that it was faster if you assigned variables then called them as opposed to just calling them. I don't know if it's true or not, or if it even really impacts it that much, but... :P Assigning the table to a variable is completely pointless here and only makes your code more verbose...
by Hexenhammer
Thu Oct 03, 2013 10:16 pm
Forum: Support and Development
Topic: [solved!]Frame rate occasional lag
Replies: 18
Views: 8987

Re: [solved!]Frame rate occasional lag

Instead of creating a separate thread I will ask a very related question here. Imagine I have something like this: A = {B, C, D, a, b, c} B, C and D being tables themselves and a, b and c being strings and numbers, all of them only referenced by A. Will the garbage collector correctly get rid of th...
by Hexenhammer
Sun Sep 15, 2013 11:10 pm
Forum: General
Topic: Using SciTE with LÖVE
Replies: 48
Views: 49933

Re: Using SciTE with LÖVE

Updated my customized SciTE to the newest version and made minor configuration changes. Keywords are no longer in bold and the fold margin background color was changed. I also made an additional color theme because I wanted a change. The new theme is called Nightshade and is based on IntelliJ's Drac...
by Hexenhammer
Tue Aug 27, 2013 12:59 pm
Forum: Support and Development
Topic: General Guidance for RogueLike Display
Replies: 4
Views: 2410

Re: General Guidance for RogueLike Display

I have always used one big texture which contains the characters in all colors. You can easily calculate which part of the texture to blit with the variables being the character code and the color id. Looks like this in my current code: self:DrawTile( self.drawColor * self.tileset.dimensions.width +...
by Hexenhammer
Sat Aug 24, 2013 5:47 pm
Forum: Support and Development
Topic: [solved!]Frame rate occasional lag
Replies: 18
Views: 8987

Re: Frame rate occasional lag

You can easily test whether the GC is the issue or not. Just add.. collectgarbage("stop") .. to love.load(). Personally I cannot reproduce the issue, with or without the GC running. The game runs at 996-1000 FPS all the time if vsync is turned off and no game will ever run faster. I think ...
by Hexenhammer
Mon Jun 17, 2013 11:52 pm
Forum: Support and Development
Topic: Manage project code
Replies: 5
Views: 2657

Re: Manage project code

The most important thing is to organize you code into modules instead of randomly stuffing the global namespace like you do currently: http://lua-users.org/wiki/ModulesTutorial Don't use globals in general unless you have a damn good excuse i.e. your variable declarations should almost all start wit...
by Hexenhammer
Mon Jun 17, 2013 11:11 pm
Forum: Support and Development
Topic: Is there a point to getters and setters in Lua?
Replies: 15
Views: 11194

Re: Is there a point to getters and setters in Lua?

There are quite a few reasons to use them. * Handling side effects E.g. Character.Damage = function(self, damage) self.damage = self.damage + damage if self.damage > self.health then self:Die() end Game.charactersDamagedThisTurn:Add(self) etc.. end * Implementing attributes whose effective value is ...
by Hexenhammer
Wed Jun 12, 2013 10:29 pm
Forum: Games and Creations
Topic: Legends of Rathnor [WIP]
Replies: 37
Views: 33831

Re: Legend of Rathnor [WIP]

Looks nice!

No frame rate issues at all. I get ~500 FPS with Löve (64-bit Windows) and ~400 FPS with Löve+LuaJIT (32-bit Windows).