Jump to content
  • Advertisement


  • Content count

  • Joined

  • Last visited

Community Reputation

899 Good

About mychii

Personal Information

  • Role
    Amateur / Hobbyist
  • Interests
  1. mychii

    How to avoid bugs

    In my opinion so far, make a code that is easy to understand, it will save yourself and others when the code gets bigger. Make enough informative comments to make sure you remember what you did so you (and others) know what it does. Bugs will be there, but nothing better than codes that everyone can understand to solve those bugs quickly. Secondly, always think ahead of what you write. If you put ++power for a character, think like, when should it be called? how does it added? does the owner of that variable already removed? is it called during attack animation callback? is there a network request failure that should cancel out ++power? etc. This usually comes with experience because you got to make something first to understand what you need and what's going on with your program. Then to make things easier, always test your code. Program yourself some unit testing (and any other kind of testing methods out there) to convince yourself with the code. In easy term, it's basically like a checklist before going on a trip. You'll face trouble on your trip if you're missing something no matter how small it is as long as it matters right? So you got to always do a proper checking on all items you have before going on a trip. 😃
  2. mychii

    Worst time of your life as an indie

    Worst time of your (my) life as an indie game dev (full-time): When I'm out of money, the world ends.
  3. Thanks for the "show don't tell" and the examples, Brad! I'll keep that in mind.
  4. Okay thanks Spectral!
  5. Hi guys, it's been a while since I last posted in this forum. I have a problem on doing a screenwriting for some scenes, the example is like this: ... Scene 6 EXT. CITY STREET – DAY At a junction of the city, strange-looking thunderous sphere appears. The cloud bends, nearby structures crack up, and dust floats. Some civilians breaking out, a few start taking pictures with a bit of fear. ... Scene 7 EXT. CITY STREET – DAY – CONTINUOUS ACTION (?) Unknown robots emerge within the sphere a little bit up in the air, crushing the ground as they land. They are at the size of cars. One of them is as huge as a truck, which seems to be the leader. With no hesitation, these robots start destroying everything, bringing more destruction and panic among humans who are still around. ... They happen on the same exact location, but expecting a different shot angle per scene for the direction later. My question is, do they have to be separated or should I technically combine them as one scene? If it should be combined, do I need to separate the location like this?
  6. I know the feeling of dissatisfaction upon the codes, the feeling of "is this right? would it be a problem later?". I usually remember that it's not about the code I'm doing, but the result. So I'll focus on the result. When things get slower or tangled, that's when I try to solve it. If it's about architecture, it has to be designed/thought up first and not during coding (whether it's the whole program or features), until I hit a real problem because of it. When I'm done, and the code that I worried about is actually not a problem, I'll confidently write it again in later time without hesitation. This is where colleagues can really help. For example in a project, you and I may face different code problem at the same time, but may have each other's problem in the future. We can correct this together without trying to solve it ourselves so we don't wander around asking ourselves whether this is okay or not. It could be just a simple confident booster to keep moving on sometimes.
  7. Agree with cozzie, it's general. I've worked in a few IT companies in the past. The first one let me work for 7 hours a day, 5 days a week. It's a small, family-oriented company. Then the 2nd one gave me a workload and deadline that implicitly forces me to work 12 - 16 hours a day, 6 days a week without overtime pay. (I quit right away 3 months later right before they give me a freaking legally bound 1 year "suicide" contract). The last one is 8 hours a day, 5 days a week. I can't work beyond that hour because they turn off the lighting and the cleaning service start cleaning the room, which annoys me a lot that I can't work at all (probably intended). The office is also closed at Saturday so there's no chance to get in there to work unless the big boss have some sort of event or extremely rare urgent matters. It really depends on which company you choose. I'm glad I had my first job that is quite sane. If I get to the 2nd company as my first job ever, I may think that's how I should work for my life.
  8. Recompile those external libraries with something like /Dmalloc MyMalloc / add a PCH that contains #define malloc MyMalloc / etc :)   On some platforms, there is an OS-level API that you can use to supply your own allocator which will be used internally by any calls to malloc/new. I haven't done iOS work, so I don't know if this is the case there. That's a nice idea, adding a PCH for malloc on each library! I'll try that first. :-) About the OS level API, where can I find them? I tried to search for such info in Google for either Android and Windows, but no luck. I probably don't get the right keywords yet.
  9. Hi guys.. So I'm at the point where memory management becomes quite a tedious and daunting task. I'm currently making a game for mobile device, and I allocate one big chunk with a hope all (most) memory allocation would strictly use that so I can track them while also limit the memory usage just to that chunk I take from a single malloc. Now the issue isn't how I handle that big chunk, but the libraries that use its own internal allocator, especially in C. For STL, globally replacing new and delete (and its array forms) works. Then Vulkan is almost the same as making custom allocator for STL container... and then here come other libraries like FreeType, sqlite3, and I don't know what else will come when I need them. Some of them are even harder to handle! My lazy brain starts to think to just let the memory usage grow instead of restricting them in one big chunk I allocated, it may seem to be not a bad idea it says... but then the issue is I am unable to track them, and again it grows. I'm not sure if my game can keep up in a phone with the memory suddenly being full when I need them during the game. I also may not be able to track them of which does that. What's your opinion to handle this situation? Do you soldier through replacing/creating custom allocators on these external libraries' allocator or just ignore them? ... or is it possible to replace global malloc/free? lol.
  10. mychii

    Rendering Text for GUI

    Thanks for the answers guys. I'll check on what you guys have suggested, starting from vstrakh's answer first. I forgot to mention that this isn't for Windows primarily, but for Android and iOS. Not to mention the iOS uses Metal and the Android is expected to have Vulkan optionally..reason why I don't bother saying what graphics API anymore as it's not the main issue.
  11. Hi guys, I'm not sure where to post this, but since I'm new to rendering text, so I post it here. I'm currently doing a job on rendering 2D text for UI from scratch using C++ and a graphics API. I have no idea on the workflow to render text. I also need to be able to render Japanese texts along with its kanji characters. The first thing that came up in my mind is, do I have to turn the font to image first so I can iterate the characters from the image? Is that the only way? I'm also worried on how to handle these thousands of kanjis, or should I just pick whichever I need... manually? Also, if I'm using texture fonts, then what about resolution? Would it be an issue? or should I just have it large and scale it down? Or is there other way? It's still hazy for me on this one. Cheers..
  12. mychii

    Merry Christmas!

    Merry Christmas. Got myself a family pizza. Lol.
  13. Cool, thanks for the attention Zipster. :-)
  14. mychii

    ECS design

    Have a checker that the component won't work if it's not accompanied with required components. I'm sure component has a reference to an entity it is "attached" to, so it won't be a problem to access or to check if dependent components are also with the entity. I think Unity does that but I forgot which; when you add / remove a component, it will tell you that it is depended by some components, etc (I think some even throw errors during runtime). This is inevitable.
  15. mychii

    ECS design

    Have your specific system to iterate the specific components instead of entities. For example, renderable components are rendered by a rendering system regardless of who the entities are, not rendering system searches for entities that have renderable components.
  • Advertisement

Important Information

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

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!