flat assembler
Message board for the users of flat assembler.

Index > Windows > New examples from window game programming for dummies

Author
Thread Post new topic Reply to topic
madmatt



Joined: 07 Oct 2003
Posts: 1045
Location: Michigan, USA
madmatt 21 May 2004, 18:51
Exclamation 2nd UPDATE 5/23/2004US or 23/5/2004EURO - Added bug fix to all files discovered by inskipp, and added fixes and missing file by I-don Exclamation
Here are a few new examples from the 'Windows Game Programming for Dummies' book, Chapter 5, and now Chapter 6. Razz See the readme.txt file for instructions on how to setup Wink . Had a cold last week so took a few days longer to code and post Sad . Chapter 7 has no examples so will do Chapter 8. Now you should see some better and better examples in directdraw from here on out Wink . And also hopefully improve my fasmlib library as well.
Any problems let me know and I'll see what I can do.
MadMatt


Last edited by madmatt on 23 May 2004, 10:31; edited 2 times in total
Post 21 May 2004, 18:51
View user's profile Send private message Reply with quote
i-don



Joined: 18 Jul 2003
Posts: 66
i-don 22 May 2004, 09:21
I thought I could learn something from your fasm window game programming examples. But I must warn any Win95 users, don't event try to run these example on your computer!

Before I explain more, here is my PC specs that I used for test these code:

Intel P3 450Mhz
128MB Ram
4 MB Direct3D Video Card
Windows 95B OS
Internet Explorer 5.1
DirectX 7

It goes the same to your previous examples. All your included or re-compiled executable binaries will freeze the whole windows system threads and only left mouse freely until you press any key and everthing is stoned(remember old DOS Stoned virus?). I test every of each binaries (the original and re-compiled with fasmw 1.52). Stupid of me, I thought this examples also different and test it again. I hate all the system freezing. I guess, it's not compatible with basic Win32 or 386 based processor system. Perhaps, only for P4 and above.

So, I'm giving up on these example. Sorry, no more...!!!

i-don.
Post 22 May 2004, 09:21
View user's profile Send private message Reply with quote
madmatt



Joined: 07 Oct 2003
Posts: 1045
Location: Michigan, USA
madmatt 22 May 2004, 09:57
Sorry i-don, to here your having such bad problems with the examples Sad . I only have a windows xp system to test these on. I've heard of no other complaints, someone wrote that it worked on windows 2000 pro. I don't know what could be causing your problems Confused . My first thought would be alignment problems. My programs use only as of now, standard 386 instructions. Another is that your OS is very old and outdated. Can you run all the examples provided with FASMW? I was wondering if anyone with windows 98 can run these examples without problems?
Post 22 May 2004, 09:57
View user's profile Send private message Reply with quote
inskipp



Joined: 23 Jun 2003
Posts: 25
Location: Poland
inskipp 22 May 2004, 18:10
Same problem on Win98. My system:

Celeron 333@417
128 MB RAM
Windows 98 (first edition)
Internet Explorer 6
DirectX 8.1
RIVA TNT2
Post 22 May 2004, 18:10
View user's profile Send private message ICQ Number Reply with quote
madmatt



Joined: 07 Oct 2003
Posts: 1045
Location: Michigan, USA
madmatt 22 May 2004, 18:41
Hello everyone, I have a new version of the chapter 5 winlines example that uses a completly different method to draw lines on the screen, and just as fast. Actually, multitasking on windows xp seems to work better with this new version, and hopefully will work equally well with win 95/98/me systems as well.
Post 22 May 2004, 18:41
View user's profile Send private message Reply with quote
inskipp



Joined: 23 Jun 2003
Posts: 25
Location: Poland
inskipp 22 May 2004, 19:01
I found error in all previos examples. It was the EndPaint fuction, it tooks 2 parameters, not only a pointer to PAINTSTRUCT
I replaced
Code:
invoke EndPaint,ps
    

to
Code:
invoke EndPaint,[hwnd],ps
    

And all works great now.[/code]
Post 22 May 2004, 19:01
View user's profile Send private message ICQ Number Reply with quote
i-don



Joined: 18 Jul 2003
Posts: 66
i-don 22 May 2004, 22:32
Great solution Inskipp. Thanks a lots. Now I can enjoy to learn these great examples converted by madmatt. madmatt, sorry for giving you a troubles, but I think it's worth it as we know where the problem lies. I'm also found the case-sensitive procedure call bug in cpu.asm file. Below I attached fixed for all examples for other win98x users save the time on fixing it. Here the screenshot for the first example and updated source code.

Thanks all,

i-don.

Image


Description: Updated examples source code from the first message post by madmatt.
Download
Filename: WinGameExamples.zip
Filesize: 101.08 KB
Downloaded: 383 Time(s)

Post 22 May 2004, 22:32
View user's profile Send private message Reply with quote
madmatt



Joined: 07 Oct 2003
Posts: 1045
Location: Michigan, USA
madmatt 22 May 2004, 23:02
Very Happy THANK YOU Very Happy , Inskipp. Well, now I'm all red faced, can't believe it was such a simple solution. Embarassed I was looking in all the wrong places. I'll have to double check my code and parameters next update. Thanks for posting the fixes as well! Hopefully everything works on your systems now. I-don, no problem, I've just started learning windows assembly as well. I do know 32-bit dos programming quite well, and I took that knowledge and applied it to what I'm doing now, which makes things a little easier (and also some of the code: fasmlib), but even so, the way windows does things is still a whole other world for me. Well, anyways, updates should come a bit faster now that I'm over my cold.... stay tuned
MadMatt

P.S. Thanks to every one for your input
Post 22 May 2004, 23:02
View user's profile Send private message Reply with quote
madmatt



Joined: 07 Oct 2003
Posts: 1045
Location: Michigan, USA
madmatt 23 May 2004, 10:35
To everyone, this should be the final fixes needed for these files to work on all windows os'es now. When new examples come out, I'll post them with the date that they were posted, and it will be easier to see if you have the latest version and bug fixes of the examples.
Post 23 May 2004, 10:35
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.