Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Ultimate Zombie Fighters  (Read 35302 times)

0 Members and 1 Guest are viewing this topic.

Nexus

  • SFML Team
  • Hero Member
  • *****
  • Posts: 6286
  • Thor Developer
    • View Profile
    • Bromeon
Ultimate Zombie Fighters
« Reply #15 on: August 07, 2010, 11:05:33 pm »
By the way, Boost contains already optimized pathfinding algorithms like A* or Dijkstra's. Take a look at the Boost.Graph library.
Zloxx II: action platformer
Thor Library: particle systems, animations, dot products, ...
SFML Game Development:

priomsrb

  • Newbie
  • *
  • Posts: 38
    • View Profile
Ultimate Zombie Fighters
« Reply #16 on: August 08, 2010, 02:31:26 am »
Quote from: "Nexus"
Take a look at the Boost.Graph library.

Thanks didn't know about that. Looks interesting.

Quote from: "WitchD0ctor"
I see your using micropather for a*, how is that? Was it easy to get working correctly?

Micropather is a generic path finder so you can use it for 2D, 3D and with edges or vertexes or areas. However despite it's genericness, it was quite easy to use it for my 2d, vertex based pathfinding. I think you only need to override 2 simple functions and it does the rest for you.

Quote from: "Hugo"
Make zombies weaker(less damage to wall) when health is low

However that means that a player can hold up a window forever if the zombies next to it are weak. This will be a problem if there are 3 people playing since they will never die ;).

Recruit0

  • Jr. Member
  • **
  • Posts: 66
    • View Profile
Ultimate Zombie Fighters
« Reply #17 on: August 08, 2010, 06:10:15 am »
Quote from: "priomsrb"
Ahh. You must be using 64-bit linux am I right? There was a small bug that I just noticed from your compile output. I just fixed it and uploaded a new source package. You can get it from here. Please test it out again to see if it works.

Thanks a lot for reporting the error. I wouldn't have realised it if you didn't report your problem.
Yes I'm using 64 bit. You seem to have not completely fixed it. Another error (same):
Code: [Select]
[ 62%] Building CXX object src/CMakeFiles/uzf.dir/Scenes/Test/LevelGraph.cpp.o
/cache/home/recruit0/downloads/uzf-0.1-1-source/src/Scenes/Test/LevelGraph.cpp: In member function ‘sf::Vector2f LevelGraph::getGridPositionFromState(void*)’:
/cache/home/recruit0/downloads/uzf-0.1-1-source/src/Scenes/Test/LevelGraph.cpp:66: error: cast from ‘void*’ to ‘int’ loses precision
/cache/home/recruit0/downloads/uzf-0.1-1-source/src/Scenes/Test/LevelGraph.cpp: In member function ‘virtual float LevelGraph::LeastCostEstimate(void*, void*)’:
/cache/home/recruit0/downloads/uzf-0.1-1-source/src/Scenes/Test/LevelGraph.cpp:134: error: cast from ‘void*’ to ‘int’ loses precision
/cache/home/recruit0/downloads/uzf-0.1-1-source/src/Scenes/Test/LevelGraph.cpp:138: error: cast from ‘void*’ to ‘int’ loses precision
/cache/home/recruit0/downloads/uzf-0.1-1-source/src/Scenes/Test/LevelGraph.cpp: In member function ‘virtual void LevelGraph::PrintStateInfo(void*)’:
/cache/home/recruit0/downloads/uzf-0.1-1-source/src/Scenes/Test/LevelGraph.cpp:200: error: cast from ‘void*’ to ‘int’ loses precision
make[2]: *** [src/CMakeFiles/uzf.dir/Scenes/Test/LevelGraph.cpp.o] Error 1
make[1]: *** [src/CMakeFiles/uzf.dir/all] Error 2
make: *** [all] Error 2

Hugo

  • Jr. Member
  • **
  • Posts: 60
    • View Profile
Ultimate Zombie Fighters
« Reply #18 on: August 08, 2010, 07:11:57 am »
You could make a small controlled explosion after holding up a windows for too long  :P

