Jump to content
  • Advertisement


  • Content Count

  • Joined

  • Last visited

Community Reputation

976 Good

About Hunter_Ex

  • Rank

Personal Information

  1. Hunter_Ex

    Fast GUI Rendering using Texture2DArray

    Thanks for the good comment.   Since I do not use the features of a volume texture and the fact that I get mipmaps on the texture array.   I have not made any in depth performance comparisons but hopefully the texture array does not perform worse than a volume texture when it comes to sampling from a single slice at a time.
  2. Hunter_Ex

    Fast GUI Rendering using Texture2DArray

    Freetyle? freestyle library? I did use Freetype2 to generate the glyph texture, did you mean some other library?
  3. Hunter_Ex

    Fast GUI Rendering using Texture2DArray

    I did this so that I could draw text and any textured object without having to change any shader parameters and cause another draw call. You can do the same thing with texture atlases and instancing but I opted for the texture array since it was simple to use and proved to be effective.   I very much agree with the font packing being a bit problematic, I will probably try distance fields or mipmaps later.    The restriction on size has not yet been a problem, I agree maybe a 100% texture atlas solution could be better, I am not 100% sure about the inner workings for the texture array on the GPU but sampling from a really big texture might cost more than from array slices.   Cheers and thanks for the comments
  4. Hunter_Ex

    Fast GUI Rendering using Texture2DArray

    Thanks for your input   Adding distance fields is something I am considering and it should be fairly straightforward to replace the current method.   The separation of logic and rendering is clearly separated in my UI system, I might have been unclear but it is supposed to work like this   -- once my_button = ui_button("button-id", "my label", onclick)   -- draw my_button:draw(x, y)   So the logic of the button is very much separated from the draw function and the draw function can be replaced with ease, though this article was more focused around rendering textured UI elements.
  5. Hunter_Ex

    Mono or Lua - Scripting

    I like Lua since the simple nature of it forces you to think carefully what to do with scripts and what to do with c/c++ for example. as mentioned Lua tables are very flexible and pretty fast so you can do a lot of crazy things with them.   In my current project I do all the per frame update stuff with c++ and Lua just take care of callbacks and define objects
  6. Does your PositionBehavior have a list of all Positions components? if so then it can update them without getting them from the object itself.   This is how I do my component updates.
  7. Hunter_Ex

    C++ Entity/Component System Setup Assistance

    A pointer to a template... of the name... it was instanced with. So it's variable name or not?   Yea that was kind of badly worded, what I meant is that each object in the scene was created using something like local inst = instance_create("ObjectName") -- where this could be an object ObjectName = { on_created = function(self) self:add_component("Transform") end }     So the object holds a pointer to an ObjectTemplate that has the string name and a connection to the Lua table.   My messaging system operates by components binding a callback to a message name on the object, whenever a component posts something the object calls all the other components that subscribed to that particular message. This is mostly used to hook stuff when components gets added or removed.
  8. Hunter_Ex

    C++ Entity/Component System Setup Assistance

    Yea that is the charm of the component/entity system, there is so many variations of it. My version integrates nicely with my lua implementation and allows me to do what I need, in the end the requirements you have on your engine/game will decide how sometime as important as the object management will be done.   You can also do really easy and slimmed component implementations, and actually I am using something similar to your technique Juliean when creating particle systems.
  9. Hunter_Ex

    C++ Entity/Component System Setup Assistance

    Hey taurusrow    I have been experimenting with component based object system now for a couple of years and the results have been getting better and better each time, currently I am actually streaming my current programming project live on http://www.twitch.tv/devmoon   I am using a very decoupled component/subsystem approach where each subsystem is completely independent and currently I have these systems but it will be more later Transform Physics Collision Timer Editable Render To answer your questions   An object consists of the following Unique ID Object name (a pointer to a template that keep tracks of the name it was instanced with) Array or component pointers Internal messaging system (being able to communicate with the components) A component consists of Pointer to the object its attached to (so it can communicate) Custom data its working on (position in the transform component etc..) Pointer to the subsystem A subsystem consists of A vector of components (that is pre allocated) Updates the components that have been used by any object   From my experience component based object systems is not some kind of "solve all your problems" but just another way to manage your game objects. You still need to craft it to fit your needs.   To update everything I have an ordered list of all my subsystems and call their update method   Here is also a script example of how it can be used (lua script)   sample_object = { on_created = function(self) self:add_component("Transform") self:add_component("Physics") self:add_component("Collision", {width = 10, height = 10}) self:add_component("Render") self:add_component("Editable") self:add_component("Timer", {[70] = instance_destroy}) end, on_collision_enter = function(self, other) if (other.solid) then instance_destroy(self) end end, -- if there is no render method there is no overhead of trying to call one on_render = function(self, x, y, z) -- some custom draw code here if needed end }     I do stream programming almost every day and you can ask me anything and I might make all the code available for public at a later date   Good luck with the component systems it is really fun to work with 
  10. Hunter_Ex

    Game Design Questions (low level-ish)

    Question 2   Just use a vector and you should be fine, one really simple trick in your case then is to flag destroyed objects as killed instead of removing them from the vector and then replace them when you create new ones instead of adding to the end   Question 3   Making use of DLL is not as easy as just changing the project options because you must make export functions and create interfaces if you want to use classes for example   Just keep everything in one project until you get a better idea of how you can separate the things in your game One project is gets you really far anyway just harder to make use of what you did in future projects but do not think too much about that.
  11. By using libs like (for example PhysicsFS) you can search and load the assets in the package as if they were in the filesystem, combine it with functions like CreateTextureFromMemory and you can just pass a pointer to a chunk of uncompressed memory for the texture that has been loaded from the package. There is many other similar working libs but i guess the inner workings is the same but some might use a more secure format other than ZIP.
  12. I get that you want to start at that end since you usually see progress faster but then when it comes to actually making the game you "usually" skips the crucial technical parts and just sprint for the fastest possible result. Thats atleast my experience. I see you want to use gamemaker (I used it a lot when it was in version 5 and 6), the biggest problem I can imagine with gamemaker are just keeping the structure with a growing game. I would probably start by creating scripts for networking tasks and syncing objects and testing those before even thinking of a lobby.
  13. Hunter_Ex

    Looking for a friend / tutor.

    Not a bad choice since game programming is great fun : ) I have been programming games for quite some time now and recently graduated from my university, and I really like to discuss anything programming related so just add me on skype (in my profile) if you wanna chat or have any questions.
  14. There is no such thing as a "Camera" so what you want to do is the following draw(x - camera.x, y - camera.y) // and everything you draw is treated this way even the background // then you adjust the camera to where the player xy is usually
  15. Hunter_Ex

    Painting pixels on 3D object

    It is very hard to give a single answer to this, since painting on objects can be done in many different ways. 1. Do you want the painted details to be painted on the objects directly? 2. Do you have a static scene and just want to paint on a texture in screen space and apply it to the scene? 3. Do you want to make decals and have them as separate objects? If case one then you could paint to a unique texture for each object and apply it using the same uv mapping while rendering, or paint to a second uv mapping. To do the real painting you can use compute shaders or you can set the object texture as render target and render a brush shaped image. glDrawPixel and glReadPixels are very slow operations, it is much better to do as above if you want paint in realtime.
  • Advertisement

Important Information

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

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!