Page 1 of 1

Fructose Defense (third-person DOTA)

Posted: Wed Apr 22, 2009 12:37 pm
by Kazooie
We have been working on a third-person version of the Warcraft III mod, Defense of the Ancients. Unlike the original RTS version of DOTA, in ours, the controls and camera are permanently locked to the hero. Otherwise, we are hoping to emulate all the other aspects of Dota.

The team consists of two people:

Kazooie working on coding.

Semreh working on map design and any other miscellaneous tasks.

We are both graduating high school this year, and this project is our month-long senior project. We are trying to get as much done as possible in the month of our senior project and will continue as long as everything is feasible and all goes well. We are aiming to major in computer science, both of us, from the University of Illinois.

The project is mostly for practice and proof of concept. If it ever actually becomes fun to play, we'll work on commercializing it later.

But for now, we're "borrowing" the warcraft III models that dota uses.

I've only taken the computer science courses at my high school and other random classes at the University near me, but I'm surprised about how relatively easy it has been to program in Irrlicht.

The tools we are using are:

irrlicht
built in collision detection (lol)
irr-ai
irr-edit
blender
irrklang
irrnetlite2

We're pretty much done with the map, camera controls, character movement, and target-attacking. I have a basic stats system and a linkedlist for the enemy units. I really have no idea if i'm doing anything right, but it's working. The networking will definitely be the hardest part for me, since I don't really have any experience with it (if anyone has any good instructional networking for games websites, please tell me). But we do have about 8 hours a day to work, so progress has been pretty fast.

Here's the results of the first week of work:

No lighting
Image

lighting
Image

lighting
Image
No, you won't be able to climb mountains in the game.

I guess it might be illegal to post warcraft III models in another engine, so I'll take them down if anyone important asks.

Comments?

Oh, I forgot the mention, the GUI is awful right now, working on that soon.

Posted: Wed Apr 22, 2009 7:14 pm
by shadowslair
Good luck! :wink:

Posted: Sat May 02, 2009 6:29 pm
by Jesterstear
Wow man, this is really interesting.

I was going to do something similar, but the majority of people didn't want DoTA that wasn't an RTS.

And you have some competition =).

The original maker of DoTA (not IceFrog) has started to make DoTA an actual game.
http://www.leagueoflegends.com/

Good luck man!

Posted: Sat May 02, 2009 9:10 pm
by FuzzYspo0N
And there is demigod :) demigod is win

Posted: Mon May 04, 2009 6:53 pm
by Kazooie
I haven't played Demigod yet, but I'm excited to see what they did with the genre. I'm still torn between making this game into an exact remake with different controls, or changing characters and other gameplay aspects.

I do have a question about collision detection. When I add units, the irrlicht built in collision detection seems to be main reason of the drop of frames. I get about 100 fps with 5 units or less, 60fps with 30, and then about 25fps with 50. When I turn collision detection off, I can add about 200 units and stay at about 40 fps.

We've made collision about as lite as possible, making the units only collide with the ground and about 20 boxes around the trees. I'm afraid when I turn on the unit-to-unit collision, the frame rate will drop much more. Should we start using a physics engine? Are there any light-weight physics engines? Maybe I should try making my own? Any tips?

Posted: Mon May 04, 2009 7:43 pm
by FuzzYspo0N
well there are some pretty simple ways to work with the colliion in this kind of setup.

Use bounding boxes for players ( theres no need for mesh shapes to be used at that kinda detail) because for the most part its based on logic, rather than actual collision. For example, if im going to collide with the creep ahead of me, try walking to the left instead, and then repeat until i can a+ my way to the end of the map , engaging enemies.

Are you using bounding boxes already? If so, how are you checking the collision?

For the map / trees :
Model a extra super low poly model around the map, for collision. use that to "approximate" the trees, as they dont need to actually make it inbetween etc?

That should speed things up considerably?

Posted: Wed May 06, 2009 6:21 pm
by Kazooie
Yeah I've been using bounding boxes, er, trying to at least. We made bounding boxes around the trees, and tried using the built in bounding boxes for the animatedmeshscenenodes but they weren't correct. Something wrong with the 3d model or something (probably since they are coming out of warcraft III). So I saving custom, manually sized boxes to the units but it did not work out too well.

