Main Menu

Creeper world 3D

Started by rex4, July 18, 2011, 06:03:37 AM

Previous topic - Next topic

thepenguin

that makes this pretty obvious

Cells:
ABC
DEF
GHI

Cell E creeper = (B+D+F+H)/4
We have become the creeper...

Grun

OMG ty Ranak, that is great help, that one big thing i spent ages trying to get sorted. Will read through adn do some calculations and make chages here and there. Have decided that im going to change the render method from making each cell a cube which set its height from such calculations to a group of triangles which durve around to such heights to smooth things out. Will make all the changes in 1 go i guess.

Ebon as for weapon dmg. It is actualy a lot easyer than most things are. It simply determin what creeper in range and then select which to target, so nearest for blaster, highest density/height for mortor. Then after whatever animation/projectile you want hits reduce the height of the creeper cell by a set amount or reduce to nothing.

Now unit placement, this could be done simply by doing a thing called a ray trace. This basicly means firing and invisiable line from the mouse pointer into the screen and finding what position on the terrain it hits. As the terrain i use is based on a height map this could return the nearest point of the triangle strip, so could work very similar to the way CW works where you build in set positions based on a grid. Think to make easyer with such being on a 3D basis would have to have option to show a semi transparent outline of the grid to make easyer.

Guess if Virgil ever did make a 3D version of CW, I hope this topic may help a little about some of the methods posible to do somethings.

Any more problems people can think off, as im sure any programmer will tell you, this is the enjoyment of proggraming, it not the actual coding of such, it working out how to do it. That what 99% of prgramming is, problem solving :P (well that and syntax checking/run time errors and logic errors probably take up about 30% so say 69% problem solving :) )

Grun

Jay the Juggernaut

#32
thhhhrrreeeeee-dddddeeeee! :D

Pretty cool simulation if you ask me.




Ground = G
Creeper = C
Emitter = E

   BEB
BBBBBBB
GGGGGGGG

Like MY simulation? :P
I'll mostly be lurking as a guest, not much into posting anymore. :P

mthw2vc

What you have shown thus far demonstrates nothing I consider infeasible. You are only doing calculations based on depth. In effect, it is a fancy 3D rendering of CW1 using a language that can handle a 3D display in an efficient manner. (Realize that under normal conditions, about three fourths of CW1's processor load comes from rendering it.) What then about underground creeper, or creeper floating in midair? To do that, you need to further your cellular automata based on density at each cell in a 3D lattice for numerous layers, vastly increasing the amount of computation that goes into running the creeper itself. Then, how do you deal with displaying subterranean chambers? How do you allow the user control of midair weapons in a practical fashion?

Grun

ok I asked for that Mthw2vc, I should sit in a croner now :P

lets see, for underground creeper I would not be able to use a height map for the reson the main limitation of using such it is unable to creater caverns, caves or over hangs, you would be looking at modeling the entire scene. But as it is, im basing on the current mechanics of CW1. As for how to sort the creeper for underground if the terrain wasnt a limiting factor you would be looking at a particle engine along with some rearly rearly mad phsics engine which as a solo programmer I am is a little out of the question.

So the last point, midair weapons, if you mean such as selecting a unit which has taken off to be moved, again through a simple ray trace, for placement of a flying unit which reamins in the air which is not in CW, for it to be done in and RTS fashion you would still place such a unit based on a XY baisis but display a unit on an increased Z axis for placement. I think I would show a simple shadow or selection indicator on the ground to show where the unit would be in relation to the rest of the scene.

One thing from your post though I had not thought of was the selection of units as they act in CW1, that being a unit that is in mid air, which would have been a big oversite.

I will keep at this, as one it testing me which is always great, there seems interest, and i soon got a lot of time off work, getting married, hunny moon then 2 weeks after off work also :) so dont think I can do on first half of work break, but latter half I may have quite a bit off free time.

Grun

Jay the Juggernaut

ya'know, I really like your simulations, even though it's probably just a fantasy :(
3D does sound pretty cool, though. It would be fun to try. ;)
I'll mostly be lurking as a guest, not much into posting anymore. :P

