Coming soon - Get a detailed view of why an account is flagged as spam!
view details

This post has been de-listed

It is no longer included in search results and normal feeds (front page, hot posts, subreddit posts, etc). It remains visible only via the author's post history.

9
I've created a [C++] container that can be used for layering items/characters on a Roguelike map!
Post Body

Here it is

One problem I've had getting started with roguelikes is coming up with a decent, flexible data structure that can be used to store the locations of characters/items/objects.

My container allows for many objects to exist at one cell, and has relatively quick lookup speed by cell, and log(n) lookup speed by objects. (EDIT: After some suggestions, I believe it now runs in O(1) time for all operations!)

Would love it if anyone could critique or provide suggestions!

This is quite a small project of course, but lately I've been trying to work on small, polished projects rather than huge projects that I never finish. I figure if I start small, I'll eventually be able to make a full game that I'm happy with! Doing things this way means I also get to see something through to the end and make sure I'm happy with the quality of it before continuing. It also encourages me to really make sure something works well before continuing onto something new, hopefully meaning less design problems later.

Author
Account Strength
100%
Account Age
12 years
Verified Email
Yes
Verified Flair
No
Total Karma
25,351
Link Karma
7,431
Comment Karma
17,850
Profile updated: 1 day ago
Posts updated: 11 hours ago

Subreddit

Post Details

We try to extract some basic information from the post title. This is not always successful or accurate, please use your best judgement and compare these values to the post title and body for confirmation.
Posted
7 years ago