MFGG Forums
  • Home
  • Members
  • Help
  • Search
MFGG Main Site MFGG Forums MFGG Developer Discussion v
1 2 3 4 5 … 16 Next »
C++ exception handling
MFGG Forums MFGG Developer Discussion v
1 2 3 4 5 … 16 Next »
C++ exception handling
MFGG Forums MFGG Developer Discussion v
1 2 3 4 5 … 16 Next »
C++ exception handling
Mark All Posts Read Today's Posts

C++ exception handling
GeneSu730
Wannabe Hacker
Members
Egg Hunter
#1
03-15-2026, 09:52 PM
I have a question. I am creating a new Zelda game engine. It will use bits and pieces of my Mario engine but I will have to change a lot of code. I am using an old version of Visual C++ and Direct X. It does not have smart pointers. However, I was thinking about adding standard exception handling (try-catch-throw). I have been researching several websites and the advice I have been getting is to avoid it because it slows down performance and can make a mess of other things. In particular, game consoles (especially those from Nintendo) don't support exceptions while others (XBox) take a massive performance hit. Do any of you have any thoughts about it?

  ↳
PaulineGamer
Hammer Bro
Members
Site Developer/Webmasters Submitter NCFC Contributor Secret Santa Popeyes Badge MFGG 17th Anniversary MFGG Awards 2017 Winner
#2
03-31-2026, 04:56 PM
ive run into this problem with gamedev before. not in C++ but in C#, but im sure the experience will be similar

basically, yes the performance hit will be huge.

i did something silly that caught exceptions when you were changing levels. the game locked up for like an entire half-second from catching a few exceptions. i figured it would be instant, but no, it is very very costly.

especially if you're planning on throwing / catching exceptions on a per-frame basis, this will totally not work. id recommend avoiding them entirely for games
Vimimin Wrote:Hylian's day job, little did we know, was saying controversial things on the internet.
Mors Wrote:you fool!!!! you fixed it wrong!!!!

[Image: GGyaUXO.png]

[Image: ggc0JQ0.png] [Image: d7OJc4b.png]
Bibby Team
[-] The following 1 user Likes PaulineGamer's post:1 user Likes PaulineGamer's post
  ↳ GeneSu730
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)



  • View a Printable Version
Forum Jump:

Mario Fan Games Galaxy - Powered by MyBB | MFGG Staff | Contact Us

Linear Mode
Threaded Mode