Jump to content

  • Log In with Google      Sign In   
  • Create Account

Banner advertising on our site currently available from just $5!


1. Learn about the promo. 2. Sign up for GDNet+. 3. Set up your advert!


3DModelerMan

Member Since 23 Jan 2009
Offline Last Active Today, 09:01 AM

Topics I've Started

Live 2D Euclid

04 January 2015 - 08:18 AM

So I just saw this today http://www.siliconera.com/2015/01/02/live2d-euclid-gives-2d-anime-a-3d-body-to-swivel-in/ and I really like the results they've gotten. I've followed Live 2D for a while now, but I've only been able to figure out how something like their previous versions would work. I've always wanted to write a rendering engine like the new Live 2D Euclid, but whereas it was pretty easy to figure out what they were doing with the old version (basically just a bunch of textured planes and skewing), I can't figure out how the heck they're doing this new version. Anyone got any ideas how they might be pulling this off?


Serializing individual entities

14 December 2014 - 05:30 PM

So, I've ran into another snag with my entity system. I've started building one based somewhat on this article. It's working great, the performance is amazing, and the extra flexibility I get in implementing systems is something I like a lot more than my old Unity style game object system. The one thing I'm struggling with though, is serialization. I have the component data managed entirely by the ComponentManager, so it stores it in whatever layout it prefers and then handles saving all of the data or loading all of the data. It works fine for saving/loading entire scenes, because I can just dump all the data into a file. I'd like to be able to define spawnable prefab entities though, and it doesn't handle that well. My first idea was to have a serializeEntity method that would take the EntityID and serialize the component data for just one entity, but that's yet another virtual function that has to be implemented when writing a new type of system. What are the best methods for implementing prefab resources within an entity system like this? Should I maybe take a step back and treat it like a DirectX vertex layout and require that systems define an interface to access component data as a struct? Or maybe are there any sort of reflection techniques that I might want to be aware of?


Building bgfx in Visual Studio

11 December 2014 - 07:47 PM

I'm trying to build the bgfx library in Visual Studio, but I'm kind of lost. I downloaded premake and put premake4.exe in the scripts directory and ran it with bgfx.lua, but it never does anything. It just says

Building configurations...
Running action 'vs2008'...
Done.

It never generates project files or anything. Are there any tutorials available for building bgfx in Visual Studio? Or is there anyone who's gotten it to work? I tried using the gnu tools first, but it kept saying that devenv was not recognized. And do I have to build bx first or something too?

 


Improving component system

29 November 2014 - 10:54 AM

I'm working on upgrading my component based entity system. Right now I have a hierarchy of Entity objects within a Scene (which is itself just a special Entity). Each Entity has components that implement a Component interface that are basically a collection of callbacks. Components have onAttach, onUpdate, onDetach, etc. callback functions that are called when these events happen. The problem here though, is that I've got a really random memory access pattern by traversing through the hierarchy every frame and calling into each component. What I would like is to have a more linear memory access pattern where all components of the same type are updated together all at once.

 

I tried making it so my Component classes were just structures of data, and have a System that actually implemented the functionality. The problem with that though is actually tracking components. Should I require that when an Entity is created it will have a pointer to some sort of "SystemManager" that it can notify when Components are attached or detached? And if I do that, then how would I be able to retain support for my features like disabling entities and all their children? I can't just check the owner Entity of the Component to see if it's disabled, because that would throw another random memory access back in, and it would create more work when I have to traverse the hierarchy upward until the root to see if any parents are disabled.

 

Basically, all I want to do is be able to make my memory accesses more linear to improve cache performance while retaining my features (mainly creating a Scene in memory without setting it as active; and being able to disable an object and all its children). I don't care if I have to separate functionality from components, in fact I'd prefer to do so because of the extra opportunities for parallelism it presents in the future.


Implementing bitwise not operation with only or and and?

18 November 2014 - 02:26 PM

So I've come across a homework problem for an assembly language/computer architecture class I'm taking that really has me stumped... There's a question asking how to implement the not operation using only or operations and and operations. There were some similar problems where I had to implement or with only and and not operations, and there was one to implement and with only not and or. What I can't figure out, though is how I'm supposed to implement not with only and and or. Is it even possible to do so? I'm starting to wonder if this is a trick question.


PARTNERS