News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests
NB: Posting URL's See here: Posted URL Change

Main Menu

use OOP advantages in complex game?

Started by daydreamer, March 25, 2020, 03:37:54 AM

Previous topic - Next topic

daydreamer

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
https://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

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

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/
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
https://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