Fully Functional Chess Game (Performance issues)

The Partridge Family were neither partridges nor a family. Discuss.
eyad
Posts: 42
Joined: December 5th, 2014, 9:34 am

Fully Functional Chess Game (Performance issues)

Post by eyad » February 25th, 2017, 2:39 pm

hi there, Planet Chili :D .
i wanted to use all my C++ "chilian" knowledge so i made this project from scratch using chilli framework 2016 and ofcourse learned from his tutorials (finished old series and some parts of HUGS).

but its still a bit un-complete, there is some rules i didn't implement yet and there is no AI, however its near end.
anyways problem is that, after adding sprites the game Performance diminishes , you can see that clearly when the TILEs highlight.
i don't know what to do about it, so i will post the source here hoping that any of knowledgeable people can tell me where my performance drops!

note: in-game "Turns" disabled for easier debugging :)
note 2: in-game input is done using mouse left click
Attachments
E Chess.rar
based on Chili framework 2016
Visual studio community 2015
(1.03 MiB) Downloaded 115 times
Last edited by eyad on February 26th, 2017, 7:27 pm, edited 1 time in total.

User avatar
Zedtho
Posts: 189
Joined: February 14th, 2017, 7:32 pm

Re: Fully Functional Chess Game (Performance issues)

Post by Zedtho » February 25th, 2017, 7:48 pm

Although I don't know a lot about C++ yet, I'd like to try to help anyways, but I can't seem to open the .sln file to open the code.

Sorry 'bout that, probably stupidity on my part.

Edit: As albinopapa has pointed out, be sure to Extract the file!
Last edited by Zedtho on March 2nd, 2017, 7:13 am, edited 1 time in total.

eyad
Posts: 42
Joined: December 5th, 2014, 9:34 am

Re: Fully Functional Chess Game (Performance issues)

Post by eyad » February 25th, 2017, 8:24 pm

it maybe because you don't have the right version of visual studio or maybe you don't have Directx installed on your pc...
Zedtho wrote: but I can't seem to open the .sln file to open the code.
does a clean solution of Chili framework opens with you?

User avatar
Zedtho
Posts: 189
Joined: February 14th, 2017, 7:32 pm

Re: Fully Functional Chess Game (Performance issues)

Post by Zedtho » February 25th, 2017, 8:58 pm

It says: (Microsoft Visual Studio Popup)
One or more projects in the solution were not loaded correctly.
Please see the Output Window for details.

Output window:
C:\Users\blurred\AppData\Local\Temp\7zO481D58A5\Engine\Engine.vcxproj : error : Project "C:\Users\blurred\AppData\Local\Temp\7zO481D58A5\Engine\Engine.vcxproj" could not be found.

I'm using Visual Studio 2015.

Anyways, someone smarter will come along, so don't waste your error finding time on me :D.

albinopapa
Posts: 4373
Joined: February 28th, 2013, 3:23 am
Location: Oklahoma, United States

Re: Fully Functional Chess Game (Performance issues)

Post by albinopapa » February 25th, 2017, 8:59 pm

You have to unzip the files to a folder first, I don't think you can run directly from zip file
If you think paging some data from disk into RAM is slow, try paging it into a simian cerebrum over a pair of optical nerves. - gameprogrammingpatterns.com

User avatar
chili
Site Admin
Posts: 3948
Joined: December 31st, 2011, 4:53 pm
Location: Japan
Contact:

Re: Fully Functional Chess Game (Performance issues)

Post by chili » February 26th, 2017, 7:31 am

Hmmm, I don't see why the graphics of a chess game should cause a slowdown. When I get some time, I'll take a look at this and see where the issue is. (I am assuming you are building and running in Release, and not Debug).
Chili

eyad
Posts: 42
Joined: December 5th, 2014, 9:34 am

Re: Fully Functional Chess Game (Performance issues)

Post by eyad » February 26th, 2017, 11:47 am

chili wrote:(I am assuming you are building and running in Release, and not Debug).
in both cases there is a major slowdown...i think i should mention that , iam using sprites (bmp files) :mrgreen:

cameron
Posts: 794
Joined: June 26th, 2012, 5:38 pm
Location: USA

Re: Fully Functional Chess Game (Performance issues)

Post by cameron » February 26th, 2017, 9:37 pm

Runs just fine for me.
Computer too slow? Consider running a VM on your toaster.

User avatar
chili
Site Admin
Posts: 3948
Joined: December 31st, 2011, 4:53 pm
Location: Japan
Contact:

Re: Fully Functional Chess Game (Performance issues)

Post by chili » February 28th, 2017, 12:53 pm

I get 1~0% CPU usage. Runs smooth.

P.S.

Looking good bro :P

PPS

Add this code between lines 22 and 23 in Graphics.h to get rid of a bunch of annoying warnings:
#include "ChiliWin.h"
Attachments
Capture.PNG
(593.44 KiB) Not downloaded yet
Chili

eyad
Posts: 42
Joined: December 5th, 2014, 9:34 am

Re: Fully Functional Chess Game (Performance issues)

Post by eyad » March 1st, 2017, 10:10 am

oh well.... that's so frustrating, i was pretty sure that i tested it with release....
but looks like this isn't the case x_X
anyways, thanks guys for testing it out. and thanks For removing those annoying warnings too :D

Post Reply