3d map test

Showcase your libraries, tools and other projects that help your fellow love users.
User avatar
Nixola
Inner party member
Posts: 1949
Joined: Tue Dec 06, 2011 7:11 pm
Location: Italy

Re: 3d map test

Post by Nixola »

coffee wrote:
ok thanks, but a bit weird way Nixola.
It's the only way :P
lf = love.filesystem
ls = love.sound
la = love.audio
lp = love.physics
lt = love.thread
li = love.image
lg = love.graphics
User avatar
bartbes
Sex machine
Posts: 4946
Joined: Fri Aug 29, 2008 10:35 am
Location: The Netherlands
Contact:

Re: 3d map test

Post by bartbes »

trosh wrote:I'm using 0.7
Robin wrote:I'm running the same LÖVE version, that can't be it.
Wait, how do you know? He just named 3 (!) versions!
User avatar
Robin
The Omniscient
Posts: 6506
Joined: Fri Feb 20, 2009 4:29 pm
Location: The Netherlands
Contact:

Re: 3d map test

Post by Robin »

bartbes wrote:Wait, how do you know? He just named 3 (!) versions!
Well to be honest I wanted to say "That can't be it."

I don't see how you can get a "tried to compare number to nil" error in one version of LÖVE and not another.

Also, I'm too lazy to look through the source to find the origin.
Help us help you: attach a .love.
User avatar
Nixola
Inner party member
Posts: 1949
Joined: Tue Dec 06, 2011 7:11 pm
Location: Italy

Re: 3d map test

Post by Nixola »

I didn't have any error, on an Ubuntu 11.10 32 bit (with and without wine) and a Windows 7 64 bit
lf = love.filesystem
ls = love.sound
la = love.audio
lp = love.physics
lt = love.thread
li = love.image
lg = love.graphics
User avatar
Robin
The Omniscient
Posts: 6506
Joined: Fri Feb 20, 2009 4:29 pm
Location: The Netherlands
Contact:

Re: 3d map test

Post by Robin »

I now know how to reliably reproduce the error. First, press "e". Then simply click. The trick is not to hold it, but immediately release the mouse.

You see, in love.mousepressed, you define slct[1].x. (Awful naming, btw. What does slct even mean?).
In the next love.update, if the mouse is down, you define slct[2].x.
When the mouse is released, you compare slct[1].x to slct[2].x. All is well, unless you release the mouse before LÖVE has gotten to the next love.update. Then slct[2].x is still nil.

I know how to fix it, simply insert this in love.mousepressed, next to where you define slct[1].x and slct[1].y:

Code: Select all

		slct[2].x = x ; slct[2].y = y
Help us help you: attach a .love.
User avatar
trosh
Prole
Posts: 12
Joined: Sun Nov 27, 2011 3:27 pm
Location: France

Re: 3d map test

Post by trosh »

Ooh thanks that's neat :D (should have thought of that...)
Well as usual it's really nice to see such enthusiasm around here ^^
So yeah yesterday I tried around some simple ideas for different kinds of games using this map (including being chased by a giant monster ball until you block it for more than 3 rows, it gets boring) and I'll try to make a cheap version of greed corp
I will just clean up the code for a game-ish version and post it in a while
User avatar
trosh
Prole
Posts: 12
Joined: Sun Nov 27, 2011 3:27 pm
Location: France

Re: 3d map test

Post by trosh »

ok change of plans : Right now imma go to bed and I'll do this tomorrow, when I'm on holidddayy :cry: :cry: :cry:
Also I changed the camera so that the player is as much as possible centered in the screen (btw creating your own camera is a pain)
see you fellow lövers ^^
User avatar
trosh
Prole
Posts: 12
Joined: Sun Nov 27, 2011 3:27 pm
Location: France

Re: 3d map test

Post by trosh »

Robin wrote:You see, in love.mousepressed, you define slct[1].x. (Awful naming, btw. What does slct even mean?).
What ? slct = select ! isn't that obvious ? Lol, jk I guess at the time I was like "select" → tl;dr :)
User avatar
Robin
The Omniscient
Posts: 6506
Joined: Fri Feb 20, 2009 4:29 pm
Location: The Netherlands
Contact:

Re: 3d map test

Post by Robin »

trosh wrote:
Robin wrote:You see, in love.mousepressed, you define slct[1].x. (Awful naming, btw. What does slct even mean?).
What ? slct = select ! isn't that obvious ? Lol, jk I guess at the time I was like "select" → tl;dr :)
Ah, I was thinking too complicated again. :P

Descriptive names for variables is very useful, that way others can more easily see what you mean (and that includes yourself in 6 months ;)).
Help us help you: attach a .love.
User avatar
GijsB
Party member
Posts: 380
Joined: Wed Jul 20, 2011 10:19 pm
Location: Netherlands

Re: 3d map test

Post by GijsB »

Robin wrote:
trosh wrote:
Robin wrote:You see, in love.mousepressed, you define slct[1].x. (Awful naming, btw. What does slct even mean?).
What ? slct = select ! isn't that obvious ? Lol, jk I guess at the time I was like "select" → tl;dr :)
Ah, I was thinking too complicated again. :P

Descriptive names for variables is very useful, that way others can more easily see what you mean (and that includes yourself in 6 months ;)).
wow Robin didn't say anything about his triple post ;)
Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot], Semrush [Bot] and 3 guests