Jump to content
  • Advertisement
Sign in to follow this  
  • entries
    686
  • comments
    1952
  • views
    387777
Sign in to follow this  


8 Comments


Recommended Comments



I am bizarrely motivated to go learn how to punt rocks and make them explode in glorious balls of flame.

Share this comment


Link to comment
Unrelated to the topic but I noticed your code below..

Do you know much about the STL Stompy? If not I would seriously suggest you take a bit of time to learn about std::vector as you'll find a billion places to use it. The same is true for std::map.

You'll stop using arrays for a lot of things. For instance your state stack can be implemented using a vector (although there are better containers to use the vector will be easiest to get to grips with)

std::vector<state> States;

Share this comment


Link to comment
Quote:
Original post by Metorical
Unrelated to the topic but I noticed your code below..

Do you know much about the STL Stompy? If not I would seriously suggest you take a bit of time to learn about std::vector as you'll find a billion places to use it. The same is true for std::map.

You'll stop using arrays for a lot of things. For instance your state stack can be implemented using a vector (although there are better containers to use the vector will be easiest to get to grips with)

std::vector<state> States;


The last entry is C# code, so I don't really know the different libraries yet. That was code from my 4E5 entry.

However, the code for Stompy's Revenge uses the STL almost everywhere. All the enemies are stored in a vector, the states are stored in a std::map. As a C++ programmer, I use it alot, but hopefully I can find the equivelent C# libraries.

Share this comment


Link to comment
C# has a templated class named LinkedList<> (.NET 2.0 only I believe). But it doesn't have an index accessor; other than that it's pretty useful.

Edit: They also have a growable array of some sort.
Edit: Looks like the growable array is List<>.

Share this comment


Link to comment
It's like bad porn without the incentive to actually watch... and they're making a sequel. o_O

Share this comment


Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!