Coder Social home page Coder Social logo

td's Introduction

Data Communications 2011
Tower Defense Game

COMPILING
=========
You can run the bootstrap script which will handle installing all required
dependencies, cloning a fresh git repository, compiling the binaries and
deploying default settings config. The bootstrap script is located in the the
tools directory.

    # Downloads the bootstrap script.
    $ wget --no-check-certificate http://is.gd/bootstrapTD  
    # Execute the script.
    $ . bootstrap.sh

On Mac and Linux, run the deps script to install all dependencies.
Then run qmake and make to build the tower defense game.

    $ ./tools/deps.sh   # Installs all required dependencies.
    $ qmake             # for Ubuntu, Arch Linux
        OR
    $ qmake-qt4         # for Fedora
    $ make


On Windows, with Visual Studio 2010:
------------------------------------
From the command-line:
    qmake -spec win32-msvc2010 -tp vc -r td.pro

Open td.sln in Visual Studio 2010.
Set paths in each project for the following libraries:
    tiled:
        zlib
    client:
        OpenAL
        libvorbis
        libvorbisfile
        libogg
        Speex
Build.


Map script (.conf file in ./maps):
Comma separated values
--------------------------------
First line contains map specific information
    ..
Any following lines contain wave information
    
Map Composition:
    Difficulty
    Map Name
    Base's HP
    Wood Quantity
    Stone Quantity
    Bone Quantity
    Tar Quantity
Wave Composition:
    Path on which wave travels
    Type of NPC
    Number of NPC's in wave
    Time at which wave starts (from start of game)    
    Density of monsters (number of game ticks between each npc)
    Number of Gems in wave
    
Anything after an empty line or a '==' is ignored


td's People

Contributors

afternoontoast avatar chilly604 avatar dantastic avatar deanmorin avatar dpogue avatar dtrain avatar ianlee avatar icooper89 avatar koralarts avatar lukequeenan avatar mvan avatar nickhuber avatar tnightingale avatar tstenvold avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

td's Issues

Audio error 40964 on exit

Sometimes when exiting the program the audio sometimes gives off an error.

I think this has to do with context being destroyed before the streamOgg() exits so it calls checkError();

tstenvold to fix

Menu Centering

This is a reminder to fix if something funky happens in Nickhuber/master

Name doesn't display or go away if not moving

The Player's name won't display unless you're moving and won't disappear unless you move after you've pressed/held the key to display them. Probably an issue with setting the object dirty and updating the image.

This will probably be an issue with the healthbars, too.

AudioManager::streamVoice hangs

I run the client, and close the lobby window without clicking any other buttons. The window closes but the program does not actually exit.

gdb tells me that we are waiting somewhere in AudioManager::streamVoice...

Player movement

Player moves faster in diagnal then he does in any straight direction

NPCs don't always follow the path

This seems to only be an issue when connected to the server.

NPCs sometimes go past the base, then return to a random waypoint and follow the path again. Usually they eventually die off when they reach the base again.

QtThreadPool is limited per Computer

At some point in the initialization phase of the game we need to call something like

QThreadPool::globalInstance()->setMaxThreadCount(n);

Where n is the number of foreseeable threads we will need across the game.
This is particularly important as the audio starts a new thread for every playSound() function call.

Otherwise QtThreadPool max is set to the "Ideal" size which may not be ideal for us

Menu scales to big

If keys are hit fast or too much is going on sometimes the menu can scale larger than it should.

map scrolls -> causes crash

on Linux if you move off the Map, minimize the game, then bring it back the map will be scrolled. If you press 'f' to fire something you will crash.

Collision detection on bounds of map

If the map has a route to leave the viewable area, and the player tries to escape in that route then the game crashes.

The collision detection should check the bounds of the viewable area and not allow the player to leave it.

GraphicsComponent crash - Projectiles

Mac OS gets random crash any time btwn 30 seconds - 5mins of playing.
Seems to be related to firing projectiles..
Feels like a threadsafe issue.

Relevant crash log details:

Thread 0 Crashed:  Dispatch queue: com.apple.main-thread
0   libSystem.B.dylib               0x00007fff845aa616 __kill + 10
1   libSystem.B.dylib               0x00007fff8464acca abort + 83
2   libstdc++.6.dylib               0x00007fff8224d5d2 __tcf_0 + 0
3   libstdc++.6.dylib               0x00007fff8224bae1 __cxxabiv1::__terminate(void (*)()) + 11
4   libstdc++.6.dylib               0x00007fff8224bb16 __cxxabiv1::__unexpected(void (*)()) + 0
5   libstdc++.6.dylib               0x00007fff8224bfd6 std::bad_cast::what() const + 0
6   com.yourcompany.client          0x000000010001277d GraphicsComponent::initGraphicsComponent() + 33 (GraphicsComponent.cpp:82)

