Home Forums General Discussion Programming session video

Viewing 15 posts - 1 through 15 (of 15 total)
  • Author
    Posts
  • #247

    From the latest post on the homepage…

    PS. I'm thinking about recording a video of a short programming session, showing how I work with the pretty big and complex C++ codebase, hopefully with some tips and good advice. Is anyone interested?

    Yes, I'm absolutely interested in this. A little bit of background about me…

    I am an audio systems engineer and I do a lot of system design work. This involves circuit design, PCB layout, 8-bit/32-bit microcontroller firmware coding (typically 8051 assembly or C), USB integration, and graphical user interface design (typically C# .NET), among other things. I'm even getting started on iOS and Android development to have smartphone interfaces to the hardware I build. So, I'm no stranger to coding.

    However, when it comes to game programming, I typically use a canned solution like GameMaker or Unity. In those engines, you are basically scripting on top of an existing framework and you're not really doing the low-level stuff yourself. So, a lot of the basic stuff is abstracted away from what you're doing.

    I've always been curious about seeing a developer in action when they're working on a C++ program that they've coded from the ground up. I know that there are a lot of open source projects out there, but I never know what compiler or IDE to get and how to get all of that stuff set up… and when I browse the source code of open source games, I usually have a really hard time navigating to anything I can make sense of. Even though I understand programming just fine, I have a lot of trouble diving into somebody else's code and figuring out how it is structured.

    So, yeah, I might be the only one… but I would be very interested to see you just do a screen capture of some development and watch you work. This sort of format would interest me:

    • Basic overview of the IDE and what compiler you're using, as well as any external libraries
    • Quick description of how the codebase is structured and what is contained in the different source files
    • Start coding and implement a feature or two
    • Compile the code, run it, maybe show some debugging features…
    • Build the executable

    Anyway, that would really interest me. I imagine you could just grab Open Broadcaster Software or some other free screen capture program and just set it up to capture your whole screen, and then just do what you normally do… code! Maybe just with a little bit of commentary, haha.

    Hopefully there are some other programming nerds out there who will post here and convince you that it would be a good idea.  😉

    #894
    miki151
    Participant

    Ok, I'll do it then, just need to order a good microphone. I'm not sure how it will work out, cause I'm terrible at speaking, even in my native language.

    Somebody else's code i always hard to figure out, and KeeperRL's especially, given its complexity and lack of comments. I'll try to pick an easier section for the video or maybe just create a new class or something. I will mostly focus on how I try to work efficiently with a decently sized c++ project, so as you said IDE, compiling, code completion, etc. I'll also make a few comments on how c++ is working out for me. In my last job (at Google) I used Java for 2 years so I have a good comparison (and I'm absolutely non-religious about languages).

    #897

    I'm terrible at speaking, even in my native language.

    No problem! Are you Polish, by the way? I'm just guessing based on your last name.

    I am from the US, but I lived in Berlin for a while as a student. While I was living in Germany, I went over the border to visit Wroclaw, Poland. It is a nice city! That's my only experience in Poland, though.

    #895
    miki151
    Participant

    Yes, I'm Polish. Wrocław is probably the nicest city in Poland, I'm going there next weekend actually.

    #896

    Great! 🙂 Well, I'm looking forward to any video(s) you put out. I really enjoy watching developers in action!

    Don't worry about commentary if you don't want to do that. Just do whatever you feel comfortable with!

    #898
    miki151
    Participant

    Here it is. https://www.youtube.com/watch?v=5eUVp1mDwCU

    Let me know if there is anything missing, I'll include it the next time I make such a video.

    #899
    mik
    Participant

    Very cool to see a dev at work!
    How do you make your design decisions? Just write code and everything is fine or do you use helpers outside of your head (like pen an d paper, UML tools etc.)?

    #900
    miki151
    Participant

    For source code design? Just in my head. If it's a difficult problem then I think about it for some time, write the code and refine it until it's good. The last step is always reviewing the diff, I always spot things to correct there.

    If I can't find a perfect solution then I just go with what I have, and worry about refactoring later. (see https://twitter.com/keeperRL/status/539079945537200128)

    #901
    mik
    Participant

    Interesting. How do you make sure that you don't break anything during refactoring? Do you use unit tests or do you know your code so well that no mistakes can happen?

    #902
    miki151
    Participant

    One kind of test that I do involves playing one game while recording the whole user input, then after making the change replaying it using that input. If it plays the same then most likely the change didn't break anything. It also lets me compare run time if I do optimizations.

    I described this technique in an article on the homepage a while back, it's very very useful.

    #903
    mik
    Participant

    Ah, I remember that article. But your description of that technique was quite terse. I don't understand how this can be used as an automated test when there are random events during the game. So even if all user inputs are the same, the outcome would be different. Or are the random events recorded as well?

    #904
    miki151
    Participant

    No, not the events, but the random seed. After that everything is deterministic, at least on the same machine.

    #905

    miki, I just started watching the video. It's great! Thanks for taking the time to do this. I'll post back here if I have any questions after watching the full video.  😉

    #906

    Great video! It was entertaining and interesting to watch. Very fun!

    I tried to read the code while you were explaining things, and I understood most of it, but there are definitely some features of C++ that don't exist in C or C#, so I'm not familiar with them. Funny enough, I do all of my firmware coding in C, not C++, and my computer-based software is normally in C#, so C++ is kind of unknown territory for me. It's probably pretty rare to meet somebody who knows C and C# but not C++, but yeah, I'm that guy.

    Anyway, I really enjoyed it. Looks like you already have 600+ views on YouTube, so I guess I'm not the only one who enjoyed it. I hope you do more videos in the future – I'm looking forward to them.

    Thanks!

    #907
    miki151
    Participant

    How I wish that I could make this game in a language like C#  😀

Viewing 15 posts - 1 through 15 (of 15 total)
  • You must be logged in to reply to this topic.