It's the only waycoffee wrote:
ok thanks, but a bit weird way Nixola.
3d map test
Re: 3d map test
lf = love.filesystem
ls = love.sound
la = love.audio
lp = love.physics
lt = love.thread
li = love.image
lg = love.graphics
ls = love.sound
la = love.audio
lp = love.physics
lt = love.thread
li = love.image
lg = love.graphics
- bartbes
- Sex machine
- Posts: 4946
- Joined: Fri Aug 29, 2008 10:35 am
- Location: The Netherlands
- Contact:
Re: 3d map test
trosh wrote:I'm using 0.7
Wait, how do you know? He just named 3 (!) versions!Robin wrote:I'm running the same LÖVE version, that can't be it.
- Robin
- The Omniscient
- Posts: 6506
- Joined: Fri Feb 20, 2009 4:29 pm
- Location: The Netherlands
- Contact:
Re: 3d map test
Well to be honest I wanted to say "That can't be it."bartbes wrote:Wait, how do you know? He just named 3 (!) versions!
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.
Re: 3d map test
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
ls = love.sound
la = love.audio
lp = love.physics
lt = love.thread
li = love.image
lg = love.graphics
- Robin
- The Omniscient
- Posts: 6506
- Joined: Fri Feb 20, 2009 4:29 pm
- Location: The Netherlands
- Contact:
Re: 3d map test
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:
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.
Re: 3d map test
Ooh thanks that's neat (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
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
Re: 3d map test
ok change of plans : Right now imma go to bed and I'll do this tomorrow, when I'm on holidddayy
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
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
Re: 3d map test
What ? slct = select ! isn't that obvious ? Lol, jk I guess at the time I was like "select" → tl;drRobin wrote:You see, in love.mousepressed, you define slct[1].x. (Awful naming, btw. What does slct even mean?).
- Robin
- The Omniscient
- Posts: 6506
- Joined: Fri Feb 20, 2009 4:29 pm
- Location: The Netherlands
- Contact:
Re: 3d map test
Ah, I was thinking too complicated again.trosh wrote:What ? slct = select ! isn't that obvious ? Lol, jk I guess at the time I was like "select" → tl;drRobin wrote:You see, in love.mousepressed, you define slct[1].x. (Awful naming, btw. What does slct even mean?).
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.
Re: 3d map test
wow Robin didn't say anything about his triple postRobin wrote:Ah, I was thinking too complicated again.trosh wrote:What ? slct = select ! isn't that obvious ? Lol, jk I guess at the time I was like "select" → tl;drRobin wrote:You see, in love.mousepressed, you define slct[1].x. (Awful naming, btw. What does slct even mean?).
Descriptive names for variables is very useful, that way others can more easily see what you mean (and that includes yourself in 6 months ).
Who is online
Users browsing this forum: No registered users and 1 guest