Bleys

Members
  • Content count

    26
  • Joined

  • Last visited

Community Reputation

176 Neutral

About Bleys

  • Rank
    Member

Personal Information

  • Interests
    Programming

Social

  • Github
    iboB
  1. There's a C++ library I'm developing and while it's not specifically targeted at games, all projects that I know of which use it are games. It's called DynaMix. In short it allows you to compose and modify polymorphic objects at run time. This has proven to be rather useful in gameplay programming. Compared to more traditional ways to write gameplay, like scripting, it has some benefits (well, and some drawbacks). It's C++ so it usually is at least a bit faster (and in the cases that I know of a lot faster) and less power consuming than scripts You can reduce code complexity when you don't have a C++<->scripting language binding layer. You can reuse utility code between the core and gameplay subsystems (instead of having to rewrite it in the scripting language. Hotswapping is supported relatively easily achievable Still, it's C++ so I guess it's a bit harder to write, and impossible to delegate to game-designers and other non-programmers Because of this it has found a niche of sorts in mobile games, where the benefits from the performance and smaller power consumption outweigh the fact that the gameplay code is strictly programmer country (whereas desktop/console developers, might be less willing to pay this price) The repository is here: https://github.com/iboB/dynamix The docs are here: https://ibob.github.io/dynamix/ I have written about it before back when it used to be called Boost.Mixin. I have since rebranded it and removed the dependency on Boost. Recently I released a new version and I'm using this as an opportunity to gather more feedback and, perhaps, maybe new users. So, any comments and questions are welcome
  2. There is a library that gives you such duck typing in C++ allowing you to have a middle ground decision if you don't want to sacrifice the performance when you use a scripting language. The library is made for the Boost collection, but it's not a part of it yet. It's pending review. Docs link: http://ibob.github.io/boost.mixin/ Source link: https://github.com/iboB/boost.mixin
  3. I am working, along with 3 other programmers, on a closed source project - a 2d tactics mobile game that's still under development - with it and, having met no problems using it (performance or design), it has proved useful many times in defining the game's logic. The code is clean and readable. Making changes (even rare big ones) is easy and concentrated, and one of the main bonuses is that you can very easily temporarily disable or change entire parts of the game for testing. For example having all attacks deal 1 damage is literally 1 line of code with 1 file being recompiled after the change. This is useful when you only want to see the visualization of the attacks and not worry about units dying. Disabling the graphics is, again, 1 line of code. The battle simulation tool, which simulates many battles with no visualization for balancing purposes, is the game executable with a special command line parameter.  Adding a new type of unit is really easy. The game wasn't supposed to have flying units, but when it was decided that we need to add such, it took 1 programmer only a couple of hours to add them (and this was relatively late in the development). Having the functionality that concerns one feature to be concentrated in one physical location in the code is really helpful, and the library makes this very easy.  As a whole, we're quite happy with Boost.Mixin. I intend to create a simple open source RPG game when I have more time (probably after June this year) mainly to serve as a demo project for the library (and with less focus in the art, story-line and balance). As for what the boost people think of it, I'm not sure. Most of the feedback I've had so far has been positive. But it's been, surprisingly, very little.  I've had 6 people respond to my boost mailing lists posts with positive initial impressions. Throughout various forums including this one I've had about 10 other people with feedback with only two who had a negative one, including yours. I had a presentation of the library in Bulgaria on Open Fest 2013 (November), and the response from the audience has been positive. I have some early adopters who use it in some pet projects and who, for now, seem to be satisfied. Also, as you can see, it has more than 20 stars in GitHub. Still most people just ignore it, it seems. Compared with other new libraries and ideas in the Boost mailing list, this one is fairing rather poorly in the quantity of comments, but fantastically in comment quality as there are no negative ones. Quite strange actually  
  4. Er, the language doesn't do runtime type composition or mutation. The CRTP type type composition is static and doesn't give you polymorphism on its own.  The runtime cost Boost.Mixin adds can only matter in very performance intensive scenarios which would suffer from any type of polymorphism. The fact that the a use case in the library is a couple of nanoseconds slower than a similar case with virtual calls or std::function, is negligible.  It solves the classic composition vs inheritance problem with none of their shortcomings - like coupling and excessive dependencies, combinatorial explosion of types, multiple points for change. Internally instead of keeping the object type information stored per object, it has type info instances that the objects point to. In huge systems, the memory saved by such an approach may be significant.  It doesn't bind the concept of interface to a class, allowing you to have classes that are responsible for multiple interfaces, parts of an interface, or parts of multiple interfaces.  It allows you to very easily create optional dynamic library plugins for your software that change the behavior of your objects.  I also gives you multicast messages, which is a whole new way of thinking about polymorphism. It is a bit like signals, but it's per object. An example of a multicast message could be something like getRenderingParts. A function the engine calls after it has determined which objects are to be rendered in this frame. In most objects this message would be handled by Model (static geometry), AnimatedModel, and such. Now there comes the moment where you need to add quests and some characters need to visually indicate that they are quest givers. With this multicast message we have no problems. We introduce the mixins QuestGiver or InteractiveObject and they start supplying the rendering system with the appropriate data. Then we need to create auras or buff/debuff indications. Again, no problem. We add a mixin called RPGEffects to an object that can have such, and it seamlessly continues to work appropriately. It gives you mutation rules - which can be used to "translate" a type into another type. This may be beneficial if you have a client-server architecture, where the objects exist in parallel. With a mutation rule, you can easily translate a client type to a server type (removing rendering mixins, adding database storage ones) and vice versa.  
  5. Hi, I'm still gathering interest, comments, questions, suggestions and reviews for a library I'm developing. It basically allows you dynamic type composition and mutation in C++. It's called Boost.Mixin (it's for boost, but not part of boost yet) and it's vaguely similar to Ruby's mixins. Code is here: https://github.com/iboB/boost.mixin Docs are here: http://ibob.github.io/boost.mixin/ There has been a forum topic on the subject before here but it failed to generate much interest. Hopefully I'll get more this time :)
  6. My mixin library

    Well I revamped the introduction part of the documentation and added two tutorials (more to come). Hopefully it's clearer now.
  7. My mixin library

    Well, to be honest I'm not satisfied with the documentation (the part that's complete by now) and I think it doesn't help people understand what the library is about. I'll be working on an entire doc revamp, and then try gathering interest again. Also, thanks for the link!
  8. My mixin library

    Honestly, I thought this was going to attract more interest  Anyway, I'll try the spam again after more of the documentation is done 
  9. Well something like this should work:   bool useDataFromNowOn = false; while(!feof(fp)) { int ch = fgetc(fp); if(useDataFromNowOn) { ... do something with ch } if(ch == '*') { useDataFromNowOn = true; } }
  10. I don't really understand what the problem is.  You can read byte by byte and check for the asterisk, and continue reading and storing data. If you want faster performance, you could read the file in chunks or the entire file at once.
  11. I'm developing a library that allows you to have C++ mixins (vaguely similar to Ruby's mixins or the traits in Smalltalk's dialect Self and not to be confused with CRTP mixins).   It's not strictly about game development, but it can be treated as an alternative to an entity-component system, which is very useful for games with fairly complex objects (RPG's, Strategies).   The library has a lot of working and a lot of planned features, but for now I'm focusing on the documentation (which is pretty thin). I don't intend to add any of the planned features until I submit it to Boost.  Anyway I'd be happy to hear any comments, suggestions, and questions you might have. Here's the link: https://github.com/iboB/boost.mixin (the name is Boost.Mixin, because I want to submit it to the Boost libraries for inclusion, but it's not part of them yet)
  12. [4e6] Ethics

    Thank you all. I'll post info about my entry as soon as I have something more than the rough sketches in my head, and I will comment on other entries, too. Good luck to everybody!
  13. [4e6] Ethics

    I intend to participate in 4e6. I have a few questions, though. They aren't covered by the rules, since they're more ethical than obligatory. I still haven't gotten into the spirit of the competition, and I thought they deserve to be asked. Maybe it'll help some other newbies. So, Should I post info about my game idea here? Such as genre, graphics details, mechanics, how I intend to fit the elements into the game. If I do, will somebody steal my ideas? Ofcourse this cannot be answered with certainty, but genrally what people participate in this. Also, I'm well aware that more than one man can think of the same thing, so sometimes, something might look stolen but not be. In short, are people, in general, who participate honest? Should I comment on other games when they're submitted, or even when they're still WIP, and just shared in the manner described before? Should I expect some constructive criticisms or comments about my game, when I submit/share it? These are to, basically, guide me through the whole contest. I would either be active in the community, or just make my entry, submit it, and wait for the results. Hope you don't get me wrong.