• Content count

  • Joined

  • Last visited

  • Days Won


Alberth last won the day on June 23

Alberth had the most liked content!

Community Reputation

9444 Excellent

1 Follower

About Alberth

  • Rank
  1. C++

    Nowadays, C++ compilers seem pretty much ok with having implementations only for code that you actually use. My g++ happily compiles plain classes that have unused method declarations without any implementation. In the past it would throw "invalid v-table" errors during linking. My guess is that your test-case doesn't use all functionality, and only hits the error when you access a method that uses the deleted functionality.
  2. C++

    std::vector is resizable, which means it needs to be able to copy its data to a new location if it runs out of space, wouldn't it? Not sure how you can store non-copiable elements in it, my guess is not. Resizability also means the actual vector data is not the container<> object, as far as I kcan see. If the actual vector data was in the container<> object, it could move if you add an element and it needs resizing, and the STL API doesn't say anything about that. Therefore, your allocation is perhaps not even allocating what you think you're allocating? Instead of fighting the STL, why not make your own wrapper class around a new-ed T[] array? That would be much simpler to get working, I suspect.
  3. Conceptually, I'd say the model contains button state, or provide values for them, if you can derive them from other data in the model. If their state cannit be derived fully, then yes, the controller should provide any missing data values such that the viewer can reflect that in the display. If the controller is bad, then I'd suggest to clean it up first. It takes some time, but in my experience it pays for itself. Making further changes in the controller is easier, faster, and with less errors.
  4. A game maker forum could perhaps help you. Also, you may want to skip this for now, take one of the options you're given at this point, and move forward. If you like programming, this won't be the last game you make, and there are likely bigger problems than how to arrive at a battle. In the general sense, pre-made software has limitations in what you can change. If you could change anything, you're back at a regular programming language, thus defeating the idea of being easier to program than using a regular language. Your question could have a solution (I honestly don't know), but at some point you'll find things truly aren't possible.
  5. We can't really tell you or we wouldn't be here, as Tom said. Secondly, what works for you is personal, and we don't know your preferences or desires or likes and dis-likes. I'd suggest think for yourself (and write down honestly) what you like, your strong and weak points, and go from there. Maybe a closer friend can give you insights? Other options would be some form of career counseling.
  6. Various comments typed in your code, so if you apply the patch, make a branch first so it doesn't mess up the code Despite being called ".diff", it's a plain text-file you can open it with any text editor. In all, it looks nice! comments.diff Edit: Link to another post with references to the timestep solution
  7. It's a totally different technique than 2D drawing so you may not like it, but in the projects I was involved in with isometric view, artists draw their work in a 3D modeler, and then convert to 2D bitmaps in automagic post-processing.
  8. A bit of self-advertising but maybe my state machine article can inspire you
  9. The game world is much more pushing against the limits of a computer system, high frame-rate (16ms to do "everything"), complicated algorithms, big worlds, believable realistic environment all push in that direction. At mobile systems, reduced computer power is added. The embedded systems world has the real-time requirements (a little harder, often), but often less complicated algorithms, or less massive (simulating 2000 enemy soldiers isn't needed ). Any user-interactive program responds in matters of whole seconds, which is eons in computer terms. In the latter the cost of developing everything dedicated to that program is not worth the benefit, faster response time isn't needed enough. In the game world, optimizing stuff to death is required to stay ahead of the competition, since that one killer feature makes or breaks the game sales. To get that, you write a fully dedicated program carefully tuned against the processor strong and weak points, exploiting the L1, L2 caches, etc.
  10. I see pathfinders as a general subroutine, a function where you can ask for a path. The returned path is then handled by the object that wants to move.
  11. It has more problems even without smart AI, there are lots of autonomous concurrent movement going on, and stuff like path-finding, it's a difficult genre to program. What we usually suggest to beginning programmers are games like pong, tetris, space-invaders. Much easier to program, yet plenty of challenge to get it all done. Maybe your son should start even simpler, with hangman, fifteen puzzle, 2048. Don't aim for the high-end until your son can handle it. So who is programming here? Dad or Son? Why does it have to be "new"? Right, a 12-year old doing networking and servers, piggy-backing over jabber. Sure, tbh I'll believe it when I see it. If you want to program games too, that's fine, by all means go for it, it's fun! Programmable RTS by Jabber sounds like a fun project even if it was already done. However I think it's a bad idea to apply your capabilities and your standards onto your Son. Give him room to do things his way and let him make his own choices, be an enabler, be a guide, be a supporter, even if the result is not what you expect. He isn't anywhere near an RTS, I think. Also, whose standards are speaking here? Objectively, no doubt you are correct. I suck at graphics too. Truth is, getting good at graphics is as much work as learning to program, and I never spend the time. The question is, does it matter? If you aim for selling the game, yes it does. If you aim for a 12-year old doing random programming and having fun, exploring the world, and finding his way around challenges, it does not, imho. Let him find a solution for it. Maybe he'll draw something. Maybe he grabs something from somewhere, maybe he gets inspired in pixel drawing. Whatever it is, it works for him, be happy for him. If stuff looks like it's going to be serious, buy him some art for his birthday or so.
  12. I meant something else. I once tried to solve this same problem (in a more restrictive form than what you seem to need), and spend a day convincing git to give me the information and looking at prior art. I looked up what the end-result was again, and ended with Trying that on a random git repository: $ git describe fatal: No annotated tags can describe '77553282f0d267032025955f9072e05cb109cfc6'. However, there were unannotated tags: try --tags. $ git describe --tags v0.60-208-g7755328 which is something like 208 commits after "0.60", which sounds fair enough. I think I made a few more changes to get a good result, but as usual, git has a zillion options for everything.
  13. Why don't you let him program by himself? Python is a good language, it has a friendly community, dad knows the language, and there is pygame, a simple SDL layer for displaying graphics, and play sound, etc. Another option is Scratch, which is totally kids oriented. I browsed the site once, and was amazed at its size, but that's about all I know about it. Give him some tools, and let him play and explore. Dad can learn too, before long he'll tell you how to do things :)
  14. git itself also has some features to name an arbitrary commit, which may be useful. I think it's "git id", but not sure, and I can't easily look it up. I am not so sure your "2" makes sense, for branches, you definitely want a branchname in there, since 1.2.3.abcdf has no meaning at all to understand what branch the build contains. Given your environment, you may want to only worry about official builds, and allow anything sufficiently unique for unofficial builds. In my experience, the primary profit of a VCS it is that you don't need to copy changes back and forth between developers. Secondary benefits are that you have a list of changes since the last commit nearby, and it's easy to revert to that last state, so random experiments in debugging or trying something unknown are safe. Unfortunately, git pushes you in the distributed development model, which is not always as useful as they claim.
  15. Oh, you have active code that you want/need to save. Hmm, I have seen that in CorsixTH, where almost literally all Lua data is saved by traversing the links. The function code itself doesn't get saved, only an unique name, so it can be re-connected upon load. It works, but that's about all you can say about in my opinion. Changing anything is a nightmare, as values of variables get attached to their name, so if you rename a variable and load an old save, it crashes. If you add new variables, it crashes. If you never want to modify your game, and still be able to load old saves, the above is no concern of course. The other option is to attach a "save" and "load" interface to an action. If you save a running action, you query for the data that you must save (and the name of the action of course). When you load, you load the saved data, and recreate the action from it. I don't know how relevant save at any time is for you, but the simpler option is perhaps only to save at a point where there are no such actions that you must rescue.