Grun

ok quick update, introduced terrain changes which the creeper works around. But still trying to get the creeper to spread right, spent about 3 hours writing code to realise i had done nothing :(  In link Ranak gave it mentions other posts which talks abour the calculation of the spread, would ask Virgil but dont want to stop him working on next update for CW2 :P so anyone remeber anymore about the calculations for the creeper. I looked a lot into heat transfer physics etc but my physics a little rusty :P

Thanks
Grun

ohhh also nearly forgot, just finished putting together a quick model for what a blaster may look like in 3d, will try and get that includeded aswell once i sort spread problem out

also.....
Rex4, sry for hijacking your topic for such although i guess it is sort of relevent, thought i should add this even though Rex4 has only this one post he may still read a lot up on CW forums

rex4

Quote from: Grun on July 28, 2011, 07:43:59 PM
Rex4, sry for hijacking your topic for such although i guess it is sort of relevent, thought i should add this even though Rex4 has only this one post he may still read a lot up on CW forums

It's not hijacking, it's totally about the topic.

Jay the Juggernaut

Wow Grun, I really liked your simulations... and your still working? COOL.  :D
I'll mostly be lurking as a guest, not much into posting anymore. :P

Grun

#39
Well yes, im like a dog with a bone :P just ready to through pc out of window with the calcs for spread of creeper :P

Think i got it, depending on how drunk i get tommorow on my stag do :P may try and get an update done on Sunday showing the new creeper render, no squares this time :P and also added a height map showing changes in terrain. oh also the spread should be sorted, and if you very very lucky and I may introduce a blaster to the mix :P

or..... I get very very drunk and make muself ill all day Sunday :P

Grun

also nearly forgot, got FPS up to above 200 on my system rather than the 50ish i belive it was in last vid.

Ranakastrasz

IMO it would be better to first simulate 2d creeper, just displaying it in 3d (height and terrain height) which on it's own would be quite an achievement. Then, After that is done try to figure out a way to simulate an actual 3d creeper and then display it in 3d.

Grun

You would think Ranak, but the display side is easy enough and already written yo work out such.

The calcs are the same for both 2d and 3d there after.

same as it would be for 2d or 3d, i know height of each area, and can get surrounding areas, it just from that to know how much to pass to each cell.

Tryed a few ways and slowly getting there. If only i had the source code of CW......... :P

Grun

Grun

sry guys for lack up update on this, been very very busy planning for wedding, only 5 days to go till the big day :)

But coz of that, I finish work today so got a couple of free days all going well. Been working on a few small areas and now putting the lot together.

Have now introduced code for height maps, ignore the texture for it but here we go...


A very basic lay out for terrain I know, but it works well for testing the way the creeper spreads in like a canyon. And as you can see wtill keeping the fps pretty high, again you dont want to know how many things running in the background when ss was taken :P

Worked out the probs I was having with creeper, just need to ajust timers etc so will introduce that to the terrain, and the final part is I have put together a simple blaster model which is able to attack the creeper, well sort of no animation/graphic to show the projectile just yet.

Hopefully upload a vid showing all this tommorow if I come across no probs.

Grun

Grun

ok just the screenshot of the heightmap is pretty dull I know, so.......



what you guys think?

Few points as noted on video description...

Terrain texture needs replacing, easy job to sort just being lazy and current texture is clear to see what creeper doing.
The emmiter is causing weird spike whenever it adds more creeper
Some clipping on terrain when creeper making its way over the edge of cliff.

Well after them small bugs I guess the blaster has to be next :)

Grun

Ebon Heart

#44
Holy crap Grun! I can't wait to see this with weapons attacking the creeper. How long did all this take you?? (btw, 2nd Creeper World 3d demp? lol.) It's a small detail, sure, but it still made me laugh. :P
EDIT: congratz on the upcoming wedding. (just read your first post) You know you can wait to do this until after the big day. I'm sure the videogame world can wait a while.
When the going gets tough, the tough get going. The smart left a long time ago.
Check out the amazing A Tragedy Forgotten CW2 map series!