Search found 2311 matches

by pgimeno
Fri Nov 27, 2015 9:41 pm
Forum: Games and Creations
Topic: Thrust II Reloaded
Replies: 13
Views: 13267

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: 3211

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: 2465

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: 2364

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: 2364

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: 2364

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: 14209

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 improveme...
by pgimeno
Fri Nov 20, 2015 3:50 pm
Forum: General
Topic: Blacklisted
Replies: 7
Views: 4512

Re: Blacklisted

This seemed to happen only for one particular Tor exit node. So far everything's back to normal. Sorry for the noise.
by pgimeno
Thu Nov 19, 2015 10:25 pm
Forum: Support and Development
Topic: Obtaining body by point.
Replies: 5
Views: 1080

Re: Obtaining body by point.

By "body" do yo mean a physics body?
by pgimeno
Wed Nov 18, 2015 6:12 pm
Forum: Support and Development
Topic: Mouse/Selection system dependent on camera scale/position
Replies: 3
Views: 1314

Re: Mouse/Selection system dependent on camera scale/positio

I needed to make a change to main.lua to be able to check: diff -ru --strip-trailing-cr a/main.lua b/main.lua --- a/main.lua 2015-11-17 23:49:16.000000000 +0100 +++ b/main.lua 2015-11-18 18:38:52.000000000 +0100 @@ -26,7 +26,7 @@ ui:load() camera:load() icl:load("f1", "f2", "Mapeditor", "0.0.1") - m...