priomsrb

  • Newbie
  • *
  • Posts: 38
    • View Profile
Ultimate Zombie Fighters
« Reply #19 on: August 08, 2010, 10:27:40 am »
Quote from: "Recruit0"
Yes I'm using 64 bit. You seem to have not completely fixed it.

Ok I added some more fixes to the code. Please check now if it works. http://sourceforge.net/projects/uzf/files/uzf/0.1/uzf-0.1.2-source.tar.gz/download.

BTW you can get the latest unreleased source from git:
Code: [Select]
git clone git://uzf.git.sourceforge.net/gitroot/uzf/uzf

Quote from: "Hugo"
You could make a small controlled explosion after holding up a windows for too long

Hehe :D. Seems a bit random though.

If you feel that the game is too hard at the moment, that is because the level isn't balanced very well. A well designed level will let you progressively get stronger (in terms of weapons and escape routes) as the zombies get harder.

Recruit0

  • Jr. Member
  • **
  • Posts: 66
    • View Profile
Ultimate Zombie Fighters
« Reply #20 on: August 09, 2010, 01:01:44 am »
Code: [Select]
[ 17%] Building CXX object src/CMakeFiles/uzf.dir/include/micropather.cpp.o
/cache/home/recruit0/downloads/uzf-0.1.2-source/src/include/micropather.cpp: In member function ‘unsigned int micropather::PathNodePool::Hash(void*)’:
/cache/home/recruit0/downloads/uzf-0.1.2-source/src/include/micropather.cpp:357: error: cast from ‘void*’ to ‘MP_UPTR’ loses precision
/cache/home/recruit0/downloads/uzf-0.1.2-source/src/include/micropather.cpp: In member function ‘void micropather::MicroPather::GoalReached(micropather::PathNode*, void*, void*, std::vector<void*, std::allocator<void*> >*)’:
/cache/home/recruit0/downloads/uzf-0.1.2-source/src/include/micropather.cpp:515: error: cast from ‘void*’ to ‘MP_UPTR’ loses precision
/cache/home/recruit0/downloads/uzf-0.1.2-source/src/include/micropather.cpp: In member function ‘int micropather::MicroPather::Solve(void*, void*, std::vector<void*, std::allocator<void*> >*, float*)’:
/cache/home/recruit0/downloads/uzf-0.1.2-source/src/include/micropather.cpp:703: error: cast from ‘micropather::PathNode*’ to ‘MP_UPTR’ loses precision
/cache/home/recruit0/downloads/uzf-0.1.2-source/src/include/micropather.cpp:703: error: cast from ‘micropather::PathNode*’ to ‘MP_UPTR’ loses precision
make[2]: *** [src/CMakeFiles/uzf.dir/include/micropather.cpp.o] Error 1
make[1]: *** [src/CMakeFiles/uzf.dir/all] Error 2
make: *** [all] Error 2

priomsrb

  • Newbie
  • *
  • Posts: 38
    • View Profile
Ultimate Zombie Fighters
« Reply #21 on: August 09, 2010, 06:45:07 am »
Sorry. I finally got hold of a 64-bit machine today and made some more changes. I was able to succesfully compile on ubuntu 9.10 64-bit. Please test again to see if it works now.

http://sourceforge.net/projects/uzf/files/uzf/0.1/uzf-0.1.3-source.tar.gz/download

I really hope I didn't screw up again. :)

Thank you for your patience.

TMKCodes

  • Newbie
  • *
  • Posts: 11
    • View Profile
Ultimate Zombie Fighters
« Reply #22 on: August 09, 2010, 12:22:02 pm »
Quote from: "priomsrb"
I looked a little at sf::Network and some other low-level networking libraries recently. I think I might choose enet since it doesnt require threads and makes it easy to send reliable packets.

I've never done netowork programming before and so it seems really interesting and challenging. It's almost like a new way of thinking. However every time I think about it I get scared because of all the issues that can occur (high lag, cheating, synchronisation problems). Perhaps I should try to get a basic system working and worry about those later.

Have you made any networked apps before? Is it really as hard as I think it is?

