Author Topic: use OOP advantages in complex game?  (Read 2352 times)

daydreamer

  • Member
  • *****
  • Posts: 2398
  • my kind of REAL10 Blonde
use OOP advantages in complex game?
« 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

my none asm creations
http://masm32.com/board/index.php?topic=6937.msg74303#msg74303
I am an Invoker
"An Invoker is a mage who specializes in the manipulation of raw and elemental energies."
Like SIMD coding

Biterider

  • Moderator
  • Member
  • *****
  • Posts: 1083
  • ObjAsm Developer
    • ObjAsm
Re: use OOP advantages in complex game?
« Reply #1 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/
It's 32-bit code, but easy to translate to 64-bit if you want.

Biterider

daydreamer

  • Member
  • *****
  • Posts: 2398
  • my kind of REAL10 Blonde
Re: use OOP advantages in complex game?
« Reply #2 on: March 25, 2020, 08:58:23 PM »
Hi there
If you'd like to dive into game coding, take a look at the DirectX code examples here 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


my none asm creations
http://masm32.com/board/index.php?topic=6937.msg74303#msg74303
I am an Invoker
"An Invoker is a mage who specializes in the manipulation of raw and elemental energies."
Like SIMD coding