Sunday, August 13, 2023

Remembering the Dreamcast

Spent some hours today investigating what it would take to develop a game for the Dreamcast.  How feasible that would be.  Seems like it's more work than it's worth.  I shall stick with Godot as my first real attempt at making a game.

Nevertheless, that got me in the mood to turn on my Dreamcast again and play some Sega Bass Fishing.  I've been trying to hunt down a Dreamcast fishing controller and remembered that I don't have Sega Marine fishing.  More on that later.  But when I booted up Bass Fishing I noticed that there were some severe slowdown issues.  I don't remember that being the case back in the day.  Also, it's been years since I last played this game, probably over a decade.  One real possibility is the game always ran like that.

I couldn't help but worry that this disk was having some kind of issue.  The game disk is more than 20 years old at this point.  That got me curious about burning Dreamcast games into CDRs.  A friend mentioned last week he used to do that.  I decided to look more into how that is done.  After a little bit of research, it turns out the process is surprisingly easy.

All you need is to download imgburn and a few extra files from their website and find a CDI image for the game you want.  I burned Sega Bass Fishing since I legally own a copy and made the disk.  It took about 7 minutes and I so excited to see if it would actually work.  The CD I used is from an old batch I bought like 15 years ago, so I had very little hope of this whole thing working.  And to my astonishment, it did work - at least initially - and I was thrilled.

I played the whole Arcade sequence, but I noticed that when the time would run out on the game, pressing Start took a while to load and it made the Dreamcast spin more than I would like.  My suspicion is the CD is not good enough for this thing to work like it should.

From there, I proceeded to finally order a GDEMU from AliExpress.  It's something I've been meaning to do for a while.  And I will be performing the mod in my OG Dreamcast which I bought on release day.  The console died in 2005 or so.  It stopped reading disks.  This project is one that I'm super excited to do as I would be able to have a backup of all my games.  Maybe I'll do a post about the process once the part arrives and the results.

Anyway, going back to Sega Marine fishing.  I looked at some playthroughs on Youtube and it looks somewhat worse than the original two Bass fishing games.  Like the graphics are off, and the fishing mechanic seems more rushed than the originals.  What I saw kind of made me hesitant to buy my own copy.

Thursday, August 10, 2023

Const QMap Reference in C++

So recently I was helping a co-worker with one of his stories and one of the architects suggested that he could benefit from using QMaps to solve the issue he was having.  I know my C++ and most times I can think what the compiler is doing behind the scenes but the following I had a fundamental misunderstanding about how references work.

#include <QCoreApplication>
#include <QMap>
#include <QDebug>

int main(int argc, char *argv[])
{
    QCoreApplication a(argc, argv);

    const QMap<int, int> three = {{0, 3}, {1, 3}, {2, 3}};
    const QMap<int, int> two = {{0, 2}, {1, 2}};
    const QMap<int, int> one = {{0, 1}};
    const QMap<int, int> &cur = three;

    cur = three; // compiler complains

    qDebug() << cur.size() << "\n";

    cur = two; // compiler complains

    qDebug() << cur.size() << "\n";

    cur = one; // compiler complains

    qDebug() << cur.size() << "\n";


    return a.exec();
}
As you can see above re-assigning the reference is not allowed.  I think after many years of working with the language there are times where I forget the fundamentals, but there is a little more happening here.
When you make QMap const you are saying that the copy constructor is not enabled.  This is what is actually happening in this case with the reference cur.  So how do you solve this problem?
Well one of the easiest ways is that if you must have some set of N constant maps then you can use a const pointer to QMap.  But then that adds the overhead that now you must ensure that pointer is not null, which is why I think my first approach to this problem my brain thought about was to use a reference.

Saturday, August 5, 2023

Years later

So blogs aren't really a thing anymore.  Most people stick with social media these days.  It's been years since I last posted anything here.  Life has changed quite a bit.  But I'm still much the same in terms of what I use to write here.  Still love video games, still continue working towards being a game developer someday.

It is interesting to read some of my old posts and seeing where I ended up.  Back then I was working as a software tester and wanted a software engineer job.  Now I have several engineering jobs under my belt.  I accomplished my goals of working with C++ and Qt.  These days I spend a lot of time teaching others how to program and design good software for embedded systems.

Back in the early 2010s I was very insecure about my programming skills.  Nowadays I realize that I have come a long way but there is still much to learn.  A lot of my proudest achievements over the past couple of years is leading others, motivating them to achieve their full potential, and seeing them grow in their careers.  I would like to think I have played a small but memorable role in their lives.

My hobbies have expanded considerably.  Have delved into comics, action figures, cycling, traveling, photography, guitar playing, board games, even learning Japanese as of late.  But one has remained constant, and that is videogames.

I have all the latest consoles, and even though I don't game as much as I did a decade ago, I still enjoy games immeasurably.  Some of my favorite games from the past few years have been: Hellblade, The Last of Us Part II, Stray, Dredge, Mortal Kombat 11, Super Marion Odyssey.  Not to mention countless others I played for a few hours and then dropped.

I guess I felt inspired to write another blog after not logging here for years.  Maybe 10 years from now I will have this to look back on.

Some goals for the future are to do the following:

  • Learn more design patterns
  • Learn Japanese
  • Make a few games with Godot
  • Learn QML
  • Play more games
  • Read most of Stephen King's books
  • Go fishing more often
  • Have fun and enjoy life!
  • Cherish the time I have with my family!
Thank you for stopping by.