Quote
Survived 7 rounds with touchpad on my laptop ran out of bullets

Wow must be hard on a touchpad. You can buy more ammo from where you bought your gun. I'm guessing you ran out of mp5 ammo ;)


I have written small chat client/server applications, it's not that hard, but i like more low level networking libraries like berkeley and winsock as they don't come in way, but sf::Network is nice as i can easily make the packets easily and it still does not come in way.

I actually ran out of mp5 ammo and then didn't have money to buy more and kept running out of ammo from other weapons i died just before i could buy more. :P

Recruit0

  • Jr. Member
  • **
  • Posts: 66
    • View Profile
Ultimate Zombie Fighters
« Reply #23 on: August 10, 2010, 04:17:38 am »
Thanks for fixing it. Interesting game. Some ideas:

* Menu
* Pause game
* Multiplayer - at least LAN
* Graphics upgrade - attack animations, running, etc.
* Don't allow player to repair window and shoot at same time.
* Dual wield guns
* Melee weapons, dual wield melee weapons
* Setup bombs, land mines, etc.
* Missile launcher
* Auto Turret (with limited ammo, etc)
* Gun that pierces through multiple targets (in a row, i.e. AP rounds)
* Flame thrower
* Don't make fast zombies. Only fast zombies should be dogs. Zombies should only get tougher and/or cause more damage. The whole point behind zombies is there are so many of them.
* There should be more zombies. The player should be avoiding getting surrounded by them, not them catching up to you.
* Be able to create barricades.
* Get bonus points for stuff (e.g. not getting hit at all during the round, not missing a shot during the round, etc.)
* Sound effects

Got to 6 rounds on first try with laptop touchpad.

priomsrb

  • Newbie
  • *
  • Posts: 38
    • View Profile
Ultimate Zombie Fighters
« Reply #24 on: August 10, 2010, 06:47:09 am »
Sweet. Glad its working now :)

Thanks for the list of ideas. Theres some good ideas there that we didn't think of.

* Multiplayer is one of the main aims for the game.
* We are currently going working on the graphics. They will soon replace my cruddy programmer art ;)
* New weapon types are a bit tricky but may come slowly.
* Not having fast zombies is an interesting idea. Never thought about it that way.
* Bonus points sound like fun
* Sound is being worked on right now. Should be in the next version.

Recruit0

  • Jr. Member
  • **
  • Posts: 66
    • View Profile
Ultimate Zombie Fighters
« Reply #25 on: August 14, 2010, 12:15:53 am »
Got to lvl 15 with a laptop touchpad.

You should have someone or a team go through and balance it more. Currently it's about 10% balanced.

Also, it should spawn more zombies as the levels go up, not make them stronger. I noticed this around lvl 10. Took more than 1 shot to take down the yellow zombies (usually 1 puts them down). Since you can only fit so many zombies on the screen, you could use a leaking spawning system. I have more comments about it but I'll stop there.

