flat assembler
Message board for the users of flat assembler.

Index > Windows > Next 'windows game programming for dummies' Ready!

Goto page 1, 2  Next
Author
Thread Post new topic Reply to topic
madmatt



Joined: 07 Oct 2003
Posts: 1045
Location: Michigan, USA
madmatt 22 Jan 2005, 11:14
Here's the Chapter 17 Examples from the 'Windows Game programming for dummies' book.
As usual you can find them at ftp: ftp://68.225.35.57/
or: http://www.asmdemon.com/

Exclamation Idea Because I don't know how to start a poll, I'll ask the question here:
Would you like me too continue (finish) with these directdraw examples, OR, would you like me to start on two new Direct3d books that I have bought over the past few months:
Focus on 2D in Direct3d
and
Introduction to 3d Game Programming with Directx 9.0

The reason I ask is that I'm finding little directdraw does compared to direct3d.
For even 2d programming, Direct3d seems the way to go, Directdraw has not been updated in a long time, while Direct3d is updated continually. The first book would cover makeing 2d games, and get us familiar with the direct3d interface, and the second book would get us started writing 3d games properly.

So, what do you say:?:

_________________
Gimme a sledge hammer! I'LL FIX IT!
Post 22 Jan 2005, 11:14
View user's profile Send private message Reply with quote
Piluex



Joined: 22 Jan 2005
Posts: 10
Piluex 22 Jan 2005, 17:57
Help, when I start the test the screen change the resolution and the app ends. Sad The examples too. I test my card width dxdiag and works.
Post 22 Jan 2005, 17:57
View user's profile Send private message Reply with quote
crc



Joined: 21 Jun 2003
Posts: 637
Location: Penndel, PA [USA]
crc 22 Jan 2005, 19:07
I kind of wish you could do some tutorials on OpenGL Smile I'd vote for Direct3D if the API's are cleaner and easier to work with under assembly. (I'm not familar with the Direct3D API's at all...)
Post 22 Jan 2005, 19:07
View user's profile Send private message Visit poster's website Reply with quote
madmatt



Joined: 07 Oct 2003
Posts: 1045
Location: Michigan, USA
madmatt 22 Jan 2005, 20:50
PILUEX : Do you mean you try and change the screen resolution, and the example(s) crashes? Or do they just crash when you compile and run them.

CRC - I could do some examples with opengl, but the vast majority of the examples I have are for Direct3d, many programmers have said theat the Direct3d 9 interface is much cleaner and easier than in previous versions. We'll See! I'll look and see what I can find. I have to get the latest opengl includes and convert them, this might take a little while, couldn't find them on opengl.com on my first visit. Do you knnow where I could find them? Easily!
Post 22 Jan 2005, 20:50
View user's profile Send private message Reply with quote
Piluex



Joined: 22 Jan 2005
Posts: 10
Piluex 22 Jan 2005, 21:58
they just crash when I compile and run them.

--Run
--Black screen
--No error report
--nothing Razz
Post 22 Jan 2005, 21:58
View user's profile Send private message Reply with quote
vid
Verbosity in development


Joined: 05 Sep 2003
Posts: 7105
Location: Slovakia
vid 22 Jan 2005, 23:04
direct draw usually does this, on GPF it doesn't use standard windoze's GPF handler, but it just tries to exit app, and that sometimes isn't possible...
Post 22 Jan 2005, 23:04
View user's profile Send private message Visit poster's website AIM Address MSN Messenger ICQ Number Reply with quote
madmatt



Joined: 07 Oct 2003
Posts: 1045
Location: Michigan, USA
madmatt 23 Jan 2005, 09:30
Piluex: This Happens when it cannot find the bmp/wav files
Copy the fasmdx3.dll into your c:\windows\system32 -> folder
Copy the FASM-WGPFD folder into the c:\ directory.
See if they work after doing these two things
Post 23 Jan 2005, 09:30
View user's profile Send private message Reply with quote
Piluex



Joined: 22 Jan 2005
Posts: 10
Piluex 24 Jan 2005, 22:04
fasmdx3.dll in c:\windows\system32

Examples in:
C:\fasmw-WGPFD\WGPFDExamples-PII\Chapter17
and
c:\examples

in boot locations

--Click
--Black screen
--No error report
--nothing
Post 24 Jan 2005, 22:04
View user's profile Send private message Reply with quote
madmatt



Joined: 07 Oct 2003
Posts: 1045
Location: Michigan, USA
madmatt 25 Jan 2005, 08:09
What OS are you using? What version of DirectX?
Post 25 Jan 2005, 08:09
View user's profile Send private message Reply with quote
Piluex



Joined: 22 Jan 2005
Posts: 10
Piluex 26 Jan 2005, 01:08
Windows XP SP1
DirectX 9.0c
The dd/d3d test in dxdiag.exe works fine.
Post 26 Jan 2005, 01:08
View user's profile Send private message Reply with quote
madmatt



