• What are you working on? v19
    6,590 replies, posted
I've finally found a good system to stop zombies/anything following a single player from all grouping at the exact same point. I started out doing collision checks with each one to all the others, which is of course horrifically slow and I couldn't get much above 100 odd zombies. Now however, I have an array that holds a grid across the map of 32x32 cells, and the zombies sets the cell it's in to it's own unique id, and whenever it's try to move it can move freely in it's own cell but can only go into another cell if it's set to -1 (for free), if it's not it means there's something there. It's much faster than trying to do predictive collision checks with every other zombie, and works really well too.
[QUOTE=chaz13;31763426]I've finally found a good system to stop zombies/anything following a single player from all grouping at the exact same point. I started out doing collision checks with each one to all the others, which is of course horrifically slow and I couldn't get much above 100 odd zombies. Now however, I have an array that holds a grid across the map of 32x32 cells, and the zombies sets the cell it's in to it's own unique id, and whenever it's try to move it can move freely in it's own cell but can only go into another cell if it's set to -1 (for free), if it's not it means there's something there. It's much faster than trying to do predictive collision checks with every other zombie, and works really well too.[/QUOTE] Isn't that sort of like spatial hashing?
[QUOTE=bobthe2lol;31763469]Isn't that sort of like spatial hashing?[/QUOTE] I'm not sure, really. I just dreamt it up last night and it seems to be working fairly well.. The main problem now is they stop and start a fair amount, and move in weird patterns. I think fiddling with the grid size might fix that, though.
[IMG]http://dl.dropbox.com/u/4240866/Pictures/Misc/WAYWO.JPG[/IMG] Who needs a graphics calculator to do quadratics when I can approximate one on in ascii characters?
[QUOTE=Iceguize;31763884][IMG]http://dl.dropbox.com/u/4240866/Pictures/Misc/WAYWO.JPG[/IMG] Who needs a graphics calculator to do quadratics when I can approximate one on in ascii characters?[/QUOTE] Holy shit, that's awesome.
[QUOTE=Iceguize;31763884][IMG]http://dl.dropbox.com/u/4240866/Pictures/Misc/WAYWO.JPG[/IMG] Who needs a graphics calculator to do quadratics when I can approximate one on in ascii characters?[/QUOTE] Next make it graph [B]any[/B] curve.
Then release it as Asccilur grapher.
[QUOTE=iPope;31764905]Then release it as Asccilur grapher.[/QUOTE] don't forget to use a chain of if-else statements for the different curves
[thumb]http://dl.dropbox.com/u/5619257/opc/opencraft_2011-08-16_16-57-27.png[/thumb] Collision meshes a go-go
[QUOTE=icantread49;31764995]don't forget to use a chain of if-else statements for the different curves[/QUOTE] Wait [editline]16th August 2011[/editline] [QUOTE=danharibo;31765056][thumb]http://dl.dropbox.com/u/5619257/opc/opencraft_2011-08-16_16-57-27.png[/thumb] Collision meshes a go-go[/QUOTE] Are the red parts chunk borders? If so, why aren't the chunks of uniform size? [editline]16th August 2011[/editline] Or are the chunks just so small I'm missing some of the borders?
[QUOTE=esalaka;31765098]Are the red parts chunk borders? If so, why aren't the chunks of uniform size?[/QUOTE] Looks like bounding boxes for the chunks.
[QUOTE=esalaka;31765098]Wait [editline]16th August 2011[/editline] Are the red parts chunk borders? If so, why aren't the chunks of uniform size? [editline]16th August 2011[/editline] Or are the chunks just so small I'm missing some of the borders?[/QUOTE] - nevermind - They are different sizes because they are the bounding boxes.
[QUOTE=Maurice;31752829]InstantFacebookâ„¢[/QUOTE] [QUOTE=Quark:;31752860]I had that thought as I added Sepia Don't tell Carl[/QUOTE] you're not my friends anymore
I need a way to pathfind in a sidescrolling game. It's not tile based, and can't place nodes as the terrain is randomly generated. Any algorthim I can use or should I simply check if the surronding area is traversable or not? Another problem is that the terrain is modified dynamically(aka, the player can dig holes but the AI might want to go across the hole not in it(no, it isn't minecraft)), how can I detect that?
[QUOTE=CarlBooth;31765353]you're not my friends anymore[/QUOTE] baby come back you can blame it all on him
[QUOTE=neos300;31766175]I need a way to pathfind in a sidescrolling game. It's not tile based, and can't place nodes as the terrain is randomly generated. Any algorthim I can use or should I simply check if the surronding area is traversable or not? Another problem is that the terrain is modified dynamically(aka, the player can dig holes but the AI might want to go across the hole not in it(no, it isn't minecraft)), how can I detect that?[/QUOTE] You can subdivide the map using a quad tree. Check for intersection of the quads with the map, subdivide if there is a collision. Keep dividing until you reach a threshold. Use the quad's center and map out path costs using some cost algorithm. I've never tried it out and it's probably wrong and an easier way to do it.
[img]http://img593.imageshack.us/img593/8971/tankgame20110816201209.png[/img] Tanksplosion!
[QUOTE=neos300;31766175]I need a way to pathfind in a sidescrolling game. It's not tile based, and can't place nodes as the terrain is randomly generated. Any algorthim I can use or should I simply check if the surronding area is traversable or not? Another problem is that the terrain is modified dynamically(aka, the player can dig holes but the AI might want to go across the hole not in it(no, it isn't minecraft)), how can I detect that?[/QUOTE] I don't see why you can't place and connect nodes during terrain generation. Then create and connect nodes as the player moves around in places that aren't noded. This seems like a really bad way of doing things though, i don't know how to implement any algorithms to pathfind in that way.
[img]http://i.imgur.com/DmGwL.png[/img] Long story short: I opened QViewIt in Visual Studio and all of the items in my toolStrip were gone, along with the statusStrip on bottom. So I spent all day (so far) re-coding it. :( Everything functions though! Any suggestions though? This is just to replace Windows's ugly image viewer, it's not an editor exactly.
Make it so you can zoom in really far, and out, with mousewheel.
Eventually, thanks for reminding me
[QUOTE=neos300;31766175]I need a way to pathfind in a sidescrolling game. It's not tile based, and can't place nodes as the terrain is randomly generated. Any algorthim I can use or should I simply check if the surronding area is traversable or not? Another problem is that the terrain is modified dynamically(aka, the player can dig holes but the AI might want to go across the hole not in it(no, it isn't minecraft)), how can I detect that?[/QUOTE] Will your NPCs be able to fly/climb/dig to get to places that the terrain blocks?
I've got SO many ideas for random games I want to try out but none very well thought through that I'll actually go through with. Hmmm. Anyone else get this problem?
[media]http://www.youtube.com/watch?v=xOGy2ey-UzQ[/media] Version 0.0.3! Snow level, tank selection, machinegun and flamethrower. Now I just need a level selector. Comment and Subscribe guys.
[img]http://eagle.undo.it:8083/img/kintel_60.png[/img] [img]http://eagle.undo.it:8083/img/kintel_61.png[/img] Implemented a weapon system and a new toy. Eliminated a good deal of inter-class coupling yesterday by rearranging stuff into class hierarchies properly. Also, caching text to polygons for real time rendering.
[QUOTE=chaz13;31768696]I've got SO many ideas for random games I want to try out but none very well thought through that I'll actually go through with. Hmmm. Anyone else get this problem?[/QUOTE] I have the opposite problem. I think the shit out of my ideas, and then I have no motivation to actually make them because all that's left is the tedium of typing shit out.
Why is almost noone in programmers chat? It's getting really quiet.
I've been working on 3D and I have a problem. I want to do lighting and I think I messed something up. I want the user to be able to input mesh data and the normals to be auto generated if they are not supplied. So far, my algorithm does the following: Make an array of Vector4 for the number of vertices on the mesh. Loop through all the indices in the index array, 3 by 3. For each 3 vertices, get their face normal (by doing cross( b - a, c - a) with a, b and c being the 3 vertices). Add the resulting normal to the appropriate index in the Vector4 array I created and increment the W of each one by 1. After looping through, I do another loop through the Vector4 array and divide each one with it's W. That way, each vertex has the average normal of all the faces it's included in. Then I just normalize them. Is there something wrong with my logic? Because I've set the light to shine from left to right but it's not really making a drastic difference. I THINK the right sides are darker than the left ones but not by much. Maybe I should try a sphere since it's normals should be all pointing outwards.
text rendering, buttons looking a little better, block editing :D [img]http://i.imgur.com/H4WtW.png[/img]
[QUOTE=icantread49;31771103]text rendering, buttons looking a little better, block editing :D [img]http://i.imgur.com/H4WtW.png[/img][/QUOTE] Stop! If you show us anymore screenshots we will be able to determine the super-secret project...
Sorry, you need to Log In to post a reply to this thread.