Search found 2614 matches

by pgimeno
Tue Dec 01, 2015 4:05 pm
Forum: Support and Development
Topic: love.graphics.print resets itself
Replies: 5
Views: 1153

Re: love.graphics.print resets itself

Which LÖVE version are you using? In 0.9.1 and older LÖVE will do that, but in 0.9.2 and newer it shouldn't. Yes, 0.9.1. Thank you. And it only does it once. Good to know too. EDIT I'm calling love.graphics.printf() in main to get rid of that first time and it's not working. Does it do so elsewhere...
by pgimeno
Tue Dec 01, 2015 5:18 am
Forum: Support and Development
Topic: love.graphics.print resets itself
Replies: 5
Views: 1153

love.graphics.print resets itself

I'm trying to redefine love.graphics.print and call back the original, but it only works for the first time, then it goes back to its original value. To be clearer, this snippet should be continuously outputting "Entered", but instead it is printed just once: local orig_print = love.graphi...
by pgimeno
Fri Nov 27, 2015 11:35 pm
Forum: General
Topic: Which game would you remake?
Replies: 10
Views: 3470

Re: Which game would you remake?

I'm already in the process of remaking Thrust II and I've got some more in my plans. Most for ZX Spectrum, though, so they're probably little know. Black Crystal is one I started but didn't get too far with. I may get back to it some day. 101 monochrome mazes is high in my list. It's likely to be th...
by pgimeno
Fri Nov 27, 2015 9:41 pm
Forum: Games and Creations
Topic: Thrust II Reloaded
Replies: 14
Views: 17385

Re: Thrust II Reloaded - Designers Wanted!

There's a new version up, with a number of important changes (see OP). - New splash screen by Cucurbitacée. - Scroll-in effect in the Get Ready screen, also used on crash and on load. - On crash, you get a ship crashing animation (thanks to Cucurbitacée) and then a scroll-in effect. That was a much ...
by pgimeno
Thu Nov 26, 2015 4:01 am
Forum: Games and Creations
Topic: crossfire
Replies: 13
Views: 3628

Re: crossfire

Simple but well accomplished idea. Is mouse handling in the plans?
by pgimeno
Tue Nov 24, 2015 10:03 pm
Forum: Support and Development
Topic: [Help]Sidescroller Engine
Replies: 4
Views: 2832

Re: [Help]Sidescroller Engine

All you have to do is use body:setLinearVelocity and do velocity/acceleration calculations on your side to make it not floaty. Then whenever you need the physics engine to take over (like when you want to push an object based on some force), use body:applyLinearImpulse or body:applyForce and make s...
by pgimeno
Mon Nov 23, 2015 9:11 pm
Forum: Support and Development
Topic: Picking a value from a table
Replies: 12
Views: 2928

Re: Picking a value from a table

Ok, but that still doesn't answer my question, is there a way that I can use this info to figure out the colour of box. Do you know any way? I don't understand what's what you want to figure out. boxes .colour[1] is the red component from 0 to 255, boxes .colour[2] is the green component, and boxes...
by pgimeno
Mon Nov 23, 2015 1:29 am
Forum: Support and Development
Topic: Picking a value from a table
Replies: 12
Views: 2928

Re: Picking a value from a table

Yeah, it returns a table.

Code: Select all

$ lua
Lua 5.1.5  Copyright (C) 1994-2012 Lua.org, PUC-Rio
> =tonumber({1,2,3})
nil
> ={1,2,3}
table: 0x8873300
> 
That's how Lua works. You access the components like: boxes[1].colour[1] through boxes[n].colour[3]
by pgimeno
Sun Nov 22, 2015 6:28 pm
Forum: Support and Development
Topic: Picking a value from a table
Replies: 12
Views: 2928

Re: Picking a value from a table

pickAColour() may be returning nil?

Does e.g. boxes[1].x work but boxes[1].colour return nil? If so, that's an indication of the above.
by pgimeno
Sat Nov 21, 2015 5:50 am
Forum: Support and Development
Topic: math.clamp?
Replies: 18
Views: 17118

Re: math.clamp?

I like mlepage's approach, it's clear and fast. No variable arguments, no function calls, no intermediate tables or objects: function clamp(v, a, b) assert(a <= b, "invalid clamp range") -- optional: debug message if v < a then v = a elseif v > b then v = b end return v end Here's a small...