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

zedd151

  • Member
  • *****
  • Posts: 1616
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
Nugget and Gypsy Youtube channel. New videos twice a week or so. If you like the videos, please subscribe and comment.  :biggrin:

jj2007

  • Member
  • *****
  • Posts: 13311
  • Assembly 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.

zedd151

  • Member
  • *****
  • Posts: 1616
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
Nugget and Gypsy Youtube channel. New videos twice a week or so. If you like the videos, please subscribe and comment.  :biggrin:

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: 13311
  • Assembly 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:


zedd151

  • Member
  • *****
  • Posts: 1616
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 »
Nugget and Gypsy Youtube channel. New videos twice a week or so. If you like the videos, please subscribe and comment.  :biggrin:

jj2007

  • Member
  • *****
  • Posts: 13311
  • Assembly 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

zedd151

  • Member
  • *****
  • Posts: 1616
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

« Last Edit: September 05, 2022, 10:52:01 AM by swordfish »
Nugget and Gypsy Youtube channel. New videos twice a week or so. If you like the videos, please subscribe and comment.  :biggrin:

zedd151

  • Member
  • *****
  • Posts: 1616
4x4 64 bit?
« Reply #39 on: August 25, 2022, 06:22:55 PM »
I've been looking at some of my old source codes for projects I'd like to convert to 64 bit. I've decided that 4x4 is a good candidate for conversion. Details coming in the next few days...


Plans are for new graphics, and a few modifications to the way certain aspects of the game are implemented. I also have code for a version with an auto solver and undo/redo. It incorporates a timer and a counter for how many moves it takes to manually solve a given puzzle. Will probably make the changes to the program in a 32 bit version first, debug it - then make the conversion after  I am certain the program will run as expected on every machine from Windows xp up to Windows 10. Not sure if or how many users have Windows 11 installed on their machines, but I don't think 11 would be much different than Windows 10 - at least from the standpoint of running programs.
Nugget and Gypsy Youtube channel. New videos twice a week or so. If you like the videos, please subscribe and comment.  :biggrin:

daydreamer

  • Member
  • *****
  • Posts: 2201
  • my kind of REAL10 Blonde
Re: 4x4 64 bit?
« Reply #40 on: August 26, 2022, 10:44:35 PM »
I've been looking at some of my old source codes for projects I'd like to convert to 64 bit. I've decided that 4x4 is a good candidate for conversion. Details coming in the next few days..
:thumbsup:
Convert /debug first,after that improvement that can be done with use 64bit
Wanna share my inspiration of use 64bit
https://www.chessprogramming.org/Bitboards
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."