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

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Mrremrem

Pages: [1]
1
SFML projects / Re: OpenVillage Game Engine
« on: June 11, 2024, 08:10:35 pm »
Hey y'all,

My bad for not updating much. I've been feeling pretty bad with my mentals atm, and I don't know when I'll continue. Honestly I don't know what WoW carry is or its services, but I appreciate y'all taking a look at my project.

Best,

2
SFML projects / Re: OpenVillage Game Engine
« on: November 27, 2023, 09:54:46 pm »
I've reviewed your project, you're great!!! keep going and you'll achieve the desired result! 8)

Thank you!!! I'll definitely work on it during break and continue my journey on how game engines work!!!




Also, based on your account age, I have a feeling you know me really well too ;)

3
SFML projects / OpenVillage Game Engine
« on: November 26, 2023, 05:36:25 am »


Howdy!

I'm thrilled to introduce my tile based game engine, OpenVillage, a project I've been working on for quite a while now! OpenVillage encompasses a range of innovative features, including robust data structures for seamless entity handling, captivating sprite animations, and more.


It's definitely still a work in progress, like properly handling collisions (I'm currently working on it, I'm going back to school next week but I'll jump back as soon as possible!), refining little things that can help make games spark like textboxes (which works, but I really want to add in more customization options like next animations). Oh, and documentation is underway, with comments sprinkled throughout (more on the way, I promise!).

Anyways, I'm getting ready to leave home tomorrow! I'll see y'all soon!

Edit: Gahh forgot my Github link: https://github.com/Mrremrem/OpenVillage/

4
General / Re: Rendering a map (effectively)
« on: May 31, 2023, 08:47:06 pm »
A vector of maps of vectors seems a bit crazy but if it's working fine, the method should be fine.

One thing you can do to reduce "layers of grids" is to store them all in one place and then sort them to draw them in the correct order.
To do this, you'd first need to add a z (or depth) value to each tile. Then, to avoid sorting the actual vector, create a duplicate vector of pointers to each member of the original vector and sort those pointers based on the z value of what they are pointing to. You can also do this with a vector of indices instead of pointers. Remember to fill the 'sortable vector' with initial values. For a pointer vector, a pointer to each tile. For an index vector, a index to each tile (basically an increasing value from 0).

Co-incidentally, I've just applied one of these methods (the index version) to something to sort 3D shapes in one vector.
See it here (but this branch might not last forever):
https://github.com/Hapaxia/SelbaWard/blob/starfield3d/src/SelbaWard/Starfield3d.cpp#L253-L257
(click to show/hide)

Thanks for the response.

I see what you're saying. So essentially I have to add in some value that represents a layer (like Z axis) and sort them accordingly with another vector (of pointers/ints), which is similar to a priority queue! And if I'm imagining correctly, I only need one loop to render each tile!

Thank you!!!

5
General / Rendering a map (effectively)
« on: May 30, 2023, 01:33:22 am »
Howdy!

Apologies if this isn't the right place to ask (I was debating with either General or Graphics but chose this :P). Anyway, at first I was rendering my map with a simple vector but I wanted to extend this further. I wanted to have layers that can be rendered in the order they are in (floor first, player next, anything above player goes after etc.) so I extended this with a 2D vector of layers with tiles. No problem. Most of the time (at least in my vision) there's going to be less tiles for every layer added. So the worst case being every layer filled with tiles is unlikely. However, I want to extend this with an unordered_map. The reason for this is because I have an entity base class that every tile and player derives. If I were to keep a 2D vector then finding a certain entity would take O(N) (let's say, Player 3). However, using a map I can find "Player" and find the second player in however many players there are (in this case 3). But, if I were to render everything, I would get something like this:

Code: [Select]
// The container:
// std::vector<std::unordered_map<std::string, std::vector<Entity*> > > entityLayerList;

for (auto& layerIndex : entityLayerList) {
        for (auto& entityList : layerIndex) {
            for (Entity* entityIndex : entityList.second) {
               
            }
        }
    }

Which scares me because this is way too many loops. Is there a better way to deal this? Should I go back to a 2D array and figure out ways to properly cast from entities to their own objects? Any feedback would be appreciated!

Pages: [1]
anything