Hangbot - Asimov Testgame

The Partridge Family were neither partridges nor a family. Discuss.
User avatar
LuX
Posts: 1492
Joined: April 22nd, 2012, 12:33 pm
Location: Finland

Re: Hangbot - Asimov Testgame

Post by LuX » June 30th, 2013, 1:00 pm

I tried to run the game but cannot build x64, and Win32 doesn't run.
I tried adding the includes and libraries but still errors...

On my other Direct9 games I had some trouble too, but I fixed it by making copies of the direct9 files and included those directly in the project, I wonder if that will help here too.
ʕ •ᴥ•ʔ

User avatar
LuisR14
Posts: 1248
Joined: May 23rd, 2013, 3:52 pm
Location: USA
Contact:

Re: Hangbot - Asimov Testgame

Post by LuisR14 » June 30th, 2013, 1:50 pm

heh, i knew that that CreateFont usage was gonna be trouble :P

@Lux:
well, if you have 32-bit OS you can compile for 32/64-bit but only run the 32-bit exes (ofcourse :P). but anyways, what kind of errors?
always available, always on, about ~10 years c/c++, java[script], win32/directx api, [x]html/css/php/some asp/sql experience. (all self taught)
Knows English, Spanish and Japanese.
[url=irc://irc.freenode.net/#pchili]irc://irc.freenode.net/#pchili[/url] [url=irc://luisr14.no-ip.org/#pchili]alt[/url] -- join up if ever want real-time help or to just chat :mrgreen: --

User avatar
Asimov
Posts: 814
Joined: May 19th, 2012, 11:38 pm

Re: Hangbot - Asimov Testgame

Post by Asimov » June 30th, 2013, 1:54 pm

Hi Lux,

I only switched to x64 because when I tried to load in the 32bit library I couldn't run it. Switched to x64 and it run fine. I am running a 64bit os though.

I have no problem compiling it here.
When I got the game finished I was going to try the 32bit option, to do a 32bit exe as well, but I am too into getting it finished first heh heh.
----> Asimov
"You know no matter how much I think I have learnt. I always end up hitting brick walls"
http://www.asimoventerprises.co.uk

User avatar
LuisR14
Posts: 1248
Joined: May 23rd, 2013, 3:52 pm
Location: USA
Contact:

Re: Hangbot - Asimov Testgame

Post by LuisR14 » June 30th, 2013, 2:50 pm

Asimov wrote:I only switched to x64 because when I tried to load in the 32bit library I couldn't run it.
heh, i see why that is, you're using the 64-bit path for the 32-bit config :P

btw, it would be a good idea to use %DxSdk_Dir% (without "\" right after it) instead of setting it directly just because anybody who tries to compile your project could have diff dx sdk paths

oh, and for release win32 you forgot to include the paths and libraries
always available, always on, about ~10 years c/c++, java[script], win32/directx api, [x]html/css/php/some asp/sql experience. (all self taught)
Knows English, Spanish and Japanese.
[url=irc://irc.freenode.net/#pchili]irc://irc.freenode.net/#pchili[/url] [url=irc://luisr14.no-ip.org/#pchili]alt[/url] -- join up if ever want real-time help or to just chat :mrgreen: --

User avatar
Asimov
Posts: 814
Joined: May 19th, 2012, 11:38 pm

Re: Hangbot - Asimov Testgame

Post by Asimov » June 30th, 2013, 6:45 pm

Hi all,

I have been stuck on getting this next part to work, but I did.

Oh and Lux can you test this. I think it should work on win32 now. I am assuming you are using a 32 bit processor, or you would have got the 64bit one to work.

So far it doesn't penalise you for making wrong decisions.

I am thinking of adding animation to the hangbot frame being built and stuff, but seeing as I haven't finished building the hangbot bot, that will be a while. It will be the bot you see on the game loading screen, but less rusty and with an arm. His name is Hewey from "Silent Runniing" btw.

I have actually added a dictionary class, but it only picks one word at the moment, while I am testing it. Later it will have a huge dictionary of words, and maybe different categories.

I will want to use animated shots of the robot getting hanged in a window on the screen, so I will have to implement timedelta. I managed to do that on the chilli framework, but it will be like starting all over on this one LOL.

I think I will have to change it to a proportional font too, so that it doesn't get wider when the letters start getting added.
Attachments
Hangbot.zip
(470.2 KiB) Downloaded 172 times
----> Asimov
"You know no matter how much I think I have learnt. I always end up hitting brick walls"
http://www.asimoventerprises.co.uk

Shaki
Posts: 104
Joined: June 13th, 2012, 12:20 am

Re: Hangbot - Asimov Testgame

Post by Shaki » June 30th, 2013, 7:15 pm

I had the x64 problem initially, i just clicked from the dropdown beside the debugger Win32, (I am running 64bit). It was just a build thing.

User avatar
LuX
Posts: 1492
Joined: April 22nd, 2012, 12:33 pm
Location: Finland

Re: Hangbot - Asimov Testgame

Post by LuX » June 30th, 2013, 10:32 pm

The second download works fine. And no, I'm running x64 Windows as well as as x64 processor.

Now that I look closer it reads "Platform 'x64' referenced in the project file 'Hangbot' cannot be found. Please make sure you have it installed under '%VCTargetsPath%\Platforms\x64'" in the output.

If I change to Win32 I get "Cannot open include file: 'd3dx9.h'" so I include the directx includes and libraries where this file exists. The file is now included but then I get 4 external symbol errors: "_D3DXCreateFontW@48", "_Direct3DCreate9@4", "_D3DXCreateTextureFromFileExW@56", "_D3DXCreateSprite@8".

I also tried to directly add the Direct9 .h files to your project by copying them like I did with my earlier game. That seemed to fix the problem there, but not here, still the external symbol errors.

I also tried adding "d3d9.lib" and "d3dx9.lib" but didn't help. Also then tried to specifically add x64 and x86 libs, but neither worked.

It getting kinda late and I'm too tired to test this, but maybe tomorrow I can try to import your code to my old Direct9 framework and see if it works and whats wrong.
ʕ •ᴥ•ʔ

User avatar
Asimov
Posts: 814
Joined: May 19th, 2012, 11:38 pm

Re: Hangbot - Asimov Testgame

Post by Asimov » July 1st, 2013, 12:16 am

Hi all,

I am dead pleased now. I managed to get to load from a resource files, and now my backdrop picture is in the exe.

The code is

Code: Select all

result =D3DXCreateTextureFromResourceEx(m_pd3dDevice, NULL, MAKEINTRESOURCE(IDR_BACKGROUND),
            D3DX_DEFAULT_NONPOW2, D3DX_DEFAULT_NONPOW2, 0, 0, D3DFMT_A8R8G8B8, D3DPOOL_MANAGED,
            D3DX_DEFAULT, D3DX_DEFAULT, 0, NULL, NULL, &m_texture);
Which is a lot less code than it took me to load in a png in the original chilli framework. However without chillis tutorials I wouldn't have been able to make it work so quick. It is the grounding I got from chillis tutorials which let me do this.

I will do a little more and if anyone wants me to post my code again I will.

Next I want to work out how to do a sprite sheet. I mean I know how to load in a sprite sheet, that is no problem, but haven't yet worked out how to only show a rectangle of the sprite sheet. Something tells me I may need to use the rect command for this heh heh.
Attachments
Hangbot.zip
(322.82 KiB) Downloaded 190 times
----> Asimov
"You know no matter how much I think I have learnt. I always end up hitting brick walls"
http://www.asimoventerprises.co.uk

User avatar
LuisR14
Posts: 1248
Joined: May 23rd, 2013, 3:52 pm
Location: USA
Contact:

Re: Hangbot - Asimov Testgame

Post by LuisR14 » July 1st, 2013, 3:11 am

LuX wrote: If I change to Win32 I get "Cannot open include file: 'd3dx9.h'" so I include the directx includes and libraries where this file exists. The file is now included but then I get 4 external symbol errors: "_D3DXCreateFontW@48", "_Direct3DCreate9@4", "_D3DXCreateTextureFromFileExW@56", "_D3DXCreateSprite@8".
make sure you do what i said in my post :P
for release win32 he had forgotten to include the win32 dx sdk paths and the necessary dx libs
and for debug win32 he had the wrong dx sdk path set, he was using x64 instead of x86
always available, always on, about ~10 years c/c++, java[script], win32/directx api, [x]html/css/php/some asp/sql experience. (all self taught)
Knows English, Spanish and Japanese.
[url=irc://irc.freenode.net/#pchili]irc://irc.freenode.net/#pchili[/url] [url=irc://luisr14.no-ip.org/#pchili]alt[/url] -- join up if ever want real-time help or to just chat :mrgreen: --

User avatar
Asimov
Posts: 814
Joined: May 19th, 2012, 11:38 pm

Re: Hangbot - Asimov Testgame

Post by Asimov » July 1st, 2013, 4:46 pm

Hi LuisR14,

Sorted that now. Notice the exe in my last post is now an x86 exe ;)
----> Asimov
"You know no matter how much I think I have learnt. I always end up hitting brick walls"
http://www.asimoventerprises.co.uk

Post Reply