« first day (1035 days earlier)      last day (3988 days later) » 

Jon
10:46 AM
@William'MindWorX'Mariager Hey dude.
 
Jon
we need to talk, ahaha
brb
 
Jon
11:07 AM
Yes
I have a question about how you generate your different tiles
Do you store each one of your tile maps in a separate select?
IE. Stones have its own select, Dirt has its own select, etc..
 
Jon
ok, I am using 2 selects atm
one is for land/air -- the other for the gradient values of the terrain
I got the generator working in my game, it is pretty leet :)
 
Yeah, it's very cool. :P
Did you look at the authors other tutorials?
This one has multiple tile types: gamedev.net/blog/33/…
Most of the 3D methods work the same in 2D. :)
 
Jon
Yes, I read them all
I'm still trying to figure out what is the best way to select mineral placements
I was originally thinking of just using the heightmap
 
11:24 AM
The second tutorial with multiple types shows how he does rare and semi rare patches. :)
 
Jon
does it translate well to the new version of his lib?
 
Jon
Yes, he mentions that those are old articles
 
I doubt it has changed in any significant way. The approach he uses is the same. :)
 
Jon
Well regardless, I am having fun with this
 
Jon
Glad you convinced me to swap
 
It is pretty great. You can step outside what he does too you know. Apply your own logic some places if that makes it easier. Like for me, if I were to make something like Terraria, I'd have a generator for mainland and a generator for skylands and keep them separate with a certain height using one generator and another height using the second generator.
This approach also optimizes a bit. A huge generator can be heavy to use.
Btw, have you considered how well your water is going to work in multiplayer? It looks like what you have right now is going to generate a lot of traffic.
 
Jon
mmmm
Water would be rendered client side.
periodic updates from server
 
Still, it's a lot of particles.
 
Jon
I'm keeping multiplayer for next version anyways
Water are not particles though, they are part of the land tiles. They work with cellular automata
 
11:39 AM
Really?
I could've sworn it was particles. :P
 
Jon
yeah, i worked pretty hard on that actually, lol
 
I've been thinking about doing something similar to Minecraft, but with a few improvements on how water is picked up and rendered.
 
Jon
Really old video showing water physics: youtube.com/watch?v=vIiW5hO1DK0
 
So basically, it's still blocks like Minecraft, but it's rendered differently. And if you pick up a bucket of water, it'll take it from the highest point possible in that particular body of water. This isn't quite feasible in Minecraft, but for me, it's pretty simple.
Yeah, that's the video I saw.
 
Jon
One thing about water physics, is you need to keep it simple, ahaha
My version also has pressure
So water will go up if it has to
 
11:41 AM
Nice.
I tried to stay away from features like that to keep it easy on the network.
 
Jon
So, I think my final game with have water/oil/lava
Yes, multiplayer is going to be a challenge for sure...
Like i said, water would most likely have to be rendered mostly client side.
With server adjusting every so many ticks
I saw you posting images the other day, what u working on?
Still doing work on legeria?
 
A browser game. :) Trying to make something simple and release it before returning to Legeria.
 
Jon
cool
I created this breakout/spaceinvaders hybrid when I felt my game was too overwhelming
 
But I'm definitely going to work on Legeria again. I have some ideas I want to try out. And I love sandbox games and the whole genre. And like I've mentioned before, I think Terraria is great, but I think it could be better. And that's what I hope Legeria can deliver. :)
 
Jon
Basically, an enemy ship composed of blocks would appear on screen, with a "core" piece in its center. You had to destroy the core piece before it reached the bottom of the screen.
 
11:47 AM
Cool :P
 
Jon
That sounds interesting, but you are now competing with Starbound :)
The best Sandbox game you can make, is one that can always be in beta.
 
True. But I think the games differ enough for that not to matter. And my game will be better anyways. :P
I've been thinking about making small projects that are components of Legeria. Like for example, make a Mario clone. This way, I have a tiled platformer engine. And do so for other components as well.
My current project, Goblin Warcamp Survival, has helped me with getting an understanding of how to do account management in a good way and work with databases.
This way, I have the different things needed to tuck together Legeria. :)
 
Jon
Yeah, building a code base is a smart thing to do.
 
12:26 PM
Exactly. And my current Tile system is pretty sexy if I must say so myself. :P So it's just a matter of putting in a nice entity system with physics for my characters and non-player characters.
 
