Search found 175 matches

by Hexenhammer
Tue Feb 26, 2013 10:32 pm
Forum: Support and Development
Topic: *Exactly* changing the color of a spirte
Replies: 9
Views: 3957

Re: *Exactly* changing the color of a spirte

Here is code which demonstrates that "modulate" does indeed not replace colors with the set color but somehow mixes whatever colors are in the image with the set color. function love.load() -- Input.png is nothing but a square of (0xcc, 0x00, 0x1f) Input = love.graphics.newImage("Input.png") Expecte...
by Hexenhammer
Tue Feb 26, 2013 9:00 pm
Forum: Support and Development
Topic: *Exactly* changing the color of a spirte
Replies: 9
Views: 3957

Re: *Exactly* changing the color of a spirte

setColor with the modulate (default) color mode should do what you want. I looked up the color modes in the wiki after my problems and the description of "modulate" certainly doesn't sound like straight color replacement. Images (etc) will be affected by the current color. 'modulate' works like a f...
by Hexenhammer
Tue Feb 26, 2013 7:36 pm
Forum: Support and Development
Topic: *Exactly* changing the color of a spirte
Replies: 9
Views: 3957

*Exactly* changing the color of a spirte

I have symbols in pure white (255,255,255) I want to display in various colors. I used modulate color mode but that doesn't do what I want. The symbols end up having a color *near* the color I actually set e.g. I set the color (33,40,33) but the symbol is drawn in (36,41,36). And yes I pretty clearl...
by Hexenhammer
Sun Feb 24, 2013 7:48 pm
Forum: Games and Creations
Topic: [minigame] Circular Pong
Replies: 12
Views: 2862

Re: [minigame] Circular Pong

It's much more playable now. Nice way to mindlessly kill time.
by Hexenhammer
Sun Feb 24, 2013 4:08 pm
Forum: Support and Development
Topic: Slow game, a huge map
Replies: 6
Views: 1572

Re: Slow game, a huge map

Why would you update the whole batch every update? When the player removes a block, update only that block (as in, remove it from the batch). This can be done easily by mapping tile coordinates to actual sprite IDs in the batch, such that you can now access any sprite in the batch using random acce...
by Hexenhammer
Sat Feb 23, 2013 7:03 pm
Forum: Games and Creations
Topic: [minigame] Circular Pong
Replies: 12
Views: 2862

Re: [minigame] Circular Pong

Really cool idea. But hard! :o
by Hexenhammer
Sat Feb 23, 2013 3:22 pm
Forum: General
Topic: Will we ever see LuaJIT powered LÖVE?
Replies: 11
Views: 4624

Re: Will we ever see LuaJIT powered LÖVE?

First of all, if you need to fall back to c extensions you're probably doing something wrong I am quite sure I don't, thanks. Not everyone wants to code a Mario or Space Invaders clone. Many games have very demanding AI requirements and there is no such thing as enough performance in that case. E.g...
by Hexenhammer
Sat Feb 23, 2013 10:24 am
Forum: Support and Development
Topic: Metatable problem
Replies: 2
Views: 331

Re: Metatable problem

Yup, works now. Thanks!
by Hexenhammer
Sat Feb 23, 2013 9:54 am
Forum: Support and Development
Topic: Metatable problem
Replies: 2
Views: 331

Metatable problem

Why doesn't this work?

Code: Select all

local Random = {

}

local RandomMT = {
  __call = math.random
}

setmetatable(Random, RandomMT)



function love.load()

  Random(1, 3)

end
I get "bad argument #1 to 'Random' (number expected, got table)
by Hexenhammer
Sat Feb 23, 2013 8:05 am
Forum: Games and Creations
Topic: Canny the can
Replies: 9
Views: 1566

Re: Canny the can

I guess LÖVE's "key z" refers to the US keyboard layout.. and I - like most people - don't have a US keyboard. It.. shouldn't? Are you sure your version of SDL isn't severely borked? I am using the official 64-bit Windows distribution of LÖVE 0.8.0 (i.e. the SDL dll which comes bundled with it). I ...