Joined: 07 Oct 2003
Posts: 1045
Location: Michigan, USA
madmatt 26 Jan 2005, 14:04
That's tough to answer Confused , you have basically the same setup as my computer. I've done several tests, and they all run fine on my computer. Sounds like you have them set up correctly, except the examples cannot be moved at all, or they definitely will not run and will CRASH. That brings me to a few major problems with the code in this book Crying or Very sad . First of all It does not use the CAPS capabilities structures for ANY of the code, directdraw, directsound, or directinput Sad . Nor is there any REAL error checking done for file loading as well, so if a file is not found, CRASH Sad .
Well, anyways, try putting the full pathname of the files the program is trying to load, look in the data section of the code. That's all I can think of right now. Confused
EXAMPLE
chopperframes db 'chopperframes.bmp',0
would become: chopperframes db 'C:\fasmw-WGPFD\WGPFDExamples-PII\Chapter 17\chopperframes.bmp',0
Matt
Post 26 Jan 2005, 14:04
View user's profile Send private message Reply with quote
Piluex



Joined: 22 Jan 2005
Posts: 10
Piluex 27 Jan 2005, 15:31
I did it and continues happening the same.
Post 27 Jan 2005, 15:31
View user's profile Send private message Reply with quote
madmatt



Joined: 07 Oct 2003
Posts: 1045
Location: Michigan, USA
madmatt 28 Jan 2005, 08:01
One last question, what cpu does your computer have? The CpuMemsetB function in the fasmdx3.dll uses sse\sse2 to clear\fill memory. Maybe this could be the problem. In all honesty, I don't have a clue, all of my tests worked.
However, I have decided that 2d in Direct3d is the way to go. I will still update the fasmdx3.dll code and make it a bit more robust in certain areas. So I'm officially closing this project down. The new .dll library will be call fasmD3D.dll, and will be a 2d interface all written with direct3d code, and much more. Also will apply all the lessons learned with the DirectDraw code, and apply them to this new library.
MadMatt
Post 28 Jan 2005, 08:01
View user's profile Send private message Reply with quote
Piluex



Joined: 22 Jan 2005
Posts: 10
Piluex 28 Jan 2005, 22:31
My pc:

AMD sempron 2600+
K7S41GX
512 Ram DDR 333
The video card is buit-in SIS 741 series.


http://www.amd.com/us-en/Processors/ProductInformation/0,,30_118_11599_11604,00.html
Post 28 Jan 2005, 22:31
View user's profile Send private message Reply with quote
madmatt



Joined: 07 Oct 2003
Posts: 1045
Location: Michigan, USA
madmatt 29 Jan 2005, 10:05
I understand AMD Doesn't have the sse2 instruction set, which I use for memory copying and clearing, this is the most likely cause.
Post 29 Jan 2005, 10:05
View user's profile Send private message Reply with quote
Piluex



Joined: 22 Jan 2005
Posts: 10
Piluex 30 Jan 2005, 19:02
Yes, It's true. I read it and only the 754-pin and 939-pin version of amd processors have SSE2 and my processor is socket A.
Post 30 Jan 2005, 19:02
View user's profile Send private message Reply with quote
madmatt



Joined: 07 Oct 2003
Posts: 1045
Location: Michigan, USA
madmatt 30 Jan 2005, 23:06
I'll remove the sse/sse2 code from the memory copying and clearing code and see if this helps, I'll upload the new library right in this message thread.
MadMatt
Post 30 Jan 2005, 23:06
View user's profile Send private message Reply with quote
Madis731



Joined: 25 Sep 2003
Posts: 2139
Location: Estonia
Madis731 31 Jan 2005, 09:54
Yes - definately D3D. The DirectDraw doesn't seem to be convinfing anymore. The quality seems poor(maybe its just an illusion...).
Post 31 Jan 2005, 09:54
View user's profile Send private message Visit poster's website Yahoo Messenger MSN Messenger Reply with quote
madmatt



Joined: 07 Oct 2003
Posts: 1045
Location: Michigan, USA
madmatt 31 Jan 2005, 10:30
Well here is the fasmdx3.dll file with the sse2 code removed from the memory copy/clearing functions. Give this a try.
Post 31 Jan 2005, 10:30
View user's profile Send private message Reply with quote
madmatt



Joined: 07 Oct 2003
Posts: 1045
Location: Michigan, USA
madmatt 31 Jan 2005, 10:36
Madis731: No illusion, Directdraw feature set is a joke compared to Direct3d, and the fact that Direct3d continues to be debugged and updated on a regular basis.
Post 31 Jan 2005, 10:36
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  
Goto page 1, 2  Next

< 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.