When I have the units collide with the ground, I have to use a very small ellipsoid, around 0.001, or the character will not be able to walk up mild slopes. So at one point I had two collision managers, one for unit to unit, and one for unit to ground. It worked okay, but some units were glitchy and I couldn't get the boxes right. It also slowed down the frame rate a lot. Irrlicht's built in collision detection seems very inefficient.

So again, is it relatively easy to make simple collision detection that will be faster than irrlicht's? I really can't think of how to start.

Thanks for the help. We've added quite a bit more in the past 2 weeks. The units move on their own and attack the opposite team. I got ranged attacks to work, animations, timing, and all. We've also added new units, respawning, better lighting, better targeting, and automatic creep spawning. It's almost a full working (single player) game. I'm going to attempt multiplayer right after I finish the mini-map.

Posted: Wed May 06, 2009 7:11 pm
by FuzzYspo0N
That sounds awesome, ill post more detailed stuff just now about my ideas, but im pretty certain i would never use irrlichts collision system :P

Posted: Thu May 07, 2009 12:29 pm
by Pyritie
Urrgh, dota, the bane of the map maker

Posted: Thu May 07, 2009 7:05 pm
by Kazooie
We've been working away, coming down to the last few days of senior project. We are much further along than I had ever anticipated, it's been great.

I've finished up projectiles, my own custom unit collision, and basic creep AI.

My code is horrible, but I'd like to share my basic creep collision code. It's based on position and radius which is probably some of the easiest collision possible. It's still hard on the processor with all the square rooting, but it's a lot faster than irrlicht's built in collision at least.

Code: Select all

vector3df movepos=move->futurePos;
	vector3df staypos = stay->node->getAbsolutePosition();
	f32 moveR = move->stats.getRadius();
	f32 stayR = stay->stats.getRadius();
	f32 differenceX=movepos.X-staypos.X;
	if(differenceX<0)
		differenceX*=-1;
	f32 differenceZ=movepos.Z-staypos.Z;
	if(differenceZ<0)
		differenceZ*=-1;

	f32 disEncroached = -dis+moveR+stayR;
	f32 xRatio=differenceX/differenceZ;
	f32 zRatio=differenceZ/differenceX;
	if(movepos.X > staypos.X)
		movepos+=vector3df(pow(pow(disEncroached,2)*xRatio,0.5),0,0);
	else
		movepos-=vector3df(pow(pow(disEncroached,2)*xRatio,0.5),0,0);

	if(movepos.Z > staypos.Z)
		movepos+=vector3df(0,0,pow(pow(disEncroached,2)*zRatio,0.5));
	else
		movepos-=vector3df(0,0,pow(pow(disEncroached,2)*zRatio,0.5));
	move->node->setPosition(movepos);
	move->node->updateAbsolutePosition();
I spent way too long staring at dry-erase board drawings figuring that out. I don't think it's going to help anyone, being so confusing, and not very good anyway, but maybe someone could help me make it better, maybe improving on colliding with multiple units at once (it glitches).

Here are some updated pictures:

Image

Image

dead!
Image

Posted: Thu May 07, 2009 8:01 pm
by psychophoniac
wow looks nice so far :)
omg i have so many dota freaks at my school :D i really look forward to the result of this :)

Posted: Fri May 08, 2009 7:00 pm
by Kazooie
Today was the last senior project work day. So I thought it was about time to take a break, post a demo, and open the wiki we've been working on. Feel free to check out http://teamfructose.com/wiki/index.php/FructoseDefense to view our wiki about progress to our game (don't mind the other crap in that wiki, it's just LAN party junk).

Here's the demo
http://teamfructose.com/files/FructoseDefense.rar

Sorry it will take forever to download from my webserver running on about 80kb/s upload. If you have the patience to wait, please give me some comments. Thanks!

I forgot to mention that the networking does nothing right now except connect. Pick the server option, the client won't load anything but the hero.

Posted: Tue May 12, 2009 4:23 pm
by Virion
nice job

Posted: Tue May 12, 2009 5:44 pm
by sudi
good work really. Only thing i couldn't figure out was how to attack...

Posted: Fri May 15, 2009 4:18 am
by Kazooie
Oh wow, I forgot controls. WASD to move, Q to lock on to the nearest target, Spacebar to move towards target and attack.

Hopefully will implement mouse clicking selection in the future, but I'm not sure how that will work when the bounding boxes are broken.

Thanks for the comments!