Recent Posts

Pages: [1] 2 3 ... 10
1
User Contributions / Re: Dizz-Asteroids
« Last post by MrBcx on October 11, 2024, 12:11:49 PM »
As a paying customer, isn't that what an AI would say to you?   ;D ;D ;D

AIR.

Indeed!

What better way to entice customers to keep paying than to blow some AI generative smoke up their a$$.   ;)
2
User Contributions / Re: Dizz-Asteroids
« Last post by airr on October 11, 2024, 11:58:46 AM »
As a paying customer, isn't that what an AI would say to you?   ;D ;D ;D

Kidding, of course.  Great job putting this together!!!!

AIR.
3
User Contributions / Re: Dizz-Asteroids
« Last post by MrBcx on October 11, 2024, 11:49:16 AM »
I found this interesting.

I fed Anthropic's Claude AI the entire BASIC and the translated C/C++ code for my game.
I asked Claude to evaluate the translated C/C++ code against the BCX BASIC code for my Asteroids game.

Here is Claude's response:

After reviewing the generated C/C++ code, here are my observations and opinions:

Structure and Organization:

The code is well-structured and follows a consistent pattern, which is good for readability and maintenance.
Function prototypes are declared at the beginning, followed by global variables and then function implementations.


Cross-compiler Compatibility:


The code includes numerous preprocessor directives to ensure compatibility across different compilers
(Pelles C, Lcc-Win32, MinGW64, and Microsoft Visual C++). This is excellent for portability.


Windows API Usage:

The code makes extensive use of the Windows API for graphics and user input, which is appropriate for a Windows-based game.


Memory Management:


The code uses a custom memory management function (BCX_TempStr) for string handling, which could help
prevent memory leaks if used correctly.


Game Logic:

The game logic is well-implemented, with separate functions for different aspects of the game
(e.g., UpdateShip, UpdateAsteroids, CheckCollisions).


Graphics:

The graphics are handled using GDI (Graphics Device Interface), which is simple but effective for this type of game.


Input Handling:

Input is managed using GetAsyncKeyState, which is appropriate for real-time games.


Performance Considerations:

The use of double buffering (BCX_BUFFER_START and BCX_BUFFER_STOP) is good for smooth rendering.


Error Handling:

There's some basic error handling, particularly for file operations, which is good.


Code Comments:

The code could benefit from more inline comments explaining complex logic or non-obvious operations.


Magic Numbers:


There are some magic numbers in the code. It might be beneficial to replace these with named constants
for better readability and maintainability.


Type Safety:


The code uses a mix of C and C++ style casts. Consistently using C++ style casts could improve type safety.



Overall, the generated C/C++ code appears to be functional and well-structured.

It successfully translates the BCX BASIC code into a form that can be compiled by multiple
C/C++ compilers, which is impressive. The code demonstrates good practices in game development,
such as separating update and draw logic, and using double buffering for smooth graphics.

However, as with any auto-generated code, there might be room for optimization and modernization
if the code were to be manually refined. For instance, using more modern C++ features or a dedicated
game development library could potentially simplify some parts of the code.

That being said, if the game is running well and is enjoyable to play, then the generated code is serving
its purpose effectively.

Great job on creating a fun Asteroids game!


4
Questions & Answers / Re: Unexplained application crashes when using uncom
« Last post by airr on October 11, 2024, 11:34:46 AM »
Dangling Reference (typical C)?

Hope you feel better soon, Quin!

AIR.
5
Questions & Answers / Re: Unexplained application crashes when using uncom
« Last post by Quin on October 11, 2024, 11:33:02 AM »
The Voice Object is already a global.

Going back to your original code, I tried this:

Code: [Select]
        Case ID_MenuExit
            If IsObject(Voice) Then UNCOM(Voice)
            PostMessage(hWnd, WM_QUIT, 0, 0)
            Exit Function

And the crashing went away...

AIR.
Very interesting! I have utterly no idea why that would be, but thanks for your help! I wonder if the same thing would apply to the update hiding utility?
Unfortunately, long-covid currently has me firmly in its grasps and so probably no coding for the next couple days :( once I'm back in the game though this looks quite promising.
Thanks again for all your help!
6
Questions & Answers / Re: Unexplained application crashes when using uncom
« Last post by airr on October 11, 2024, 11:20:32 AM »
The Voice Object is already a global.

Going back to your original code, I tried this:

Code: [Select]
        Case ID_MenuExit
            If IsObject(Voice) Then UNCOM(Voice)
            PostMessage(hWnd, WM_QUIT, 0, 0)
            Exit Function

And the crashing went away...

AIR.
7
Announcements / Re: BCX v8.1.8 is available for download
« Last post by MrBcx on October 11, 2024, 08:41:24 AM »
Kevin,
  The folder in the Bcx818.zip download is Bcx819.
It appears it is just mislabeled as the contents are Bcx818.


James

Those damn off-by-one errors are ubiquitous.  ;)
8
Announcements / Re: BCX v8.1.8 is available for download
« Last post by jcfuller on October 11, 2024, 07:42:09 AM »
Kevin,
  The folder in the Bcx818.zip download is Bcx819.
It appears it is just mislabeled as the contents are Bcx818.


James
9
Off-Topic Discussions / Re: Why code with AI?
« Last post by Quin on October 11, 2024, 06:24:50 AM »
(Sorry for the off-topic post, but just had to say this:)

Hey, Quin:

I just checked out your GitHub, holy crap man, talk about versatility with programming languages!

I was very pleasantly surprised when I saw you have also coded for macOS; I thought I was the only one around these parts who did that (although I'm old school, and code in Obj-C instead of Swift).

Very impressed, keep doing what you do!

AIR.
Airr,
Thanks! :)
I indeed did used to be a Mac coder, but Apple has made it super apparently clear that they don't give a shit about their blind users by neglecting macOS's screen reader for over a decade by now, so I jumped ship to a highly-customized and stripped down version of Windows 10 IoT LTSC.

Truth be told I prefer OBJ-c over swift, even had to help write a bit of it for NVGT, a game engine I'm working on.
10
Questions & Answers / Re: Unexplained application crashes when using uncom
« Last post by Quin on October 11, 2024, 06:21:36 AM »
Airr,
You're indeed correct, thanks for your testing! However this does bafel me, and I'd ideally like to find a different solution. This is definitely not how you were meant to use COM objects...
Maybe making it a global would help?
Pages: [1] 2 3 ... 10