Jon
12:47 PM
So I have been writing this shader, that uses render targets
It is basically a new lighting system I am writing, so the render target takes up the entire screen.
When I zoom out, the render target can get rather large... larger than 2048x2048 which is the maximum size of a render target
This seems a little crazy.
 
How does it get so big?
 
Jon
I zoom out significantly.
 
Jon
I sent the render target to the size of my camera viewport
 
You should scale rather than change the viewport. :)
 
Jon
12:53 PM
Yeah I'm starting to do that now..
 
That light was done with a 80x45 pixel rendertarget.
 
Jon
really?
how?
 
Yeah. A pixel per tile and then I just scale it up. The upscaling makes the light have a nice shade. :)
 
Jon
hmm, I don't get it
 
Each tile has some property. Open air generates 100% white light aka FFFFFF. A solid tile blocks a certain amount of light, a background tile blocks no light, but doesn't generate either so the light eventually stops.
Then I just fill out a render target where each pixel represent a tile. And then I perform some shading logic and let then resize and render it on top of the terrain.
Look at the images in the top left. The left one is the color block property of the scene, the center is the light sources, the right one is the final result from combining them with a special GPU floodfill. :)
 
Jon
1:00 PM
did you write this shader?
 
woah, project of yours?
 
Morning all
 
already looks like it could be fun
also good morning
 
@Jon Yeah. :) It's pretty basic but very expensive. I have to run the pass 16 times to get good results. I couldn't come up with a better solution myself. :)
@Shiester Something I'm working on. It's on hold for the moment though. :)
 
Jon
Hmm, yeah I am looking for something similar.
I have a per tile lighting based on how far the block is from the edge.
 
1:02 PM
@William'MindWorX'Mariager wtf no... you need to get that done because I'm curious to see the end result.
 
Jon
pre-calculate once, and it is done -- not very taxing.
Not very pretty either.
 
@Jon Nice approach. I'm only doing it as the player moves at least a tile. It does save a ton of renders though. :)
@Shiester Hehe, yeah, I really want to work on it too. :P But I have another project I want to finish first.
 
Jon
1:15 PM
yeah...
I'm gonna need to figure out how to do some per tile shadowing similar to yours.
 
@William'MindWorX'Mariager send him the working prototype you had a while back where you can just run around destroying blocks. That was fun for a good 30 minutes on my part (I was really bored :P)
 
@Jon The main limiting factor of my solution was the minimum light-blocking of the tiles. Basically, I had to get from full brightness to darkest in n-steps. n was determined by how many passes the shader could do before it was noticable. For me, I think 16 times was nice but I'm not 100% sure.
 
Jon
Yeah, I'm currently doing it on the CPU
 
@Shiester You can find the latest stable here. :P
 
Jon
I want to do it on the GPU instead..
 
1:25 PM
I did it like Terraria did at first, 8 passes, two in each direction. But it's not very optimal. GPU is better, but GPU isn't well suited for floodfill which needs the neighboring results to work.
I feel, if I understood DirectX a bit better, I might be able to optimize the lighting. I'm sure using XNA SpriteBatch is a bad idea.
 
Jon
you do know that XNA spritebatch is actually a shader
 
Yeah, and what I'm doing is provide a custom shader to the function.
I'm sure it could be done much faster, but I have very little understand of how GPU rendering and DirectX works. I tried a WebGL tutorial and had no clue what I had made. :P
Assuming OpenGL and DX is at least somewhat similar, I'm sure I wouldn't understand DX either.
 
Jon
Yeah, I just started learning HLSL myself.
Oh yeah
I just created a similar shader to yours in a single pass, haha
 
Jon
hold on, let me make sure
it isn't as pretty
and it isn't very fast either
heh, don't even worry about it, its pretty crappy -- I basically draw a point light where there is no tiles.
It is too slow to be useful.
 
1:41 PM
The advantages of mine is, every tile is considered, supports full RGB lights and supports infinite light sources on the scene which is cool.
 
Jon
hmmm
 
Btw, a good advice. Consider the gains of every feature. Sexy lighting is definitely great for sexy looks, but other than that, there's really no gain. So unless it's worth the effort, don't spend too much time on it.
 
Jon
ugly.
Yes, I am thinking I will go back to the per-tile calcs.
 
Reminds me of my early lighting
 
