Author Topic: Simple Game using three techniques  (Read 13368 times)

0000

  • Member
  • ****
  • Posts: 872
Re: Simple Game using three techniques
« Reply #30 on: April 08, 2018, 07:09:48 AM »
Quote
You are not serious :eusa_naughty:

Of course not,  but compared to assembler it might as well be Chinese. :lol:  :badgrin:

Quote
Hi,

   Hey.  I "wrote" a game in FORTRAN...

Now that sounds like it would be REALLY foreign to me.  :lol:

No matter what language it's in,  game creation is fun. (at least should be)

btw Jochen,  does MasmBasic have features that would aid in game development?? I know you are constantly tweaking MB and making additions...

Damn,  I quoted myself. .. Meant to modify   :lol:


Kinda like talking to myself  :P

jj2007

  • Member
  • *****
  • Posts: 11551
  • Assembler is fun ;-)
    • MasmBasic
Re: Simple Game using three techniques
« Reply #31 on: April 08, 2018, 07:41:05 AM »
btw Jochen,  does MasmBasic have features that would aid in game development??

Test it. Replace the usual
  include \masm32\include\masm32rt.inc
with
  include \masm32\MasmBasic\MasmBasic.inc

Add the specific includes you need (dx, ...?), and start coding as if it was a standard Masm32 program. Put a deb 4, "x", eax, $Err$() after invoke whatever, 123 to see if the call succeeded. There are many features, see here, but for game development I would really suggest to test the deb macro with a console. It is incredibly helpful in finding bugs.

MB is strong with text parsing, file i/o, arrays (strings, numeric, structures), and has some graphic capabilities. But it is difficult to tell what would be particularly helpful in game development. If you have a specific need, ask me, maybe I can find something.

0000

  • Member
  • ****
  • Posts: 872
Re: Simple Game using three techniques
« Reply #32 on: April 08, 2018, 07:52:03 AM »
Cool,  jj.  As soon as I  get a computer up and running here,  I'll check it out....

zedd

LordAdef

  • Member
  • ****
  • Posts: 669
Re: Simple Game using three techniques
« Reply #33 on: April 11, 2018, 05:13:52 AM »
Quote
MB is strong with text parsing, file i/o, arrays (strings, numeric, structures), and has some graphic capabilities. But it is difficult to tell what would be particularly helpful in game development. If you have a specific need, ask me, maybe I can find something
.


JJ, some useful things for games:


. a fast sorting array algo
. memory management
. timing routines (nanoTimer in msecs)
. read/write to file








jj2007

  • Member
  • *****
  • Posts: 11551
  • Assembler is fun ;-)
    • MasmBasic
Re: Simple Game using three techniques
« Reply #34 on: April 11, 2018, 12:52:59 PM »
Thanks, Alex. Here are some links:
JJ, some useful things for games:

. a fast sorting array algo -> ArraySort (numeric), QSort (strings)
. memory management -> New$, Alloc16, Free16, MemSet, MemState
. timing routines (nanoTimer in msecs) -> NanoTimer
. read/write to file ->Open, Seek, Recall, FileWrite, Store

LordAdef

  • Member
  • ****
  • Posts: 669
Re: Simple Game using three techniques
« Reply #35 on: April 12, 2018, 06:52:24 PM »
Thanks, Alex. Here are some links:
JJ, some useful things for games:

. a fast sorting array algo -> ArraySort (numeric), QSort (strings)
. memory management -> New$, Alloc16, Free16, MemSet, MemState
. timing routines (nanoTimer in msecs) -> NanoTimer
. read/write to file ->Open, Seek, Recall, FileWrite, Store


Nice JJ. I forgot of a important one: image rotation


I think it's time for you to make a masmGame!  A subset of masmBasic for game dev  :greenclp:


0000

  • Member
  • ****
  • Posts: 872
Re: Simple Game using three techniques
« Reply #36 on: April 12, 2018, 07:10:36 PM »
★SNIP★

duplcated two posts down :eusa_snooty:
« Last Edit: April 14, 2018, 08:30:33 AM by zedd151 »

jj2007

  • Member
  • *****
  • Posts: 11551
  • Assembler is fun ;-)
    • MasmBasic
Re: Simple Game using three techniques
« Reply #37 on: April 12, 2018, 07:18:05 PM »
I forgot of a important one: image rotation

Like this?

include \masm32\MasmBasic\Res\MbGui.asm
  GuiImageCallback Rotate         ; user-defined function
  SetGlobals rotatemode

Event Key
  inc rotatemode
  and rotatemode, 3
  GuiCls

Event Paint
  GuiImage "\Masm32\examples\exampl04\car\car.jpg", fit

EndOfEvents

Rotate:                   ; user-defined callback function
  gdi+ GdipImageRotateFlip, giImage, rotatemode                ; giImage stands for GuiImageCallBackObject
  ret
GuiEnd

0000

  • Member
  • ****
  • Posts: 872
Re: Simple Games series coming soon...
« Reply #38 on: April 12, 2018, 07:40:17 PM »
Okay lets unhijack this thread

current version  (4×4 v2) attached here.

Plans for future games in the "Simple Games" series:

tic-tac-toe
connect 4 type game (can't use that name for copyright reasons)
checkers

probably will also add a card game or two


Have parts of the first three already but don't have the sources at this location.
The games in the series will have both a windowed version and console version (where possible)


zedd.

Please no more :spam: posts here.

Please post here only to discuss the Simple Games series.

Requests for other Simple Games will be considered, as long as they are not too complicated to code, i.e., "simple".  :icon_cool:


edit=attachment and clarification, and adding....

Once I have source code for the rest of the series will give it its own thread



4x4 version 2
« Last Edit: July 20, 2018, 04:29:15 AM by zedd151 »