Poll

How should stats be displayed

When you click your character
Displayed in menu under/aside/ontop of map
Other (explain in post)

Author Topic: BlockWorld, a clientsided game. - Ingame Screenshot PG9  (Read 8686 times)

Think about all you have done by having a premade map, you've probably saved at LEAST a day of work trying to make a decent map generator.
ik but  this script is so frustrating and i don get it's error :(

ik but  this script is so frustrating and i don get it's error :(
That's why I use C#, it's much more user-friendly, especially when you have vs2010 pro.

That's why I use C#, it's much more user-friendly, especially when you have vs2010 pro.
Python is cool :(
the error is weird though

Python is cool :(
the error is weird though
Could you post the error?


see it's supposed to read it and out put it to a file (to make sure it was read correctly)
and it's not supposed to read the entire thing
but read the map's squares and display them as 1 pixel instead of 16x16
it's reading it in a line though.


see it's supposed to read it and out put it to a file (to make sure it was read correctly)
and it's not supposed to read the entire thing
but read the map's squares and display them as 1 pixel instead of 16x16
it's reading it in a line though.
Image is broken..?

no
its a pixel thin line. really, really, really, thin.

no
its a pixel thin line. really, really, really, thin.
Well if it actually worked, I think it would be noticable enough.

no
its a pixel thin line. really, really, really, thin.
It appears as a blue square with a question mark on my iPod, meaning the image is bork'd.


Or were you being sarcastic.

works for me
i see the really thin line. is localhostr blocked?

I see the line, and I can hazard an educated guess.  Every pixel in that line has the same x and y coordinate, assuming it's drawing from the top left.  To pick the x coordinate off a one-dimensional array, you need to use modulo, not division.

Quick example (Java format because that's what I develop in usually):
Code: [Select]
array px;

for (int i = 0; i < px.length(); i++)
{
    drawPixel((i % px.length()),(i / px.length()));
}
« Last Edit: August 25, 2012, 11:31:20 PM by Sevara »

what
i confuz.
Code: [Select]
if x / 16 == math.floor(x / 16):
if y / 16 == math.floor(y/16):
#print str(newx) + ' ' + str(newy)

p = image[x,y]
print str(x) + ' ' + str(y) #+ ' ' + str(p)
imagf[newx,newy] = p
#mod = 0

newx = newx + 1
newy = newy + 1

Maybe you should take your error to stackoverflow, I'm sure you'll get help there.

Maybe you should take your error to stackoverflow, I'm sure you'll get help there.
>:c ok

why are you using an image for world data that is a bad idea you should be using some other storage form like database with a table which uses unique-index coordinates that are decided by the id and why am i speaking in one sentence without commas this is bad