well thats weird
i was playing the stable release
explored a bit underground
went up top and just kept going left, and then it froze
 
pretty awesome though, runs really smoothly except for that lol
 
I recall an issue. The world wraps in the ends. Going left freezes, going right works.
Forgot to account for going negative coords. :)
 
<-would be interested in keeping up with updates though when they become available. you got any sort of like, you know, mailing thing or whatnot?
 
Sadly not. Development is completely stopped at the moment. :)
 
also look at that i jus beta tested and found ur bugs
 
1:54 PM
But it will resume once I finish my current project. :)
 
thatll be a 500 dollar fee for my consulting work.
 
Yeah, you'll make a fine beta tester. ;)
Oh, sure, I'll pay you in sand money. It's like real money only sand and not really money. :D
 
sounds fair enough to me
 
I'm a fair man. :P
 
oh god
clicked the silverlight version link
realized that it's playable from a web browser
 
dat tingly feeling when you see something that makes you smile. all of it.
 
No characters in the silverlight version though.
 
o lord its a creative mode menu
yeah this looks like it could be pretty fun when you pick it up. once you get to that point you should post about it here so I can stalk you creepily on the internet.
 
:D Always happy to have a new stalker. :P
 
/afk
oh wow that doesnt work here. god i need to quit playing WoW.
 
2:01 PM
Haha
A funny experiment I did. Steam Overlay as a test.
Worked nicely, and that's with the Silverlight version hosted in a windows executable.
Lots of possibilities.
 
Nice!
 
2:20 PM
anyone here tested anything with sharers? need some ideas
this is my source texture (scaled up 10 times)
and this is what my shader draws (again scaled up 10 times)
and this is my vertex shader:
attribute vec4 a_position;
attribute vec4 a_texcoord;

uniform vec2 u_InvTextureSize;

varying vec2 v_texCoord;

void main()
{
    gl_Position = CC_MVPMatrix * vec4(a_position.xy + a_position.zw * a_texcoord.zw,0.0 ,1.0);
	v_texCoord = (a_texcoord.xy + a_position.zw * a_texcoord.zw) * u_InvTextureSize;
}
and finally my fragment shader:
#ifdef GL_ES
precision mediump float;
#endif

varying vec2 v_texCoord;
uniform sampler2D u_texture;

void main()
{
	gl_FragColor = texture2D(u_texture,v_texCoord);
}
I'm only drawing once quad with coordinates:
(-0.5,-0.5, 0, 0)
(-0.5,31.5, 0, 1)
(31.5,-0.5, 1, 0)
(31.5,31.5, 1, 1)
and the texture coordinates are like this:
(1,1,32,32)
(1,1,32,32)
(1,1,32,32)
(1,1,32,32)
 
Aren't you like, supposed to subtract the half pixel inside the shader?
Then just pass along the coordinates normally?
I know that's what XNA does with the SpriteBatch :)
 
user4704
You only need to do that in D3D9, fwiw.
 
user4704
10+ (and OpenGL) use saner texel-to-pixel alignment.
 
so any ideas what is happening?
 
user4704
Why aren't your texture coordinates in (0, 1)?
 
user4704
2:28 PM
And/or what do you mean by the second set of "texture coordinates" you supplied?
 
user4704
And why are you doing a 0.5 off-alignment?
 
@JoshPetrie I'm providing same texture coordinates for each of vertices.
 
user4704
What's your texture filtering set to? Et cetera.
 
user4704
@Gajoo Not what I asked.
 
@JoshPetrie linear, both for magnification and minification?
@JoshPetrie it's caused by translate matrix.
@JoshPetrie first one is vertex positions, and second one is texture coordinates.
 
user4704
2:32 PM
Why do you have "texture coordinates" using values like 32?
 
user4704
Why does your translation matrix put things on 0.5 boundaries?
 
user4704
That's not going to be a pixel boundary in some APIs.
 
@JoshPetrie I don't get it. what's wrong?
 
user4704
"That's not going to be a pixel boundary in some APIs."
 
@JoshPetrie check vertex shader, I wanted to know exact texture rect size, so I've provided shader with texture width/height and I'm dividing texture positions inside shader.
 
Jon
2:36 PM
@William'MindWorX'Mariager So your lightmap is basically a 1x1 pixel representation of each of your tiles.. and then you resize it to the size of your viewport?
 
