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 - JuDelCo

Pages: [1] 2 3 4
1
SFML projects / Re: Screenshot Thread
« on: July 25, 2016, 06:14:26 pm »
And i'm still interested, yes  :P

2
SFML projects / Re: Screenshot Thread
« on: February 28, 2016, 11:43:26 am »
Lovely billboards, you're using sfml to create the openGL context and the HUD isn't ?

3
SFML projects / Re: Screenshot Thread
« on: February 27, 2016, 02:42:50 pm »
A mushroom upside-down ? I see

4
SFML projects / Re: S2DEC: A entity component game engine in C++
« on: August 14, 2015, 08:53:02 pm »
Probably he refers to make entities and components behaviour-free, holding on them only data and "systems" will have all (seriously, ALL) the game logic.

Like in Artemis framework (for example): https://github.com/vinova/Artemis-Cpp

5
SFML projects / Re: Particle System!
« on: June 13, 2015, 08:54:04 pm »
Now with sprites, and shaders, that will raise the 4000 cap to heavens  8)

6
SFML projects / Re: Screenshot Thread
« on: March 27, 2015, 08:14:36 pm »
Well, most is done by Zach, but replicate the same behaviour isnt easy, first the multiple states a cell can be (hard to store in a plain array), and then the simulation itself, with its delays between transistors and so.

I'll be pleased if only you add the grid resize, "puzzles/levels" can be saved to a file to be loaded later and some kind of preconfigured input signal :P

And if you finish all those and you want to do more, maybe add more layers or interconnectivity between "levels" to share the outputs as inputs for the next one. But this is an extra xD

I'll be waiting for a thread, blog or whatever you post here. As I said, I'm most interested in the technnical part xD

7
Dammm.... okay I replaced all the lists (I had only 3, but okay), and replaced all weak_ptr by raw pointers (but still using shared_ptr to allow RAII and clear ownership).

There's a good replacement for the unordered_map containers (I use them a lot) ? Anyway I really dont think they are too bad in perfomance/memory ...

Btw ! I forgot to say that in my implementation I allow the creation of TWO or more components of the same type for an entity (thats why I use an unordered_map with a list [now a vector] of components for the second type). How would be in your bitset implementation ?

8
SFML projects / Re: Screenshot Thread
« on: March 20, 2015, 04:35:42 pm »
I am working on a clone of KOHCTPYKTOP; simulation is working but I have no clue where to go now.  :-\
(click to show/hide)

Can you give more info? Do you have a dedicated thread ? I always wanted to do a clone of that game (mainly because the limited space to do things in the original) and i'm very interested in follow any tech-thing about that project. A devblog maybe ?

9
Wtf, I thought my code had at least some optimization but okay....

Anyway, I'm focused in FINISH something, optimization can be done later ... I appreciate the comments though   ;D

I think the article you mean when said "std::list (which is highly not recommended by Bjarne itself)" is this one, so here is the link:   http://isocpp.org/blog/2014/06/stroustrup-lists

Maybe i'll optimize the std::function part ... I'm pretty sure they are slow

10
Instead the template trick you talk about (static getID with a counter++ for each class) I use this:

// In Entity class...
std::unordered_map<std::type_index, std::list<std::weak_ptr<Component>>> mComponentArray;

So the type_index can be retrieved doing:

std::typeid(T)

... in the template methods, for example:

template <typename T>
bool Entity::HasComponent() const
{
        if(mComponentArray.count(std::typeid(T)))
        {
                return (! mComponentArray.at(std::typeid(T)).empty());
        }

        return false;
}

--------------------

I store too a list in the EntityManager to get fast all entities which have a specific component attached:

// In EntityManager class ...
std::unordered_map<std::type_index, std::list<std::weak_ptr<Entity>>> mEntityComponentContainer;

template <typename T>
auto EntityManager::GetEntities() -> std::list<std::weak_ptr<Entity>>&
{
        if(EntityManager::HasEntities<T>())
        {
                return EntityManager::mInstance->mEntityComponentContainer.at(std::typeid(T));
        }

        return EntityManager::mInstance->mEntityComponentContainer[std::typeid(T)];
}

then it can be used for example with this:

template <typename T>
void EntityManager::ForEach(const function<void(std::weak_ptr<Entity>)> function)
{
        for(auto& iEntity : GetEntities<T>())
        {
                function(iEntity);
        }
}

11
SFML projects / Re: Screenshot Thread
« on: March 08, 2015, 09:29:55 pm »
Maybe it has to do with the fact Y is up in Unity but not in Blender (or so it seems from the screen).

Yes, Blender use right handed axis and Unity left handed axis (like my code), but I load the models without flip the X axis xD

I'll leave the discussion here, I dont want to add more offtopic in a screenshot thread xD

12
SFML projects / Re: Screenshot Thread
« on: March 08, 2015, 07:45:08 pm »
Sooo the white triangle has turned into this (RIGHT image)....

I'm learning slowly, but without stop   :P




Note how unity loads/render (wrong way?) the model BUT with flipped X axis, I put the unity/blender screenshot only for comment that... because is weird  :o ???

13
SFML projects / Re: Critters devlog
« on: February 27, 2015, 11:09:56 pm »
Being ogre, you're probably using his mesh own format (.xml+.mesh), isnt?

14
SFML projects / Re: Critters devlog
« on: February 20, 2015, 09:43:27 pm »
These devlogs are interesting  ;D 

You do all the modeling process as well as programming ?

15
SFML projects / Re: Critters devlog
« on: February 14, 2015, 01:26:08 pm »
Cool game populated by NOPE models  :'(

Pages: [1] 2 3 4
anything