The MASM Forum

Projects => ObjAsm => Topic started by: daydreamer on March 25, 2020, 03:37:54 AM

Title: use OOP advantages in complex game?
Post by: daydreamer on March 25, 2020, 03:37:54 AM
well I have tried OOP subclassing concept in Java class
but if you have oldschool,non-OOP thinking you probably have several PROC for each different but part similar function in game or other program
while OOP you start with a class,which have all the similar code and subclass it to different things
good example would be Finite State Machine,for RTS game,only few changes add the typical behaviour for the different kind of fighter

I want to reuse several GUI buttons,for different things,for example if finding a treasure box,it give me alternative todo with it,fighting gives me that kind of alternatives
or maybe a simplified solution with jumptable(s) ?,but that would become unreadable code compared to commented OOP code

Title: Re: use OOP advantages in complex game?
Post by: Biterider on March 25, 2020, 06:48:56 AM
Hi there
If you'd like to dive into game coding, take a look at the DirectX code examples here http://objasm32.tripod.com/ (http://objasm32.tripod.com/)
It's 32-bit code, but easy to translate to 64-bit if you want.

Biterider
Title: Re: use OOP advantages in complex game?
Post by: daydreamer on March 25, 2020, 08:58:23 PM
Quote from: Biterider on March 25, 2020, 06:48:56 AM
Hi there
If you'd like to dive into game coding, take a look at the DirectX code examples here http://objasm32.tripod.com/ (http://objasm32.tripod.com/)
It's 32-bit code, but easy to translate to 64-bit if you want.

Biterider
Thanks,earlier I have used raycasting earlier, and experiment with gdi polys, a labyrinth could easily be rendered bruteforce on gfx
Check my game forum threads
I rather spend time and effort on make treasure chest, enemies 3d or 2d etc than convert to 64bit