user4704
@Gajoo Okay, well, why don't you think about how you'd draw a single-pixel line between two pixels.
 
@JoshPetrie what do you mean?
 
user4704
How. Do. You. Plot. A. Single. Pixel. Between. Two. Pixels?
 
Run your monitor at half its native resolution?
And pray
 
@JoshPetrie maybe drawing that pixel divided by two in each of those pixels?
 
user4704
2:39 PM
What do you mean "divided by two?"
 
Take the right half of the left pixel and take the left half of the right pixel
 
meaning if I want to draw 254 between two pixels, I'll draw 127 on each of those pixels.
at least that's how I assume graphic cards should handle such cases
 
user4704
Close, but no.
 
hello world
 
2:42 PM
if that's the behavior actually happening, I can understand that light blue area but why is the red color mixing?
 
user4704
Three images, all of a 2x2 pixel grid. The top image is empty (no pixels rendered). Remember, a pixel is a point sample, not a square.
 
user4704
The second image draws (0,0) to (0,1) and the third draws (1,0) to (1,1).
 
ok?
 
user4704
You're possibly ultimately asking the card to draw from 0.5, 0.5 to somewhere
 
it should be what's happening
 
user4704
2:44 PM
So how does it do that? It interpolates the point-sampled values, quantizes them into something it can display (you can't physically plot half a pixel), and draws them.
 
user4704
It's probably the interpolation that causes the "fuzzy" result you see.
 
"Remember, a pixel is a point sample, not a square." is key here I think
 
user4704
What happens when you mix red and blue?
 
user4704
What color do you get?
 
I think I get it now, so instead of drawing based on pixel positions on the texture, it's interpolating that pixel in the texture.
 
2:45 PM
say, at any moment did we use to have a faq link next to the search bar in the main site?
I seem to remember one
 
@petervaz I think so....
 
so how can I solve such problem?
 
user4704
@petervaz It appears to have been renamed "help."
 
Oh the FAQ has been redesigned. Look at that
 
user4704
@Gajoo Try not drawing on boundaries that would require such interpolation.
 
user4704
2:47 PM
i.e., don't put the damn thing on (0.5, 0.5)
 
you mean like that faq link?
 
yeah, just like that
 
@JoshPetrie would it also fix the problem if I change texture coordinates? to these:
(1.5,1.5,31,31)
(1.5,1.5,31,31)
(1.5,1.5,31,31)
(1.5,1.5,31,31)
 
user4704
Texture coordinates should be in the range (0, 1).
 
I meant instead of (1/34,1/34) (33/34,33/34) I provide shader with (1.5/34,1.5/34) (32.5/34, 32.5/34)?
 
user4704
2:51 PM
You should stop subverting them like that, it's annoying and unnecessary.
 
user4704
Why don't you try it out and see what happens?
 
user4704
The same problem applies in reverse: how do you sample from a non-integer position in a bitmap?
 
it seems to work, but I was wondering if it's the common practice in such cases?
 
user4704
What you're doing is so backwards anyway.
 
user4704
So no, it's not common.
 
2:52 PM
@JoshPetrie it can interpolate, like it's doing right now resulting in purple color
 
3:05 PM
@Jon Yup
 
@JoshPetrie shouldn't this like fix that sub pixel issue?
gl_Position.xy = floor(gl_Position.xy * u_ActualWindowSize) / u_ActualWindowSize;
I mean after adding that line why is it not fixed?
 
Jon
3:55 PM
@William'MindWorX'Mariager How do you get it to line up properly?
After expanding mine to the screen area, it jitters as I move about...
Most likely because the tiles are offset slightly based on position.
 
4:36 PM
@Jon Uhm.. I just place it to match the tiles? :P I dunno, nothing special in that apartment.
 
Jon
Yeah, im' trying to figure out how to determine the offsets
 
The position div tilesize + offset?
I think that's how I do it. I don't really remember.
 
Jon
hmmm
Well right now I am subtracting the topleft most tile, with the X,Y coord of the screen
but it isn't giving me the right offset.
Help meeeeeee lol
 
var xOffset = -TileWorX.TILE_PIXEL_SIZE - Utilities.Remainder(this.renderArea.Left, TileWorX.TILE_PIXEL_SIZE);
var yOffset = -TileWorX.TILE_PIXEL_SIZE - Utilities.Remainder(this.renderArea.Top, TileWorX.TILE_PIXEL_SIZE);
public static Int32 Remainder(Int32 a, Int32 b)
{
	return (a % b + b) % b;
}
That's my offset calculations. :)
 
Jon
hmmm
what is render area?
 
4:52 PM
That's just the x/y of the top left corner of the view. So like, if I'm at {1265; 5689} that's my x and y.
 
Jon
5:03 PM
Hmm... this is really giving me a hard time.
 
Jon
5:23 PM
Ugh.. the offset seems to be calculated properly, but it is still flickering.
 
5:41 PM
I think debugging C++ programs in my new fetish
lately I've been asking colleagues to send me their code so I can review and debug their programs
never had I so much fun
 
o_0
 
their most common problems are segmentation faults usually because of improperly initialized arrays or bad pointer arithmetic
but I think this is a common problem for anyone
I know it is for me sometimes lol
 
pointer arithmetic in C++? Interesting.
I avoid that kind of thing exactly for that reason. :)
It's too easy to mess up
 