I'm interested in working on a zombie game in the future (after rewriting cpGUI). I'm primarily interested in game mechanics (guns, # of zombies, equipment, etc.). Mind if I join you sometime?

EDIT: Also I read your blog about Mac OS. I have access to a Mac at my uni so can test there if needed.

priomsrb

  • Newbie
  • *
  • Posts: 38
    • View Profile
Ultimate Zombie Fighters
« Reply #26 on: August 14, 2010, 04:20:43 am »
Quote

Got to lvl 15 with a laptop touchpad.

Wow. I think thats a new high score :D

Quote
You should have someone or a team go through and balance it more. Currently it's about 10% balanced.

I agree, the current map, weapon and zombies aren't well balanced. Hopefully the next version will be better in this regard.

Quote
Since you can only fit so many zombies on the screen, you could use a leaking spawning system

Actually there is a leak spawning system in place but I kind of screwed up the parameters. The zombies spawn way too fast in the later rounds.

Quote
I'm interested in working on a zombie game in the future (after rewriting cpGUI). I'm primarily interested in game mechanics (guns, # of zombies, equipment, etc.). Mind if I join you sometime?

Sure. It would be great to have another coder on the team. When you are ready just tell us. Also cpGUI looks interesting. When we start on the GUI it could be handy.

Quote
Also I read your blog about Mac OS. I have access to a Mac at my uni so can test there if needed.

That'll be great. I've seen some people downloading UZF from a mac but I'm not sure whether it is actually working for them. Being able to provide a binary package for them would be nice.

Recruit0

  • Jr. Member
  • **
  • Posts: 66
    • View Profile
Ultimate Zombie Fighters
« Reply #27 on: August 15, 2010, 06:42:17 am »
Quote
Actually there is a leak spawning system in place but I kind of screwed up the parameters. The zombies spawn way too fast in the later rounds.

I'm not sure we're talking about the same thing. When is it supposed to kick in? Cuz i haven't seen what I'm talking about and got to lvl 15. Looks like a regular levelling system is used.

Also, a leaking spawning system (by design) can't spawn too fast. Only the levels may not be balanced. A leaking spawning system is used to deal with the fact that you can only fit so many units on the map at once. By spawn speed it sounds like you're talking about levels.

If you are using a leaking spawning system I hope it's optimized to recycle units instead of creating/destroying them (I haven't looked in the code yet).

priomsrb

  • Newbie
  • *
  • Posts: 38
    • View Profile
Ultimate Zombie Fighters
« Reply #28 on: August 15, 2010, 09:55:42 am »
The spawning system is a bit complicated. Basically the level designer chooses how many zombies of which type appear each round. After the last round that the level designer has given spawn data for, the zombies get healthier and faster by 10% per round. In the default map the spawn data for the first 10 rounds is given. Which is why each subsequent round, the zombies get tougher.

The leaking system works like this: there is a max limit of 50 zombies alive at any point (which is never reached in the current map anyway). A zombie is spawned every 2/roundNumber (which is too fast for later maps. perhaps 1 + 1/roundNumber would be better). Adjusting these 2 formulas will result in a better spawning system.

If you're curious, the code for the spawning can be found here

Recruit0

  • Jr. Member
  • **
  • Posts: 66
    • View Profile
Ultimate Zombie Fighters
« Reply #29 on: August 16, 2010, 01:51:30 am »
That doesn't sound like what I'm talking about. It doesn't solve how to fit a thousand units on the map when you only have room for 100. The purpose of a leaking spawn system is to flood the map with units (of which 50 is way too low to do that, if the map is "clogged" with 50 units then it's either way too small or the units are way too big).

What I'm talking about is simulating the map as if there were a thousand units that were spawned instead of 100. The other 900 units can't fit on the map so make it look as if they were spawned outside the map. It's impractical to do it literally (try spawning a million units... yes, we mine as well crash the game as it's unplayable at this point).

Whenever a unit is killed, spawn another one. This way the map is always full until the player(s) kill however many units were supposed to be spawned. Better yet, rather than spawning another one, just recycle them (optimization). Whenever a unit is killed, move it to a spawning point and bring it back to life.

This way, it'll look like hundreds or thousands of units are coming at you because the map becomes a "view" (maximum viewing field). The max unit count should be a thousand, but to start with at least 200 (a thousand units may take more optimization tricks than recycling). It could also be dependent on a map, with larger maps (supporting thousands of units) for people with high-end hardware and smaller maps for low-end.

Also with larger maps you can have multiple buildings. So, the player will have an incentive to move around more (besides avoiding zombies).

Another interesting mechanic would be if more zombies were spawned near a player that is near the edge of the map. Perhaps it could be used somehow to prevent players from getting to the edge of the map (so you can't walk off the map, or you have to use an "invisible wall", zombies preventing you from walking off the map is better IMO).

I don't think zombies should upgrade with each level, but if they do then the player needs to be able to upgrade as well. This will make balancing the game harder (but it might make it more fun). I think upgrades should be left out at least until the game is more complete.

EDIT: Also, rather than having spawning points, zombies should be spawned at the edge of maps as if they were walking in from a random direction. This way when it becomes multiplayer, players can't farm spots and everyone will have a chance... I should probably write up a document or something because there are a lot more details that I could go into besides the above.