Player Effects crash

This was seen in a network session with two players.
In a network session, only the local player has a valid PhysicsComponent, all other players have a NULL PhysicsComponent. It appears that effects are being applied to all players, and crashing trying to set the velocity of a NULL component.

GameObject::getPhysicsComponent(); Getting null pointer

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0xb4c89b70 (LWP 24898)]
0x08062a5c in td::PlayerTerrainSlowEffect::apply (this=0x856c950)
    at engine/EffectTypes.cpp:45
45      ((PlayerPhysicsComponent*)(unit_->getPhysicsComponent()))->setMaxVelocity(velocityChangeValue_);
(gdb) p unit_->physics_
$1 = (td::PhysicsComponent *) 0x0
(gdb) bt
#0  0x08062a5c in td::PlayerTerrainSlowEffect::apply (this=0x856c950)
    at engine/EffectTypes.cpp:45
#1  0x0806236d in td::Effect::update (this=0x856c950) at engine/Effect.cpp:45
#2  0x08088d86 in td::Effect::qt_metacall (this=0x856c950, 
    _c=QMetaObject::InvokeMetaMethod, _id=1, _a=0xb4c88b7c)
    at ../moc/moc_Effect.cpp:78
#3  0x08088ff8 in td::PlayerTerrainSlowEffect::qt_metacall (this=0x856c950, 
    _c=QMetaObject::InvokeMetaMethod, _id=6, _a=0xb4c88b7c)
    at ../moc/moc_EffectTypes.cpp:162

Game Server does not detect disconnections

(Reminder to myself)
The game server does not detect when a player has disconnected.

It should send a deletion message to all remaining players to remove that player from the game.
If there are no remaining players, the server thread should terminate gracefully.

Walking into walls

If you walk into a wall and try to redirect, you have to wait a bit for the velocity towards it to bleed off before you can move again. Same with walking at an angle along a wall. You'll occasionally jump along it, but mostly just get stuck there.

Removed unused Bounding Box classes

These aren't used anywhere (QPolygon is used instead), and since they are also largely unfinished they should be removed to prevent confusion.

NPC Waves Segfault

After the first NPC wave has spawned, closing the game causes a segfault.

Client Window does not grab focus

If I start the client, I need to click within the window before arrow keys have any effect.

When started from the terminal, the terminal window retains focus (evidenced by [[A [[C being printed when arrows are pressed).

This might not be an issue once we have a start menu that requires mouse interaction.

Player movement

If you are moving a player and tap the opposite direction while holding down the other key the player stops movement fully.

IE
Holding left key
Tap right Key

Player is stuck until either left key is released or right key is pushed again (although this has the same effect as the first time if you don't release the left key)

Run Time Error with Window

Get this error upon start of client:

X Error: BadWindow (invalid Window parameter) 3
Major opcode: 31 (X_GrabKeyboard)
Resource id: 0x0

Upon closing (pressing the x button) the client does not end.

Resources are not created by the ResManager

Resources are created in the Map class, which means they don't have the Driver as a parent, which leads to crashes if they ever call update().

Right now the call to update() is commented out, but ideally the resource initialization should be moved.

Map::initMap() only initializes one path of way-points

This is mostly a reminder for me (Tom).
We currently only initialize the 1st path layer in Map::initMap().
The code also seems to assume that paths are tied to a specific NPC type.
This will need to be reimplemented to allow for varying number of NPC paths which do not assume NPC type.

It looks like the script / NPCWave / NPCInputComponent::initWaypoints() code will need to be reviewed to make sure it is also compatible with this.

Multicast IP does not change

(Reminder to myself)
If two game servers are spawned, they have the same multicast IP. The IP should increment with each server spawned.

Context Menu fails to open with diagonal movement

If I run up+right and tap space repeatedly, the context menu opens as expected.

Any other combination of diagonals (up+left, down+left, down+right) seems to result in the menu not opening (tapping spacebar has no effect).

Pixmap Layers

We need the menu to open above all other images on the screen.

Currently it opens underneath the towers a NPC's

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.