I think they chose their language improperly for the DS and Algorithms course
they could have chosen any language
like Python, as we've studied it one semester ago
but no, they chose C++
(I'm referring to the students not the teachers)
 
oh yeah. definitely
 
5:47 PM
DS&A is normally pseudocode but we have to do a final project in any language we want
 
C++ has too much language stuff to get in the way of studying the algos themselves
 
properly written C++ looks surprisingly readable/clean. sadly, C++ is usually not properly written
 
that's my opinion anyway
 
I chose C# for the project, so I can finish everything in less than two hours lol
 
properly writing C++ takes some practice, I would say
:)
 
5:48 PM
I agree, pit of failure and whatnot
 
today I went to the final English exam; it was combined with the exam we would have had to pass two years from now (for graduation)
it was really nice, as it was aimed at our specialization
we had to write an essay about our programming language of choice
listen to some script about stuff like photoshop
and work on some extracts from a book on programming patterns and reusability
I was unable to recognize the text and I have no idea what book it was from
I'll ask the teacher later
also they reset my traffic :D
I can now reach 150KB/s
it's the last month of painful internet though
I kind of feel bad parting with it now
 
6:49 PM
can anyone explain this to me? I'm a bit slow today it seems
 
Jon
@William'MindWorX'Mariager So basically, my shadow map is now flickering between two positions.
When I hit halfway through a tile, it switches, like my lightmap changed.
 
Sounds like you're rounding somewhere you should be flooring?
 
@AlexM. You're not putting the knife in the sink where dirty dishes go. You might use the knife again.
So you didn't make two sandwiches, or you'd put the knife in the sink.
 
It's funny, because we all know he just doesn't want to clean up
(assuming he)
 
@Almo so you'd just use the same knife again?
ew
 
Jon
6:51 PM
hmmm...
 
I would totally, if it were like within half an hour or so
 
I'm using plastic knives, forks and spoons, it makes me avoid washing them and they're also cheaper than what I'd pay for the water and gas used when doing the dishes
 
so I make one sandwich, leave the knife out in case I want another one after I finish the first.
 
unless I have to cut a slice of cheese, then I use a real knife
 
I have a dishwasher, and she doesn't complain over having to clean an additional knife. :P
 
6:53 PM
but to use the same knife :O
 
you guys asked me to explain the image, I did. No need to get into a huge argument about knife usage.
 
all the butter that would stay on it for one whole hour
ewwwwww
but this is one of my issues
I drink some water now
when I want to drink again after 5 minutes, I first lite wash the same glass (with just water) before drinking
 
also I wash my hands 25258989205908529025 times a day
 
That's very unhealthy. :P
 
6:55 PM
yeah
yeah @ seriously
not yeah @ unhealthy
 
Washing your hands too much is unhealthy. There are natural oils in your skin.
It's the same reason you shouldn't shower with soap multiple times a day.
My ex had an aunt who did that. She got very sick.
 
that's good, I only shower once per day
 
1 min ago, by Alex M.
also I wash my hands 25258989205908529025 times a day
Worst exaggeration ever then. :P
 
sorry
 
Applies to your hands too. It's not good for you.
 
6:57 PM
well I can't stop washing my hands 235909802589025908 a day
it's in my DNA now :(
 
That's probably true. :P
 

« first day (1035 days earlier)      last day (3988 days later) »