[QUOTE=turby;19738653]Have a set point on the left, and a set point on the right that if you exceed it, it scrolls the level so you're aligned with that set point[/QUOTE]
Better yet, do that set point on the left and right shit, but use a camera with a position. And when you draw tiles and sprites etc simply minus the camera coordinates from the sprite coordinates to get the location to draw the sprite.
[QUOTE=garry;19729123]Got 90% of the brush vertex editing shit done. Materials are obviously next in the chain. But fuck that for now. I'm gonna give this some polish first.
[IMG]http://dl.dropbox.com/u/3590255/Screenshots/Botch/19Jan2010_005.png[/IMG][/QUOTE]
Wow that entity list needs some kind of loving. Don't know what you'd do to it though, manual groups maybe? Especially since all the components of the world(terrain) like they're going to end up there. Maybe highlighting things in the PVS and adding an incremental search box might help too.
The brushes aren't always going to be there, plus yeah, groups probably. That's some shit that I don't really have to worry about just yet.
[QUOTE=Jawalt;19732949]Most of those named museums/schools aren't even federally funded. There are like a MILLION schools/parks/museums/etc. named after the same thing. The most popular is probably Martin Luther King. Cities make the decisions to build giant shit and name them after people.[/QUOTE]
[url]http://www.chu.cam.ac.uk/about/[/url]
[QUOTE=ZomBuster;19734340]Yeh 16 samples is not very much, especially with completely random vectors.
And you don't need to shoot them in every direction, you can use the normal to cut half of the sphere ( I didn't read into this too much.. voxels don't have normals.)[/QUOTE]
Yeah, I already tried 200 samples, but: same problem, it only outputs 2 values, like 1.0 and 0.5.... that's why it looks like some fucked up random shadows.
And, thanks nullsquared :)
[editline]03:24PM[/editline]
Now I REALLY don't get why I only get values, 0.5 and 1.0... -.-
[editline]03:30PM[/editline]
[IMG]http://img14.imageshack.us/img14/7661/aosp.png[/IMG]
Started learning Java at internship. Made a little [url=http://www.marlamin.nl/downloads/persoondb.jar]application[/url] already. There's also a more complete MySQL based version available that actually saves/retrieves stuff from a MySQL database instead of just temporarily.
I finally had a free afternoon after a lot of school and studying and made this:
[media]http://www.youtube.com/watch?v=h_TdqCxeYGY[/media]
Fuck yes -.-
[IMG]http://img704.imageshack.us/img704/2302/fuckingrender.png[/IMG]
128 AO samples, 80 seconds rendertime.
Changed the code a little, now I think this looks more satisfieing:
[IMG]http://img156.imageshack.us/img156/2302/fuckingrender.png[/IMG]
[editline]05:01PM[/editline]
Oh btw, the mistake I made:
When shooting the rays from the surface... I didn't add a tiny bit of the n vector to the ray origin, no: I added it to the ray direction instead -.-
So that everytime a ray gets shot, it gets shot directly from the surface and recognizes that as a hit...
OK this is what I've come up with:
[img]http://i50.tinypic.com/29ofk9w.png[/img]
For each "think" cycle you calculate the resultant force on the projectile and then use that to find out where to move it to.
Does that make sense? Would that work? Does anyone know of any Java applets or shit where I can test my theories untill I find something that works?
Almost, but you wouldn't have a degreading launch power, you'd give it a constant speed at launch.
[QUOTE=TheBoff;19743717]Almost, but you wouldn't have a degreading launch power, you'd give it a constant speed at launch.[/QUOTE]
Thanks, ill have a play.
Shouldn't the force drop under the x axis (relative to the ball) when it has past its peak...
[QUOTE=CarlBooth;19743280]OK this is what I've come up with:
[img]http://i50.tinypic.com/29ofk9w.png[/img]
For each "think" cycle you calculate the resultant force on the projectile and then use that to find out where to move it to.
Does that make sense? Would that work? Does anyone know of any Java applets or shit where I can test my theories untill I find something that works?[/QUOTE]
You might want to take high-school physics first, pal. Think of this as forces acting on a mass. Know the Newtonian laws of motion, with emphasis on the 2nd. I have no clue what you are talking about with 'power,' unless you are talking about energy expenditure over time. That would make sense if this were a rocket, but power is a purely scalar concept. It doesn't have a direction.
Instead of made-up physics terms, use real ones. Each time 'slice' calculate an impulse vector on each mass. (In this simplistic example which is good enough for computer simulations, a unit impulse is just a constant force imparted over a very small but fixed unit of time [henceforth called a 'tic'], the time it takes to process all the objects in the scene exactly once.) Effectively, the impulse of that time slice is the sum of the forces on the mass, multiplied by a tic's length in seconds. You take that vector, divide by the mass, and you get the [i]change[/i] in the object's velocity over the course of that tic. (You keep track of the object's velocity in a variable or something) Then you take the resulting velocity, multiply it by the tic's length in time, and you end up with the change in position over the course of that tic. When this displacement vector has been calculated for every object in the scene, then you move them all at once to their new positions and start all over again.
So apart from the initial impulse to throw the grenade, (You don't even really need that, you can just have an initial velocity when you create the grenade in the direction of the throw) you only really have 2 forces acting on the grenade. Gravity, which is constant, and air resistance, which you can do as a force that's simply proportional to the relative wind velocity.
This sort of stuff is generally really straightforward until you get into handling collisions and stuff. Then things get hairy.
[QUOTE=Robber;19742279]I finally had a free afternoon after a lot of school and studying and made this:
[media]http://www.youtube.com/watch?v=h_TdqCxeYGY[/media][/QUOTE]
omg drawing circles and blurring the previous frame? rated artistic.
[QUOTE=pleb;19745702]omg drawing circles and blurring the previous frame? rated artistic.[/QUOTE]
No. If I had done it this way red and green wouldn't cancel each other out. It's a 2D array where every pixel has a density value that is leaking to the surrounding pixels each frame. I'm drawing negative density (I know that's physically impossible :ssh:) red and positive green.
Every pixel has a velocity vector too, but I can't figure the math out to distribute the leaking density according to the vector.
[IMG]http://i49.tinypic.com/2isehxz.png[/IMG]
*Values in the last frame are guessed
Can someone help me with this? I doubt I can figure this out on my own.
[QUOTE=Cathbadh;19745680]
rant about my incorrect noun usage
[/QUOTE]
I'm aware that power is a scalar and nothing to do with this. I was using it as an umbrella term describing the force used to throw an object in games, which I thought was obvious. Clearly I was wrong.
Just to clarify, this is me conceding defeat so there isn't a massive flame war about acceptable noun usage in physics conversations. I'll remember to bring my thesaurus next time.
[QUOTE=Robber;19745869]It's a 2D array where every pixel has a density value that is leaking to the surrounding pixels each frame[/QUOTE]
surprisingly, this is how blurring works.
[editline]08:11PM[/editline]
[code]PGraphics pg;
void setup() {
size(256,256);
pg = createGraphics(width, height, P2D);
pg.beginDraw();
pg.smooth();
pg.noStroke();
pg.background(127);
pg.endDraw();
}
void draw() {
pg.beginDraw();
pg.fill(160,8);
pg.rect(0,0,width,height);
pg.filter(BLUR,2);
if (mousePressed && (mouseButton == LEFT)) {
pg.fill(255);
pg.ellipse(mouseX,mouseY,24,24);
} else if (mousePressed && (mouseButton == RIGHT)) {
pg.fill(0);
pg.ellipse(mouseX,mouseY,24,24);
}
pg.endDraw();
for(int k = 0; k < pg.height; k++) {
for(int j = 0; j < pg.width; j++) {
color hey = pg.get(j,k);
color sup = color(
127-constrain(red(hey), 0, 127),
constrain(red(hey), 127, 255)-127,0);
set(j,k,sup);
}
}
}[/code]
it's a little buggy due to processing's shitty blur filter.
On the subjects of degrees, if I get to Cambridge (I still have to get my grades - if I don't, I'll be livid) the degree I'd eventually end up with would be a "Bachelor of Arts" simply because of tradition. It would be a bachelor of arts degree, but in computer science. The actual name of the degree (in the words of suralan, now) Don't Mean Jack Shit, Quite Frankly in many cases.
[QUOTE=TheBoff;19746469]On the subjects of degrees, if I get to Cambridge (I still have to get my grades - if I don't, I'll be livid) the degree I'd eventually end up with would be a "Bachelor of Arts" simply because of tradition. It would be a bachelor of arts degree, but in computer science. The actual name of the degree (in the words of suralan, now) Don't Mean Jack Shit, Quite Frankly in many cases.[/QUOTE]
programming.
Decided to add few options and a new look to my undo closed tabs plugin
[IMG]https://chrome.google.com/extensions/img/bcennaiejdjpomgmmohhpgnjlmpcjmbg/1264018253.36/screenshot_big/2001[/IMG]
If anyone cares here's the link : [url]https://chrome.google.com/extensions/detail/bcennaiejdjpomgmmohhpgnjlmpcjmbg[/url]
I think I may have hit a "well shit" wall in my programming. Does anyone know how to convert an Object in Java to a Double?
You can't just cast it either. :saddowns:
[QUOTE=andersonmat;19747189]I think I may have hit a "well shit" wall in my programming. Does anyone know how to convert an Object in Java to a Double?
You can't just cast it either.[/QUOTE]
You believe that? Congratulations. Suppose they do. It goes without saying. I have free will you know.
Oh, found a 'solution' I suppose.
Just use the toString() to get the string value of the object and then send it to a double with Double.parseDouble().
Isn't that a bitch. Fucking Java. :downs:
[QUOTE=pleb;19746780]programming.[/QUOTE]
It's quite a lot about programming, and I raised that point earlier and got loads of disagrees. If you can't beat them, join them.
[QUOTE=andersonmat;19747189]I think I may have hit a "well shit" wall in my programming. Does anyone know how to convert an Object in Java to a Double?
You can't just cast it either. :saddowns:[/QUOTE]
What kind of object is it? You could try to cast it to Number and call doubleValue
[QUOTE=pleb;19745916]surprisingly, this is how blurring works.
[editline]08:11PM[/editline]
[code]//code[/code]
it's a little buggy due to processing's shitty blur filter.[/QUOTE]
Interesting, it actually does look a lot like my program. It will get a little bit better when I finally get moving smoke done.
Was someone still working on that Facepunch Ticker Chrome plugin? Quite interested in it.
[QUOTE=Robber;19747581]What kind of object is it? You could try to cast it to Number and call doubleValue[/QUOTE]
It was just a Java.lang.object. Nothing special.
I tried to cast it with: ((double)objectHere).doubleValue and it didn't like that. :saddowns:.
Luckily though, Double.parseDouble(objectHere.toString()) worked out.
[QUOTE=Robber;19745869]No. If I had done it this way red and green wouldn't cancel each other out. It's a 2D array where every pixel has a density value that is leaking to the surrounding pixels each frame. I'm drawing negative density (I know that's physically impossible :ssh:) red and positive green.
Every pixel has a velocity vector too, but I can't figure the math out to distribute the leaking density according to the vector.
[IMG]http://i49.tinypic.com/2isehxz.png[/IMG]
*Values in the last frame are guessed
Can someone help me with this? I doubt I can figure this out on my own.[/QUOTE]
leaktile is the absolute position of the tile whose share you want to calculate
position is the absolute position of the center tile
direction is the direction vector
leak = 1 - arccos( dotproduct(leaktile - position, direction) / (length(leaktile - position) * length(direction)) ) / Pi
I think that should result in a gradient between 1 and 0 when computed for each adjacent tile. It can't be used to calculate the share of the current tile, though.
I have a gut feeling that their sum might always be 4
[QUOTE=andersonmat;19747946]It was just a Java.lang.object. Nothing special.
I tried to cast it with: ((double)objectHere).doubleValue and it didn't like that. :saddowns:.
Luckily though, Double.parseDouble(objectHere.toString()) worked out.[/QUOTE]
double d = ((Double)o).doubleValue();
Sorry, you need to Log In to post a reply to this thread.