Programming 2D Games

The official forum for "Programming 2D Games" the book by: Charles Kelly

It is currently Sat Jul 21, 2018 9:34 am

All times are UTC




Post new topic Reply to topic  [ 8 posts ] 
Author Message
 Post subject: Issues with display.
PostPosted: Wed Mar 22, 2017 10:39 pm 
Offline

Joined: Wed Mar 22, 2017 10:33 pm
Posts: 14
Hi. So I am following the book and I like it so far but I have some issues. I am currently trying to get fullscreen to work but apparrently I get a GameError issue about creating the directx device. I know it is coming from d3dpp.Windowed=false but I do not know why d3dpp.Windowed=false is an issue (it is actually d3dpp.Windowed=(!fullscreen).

My other issue is the display. I am suppossed to see green on the screen but the issue is I don't see it (on windowed mode.) I even downloaded the example off programming2dgames.com website and the example doesnt work!! whats going on?


Top
 Profile  
Reply with quote  
 Post subject: Re: Issues with display.
PostPosted: Thu Mar 23, 2017 10:04 pm 
Offline
Site Admin
User avatar

Joined: Sat Jan 28, 2012 4:36 pm
Posts: 546
You may need to install the DirectX 9.0c runtime.

Here is a link:
https://www.microsoft.com/en-us/download/details.aspx?id=34429

_________________
Professor Kelly


Top
 Profile  
Reply with quote  
 Post subject: Re: Issues with display.
PostPosted: Fri Mar 24, 2017 11:53 pm 
Offline

Joined: Wed Mar 22, 2017 10:33 pm
Posts: 14
I am using windows 10. The runtime does not work.

Update: The green display works in the windowed example you listed, but not on the fullscreen one.

The green display in my program (600x480 windowed) does not work.


Top
 Profile  
Reply with quote  
 Post subject: Re: Issues with display.
PostPosted: Sat Mar 25, 2017 12:46 pm 
Offline
Site Admin
User avatar

Joined: Sat Jan 28, 2012 4:36 pm
Posts: 546
I'm using Windows 10 also. The windowed and full-screen programs all work correctly after I installed the DirectX 9.0c runtime. We also have all of the games running in the lab at the college on Windows 10, again after installing the DirectX 9.0c runtime.

_________________
Professor Kelly


Top
 Profile  
Reply with quote  
 Post subject: Re: Issues with display.
PostPosted: Sat Mar 25, 2017 1:22 pm 
Offline
Site Admin
User avatar

Joined: Sat Jan 28, 2012 4:36 pm
Posts: 546
The instructions on this page may help:
http://www.dosgamers.com/directx-9-windows-10-windows-8

_________________
Professor Kelly


Top
 Profile  
Reply with quote  
 Post subject: Re: Issues with display.
PostPosted: Mon Mar 27, 2017 12:58 am 
Offline

Joined: Wed Mar 22, 2017 10:33 pm
Posts: 14
Ok. So I did install the runtime (june 2010). I already did that, but I followed the page you sent and I realized i had to run the dxsetup.exe. Thanks!

Well, now I am having to work with the linker and stuff again. The thing is I followed the page you sent me, and my directx 9 files are on my desktop. Does that mean that the lines i have in my VC++ Directories (like $(DXSDK_DIR)\Include) have to be changed? When i try to compile and run i get:
"cannot open file 'd3dx9d.lib'" as the only error.


Top
 Profile  
Reply with quote  
 Post subject: Re: Issues with display.
PostPosted: Mon Mar 27, 2017 11:26 pm 
Offline

Joined: Wed Mar 22, 2017 10:33 pm
Posts: 14
I got it to work, i entered the d3dx9d wrong i entered d3d9xd.

Ok, so debug mode is fine.

Now it is the same as when we started.

The green doesn't display on my copy.

I am going to check the copies you have on your website.

Update: your fullscreen demo works now! i just had to get direct play to work.

I think I have a coding error. I am just going to copy your code, ditch my own and continue on the book. Thanks!


Top
 Profile  
Reply with quote  
 Post subject: Re: Issues with display.
PostPosted: Tue Mar 28, 2017 5:19 pm 
Offline
Site Admin
User avatar

Joined: Sat Jan 28, 2012 4:36 pm
Posts: 546
Glad you got it working.

_________________
Professor Kelly


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 8 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


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 post attachments in this forum

Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group