Page 1 of 2
Fully Functional Chess Game (Performance issues)
Posted: February 25th, 2017, 2:39 pm
by eyad
hi there, Planet Chili
.
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
Re: Fully Functional Chess Game (Performance issues)
Posted: February 25th, 2017, 7:48 pm
by Zedtho
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!
Re: Fully Functional Chess Game (Performance issues)
Posted: February 25th, 2017, 8:24 pm
by eyad
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?
Re: Fully Functional Chess Game (Performance issues)
Posted: February 25th, 2017, 8:58 pm
by Zedtho
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
.
Re: Fully Functional Chess Game (Performance issues)
Posted: February 25th, 2017, 8:59 pm
by albinopapa
You have to unzip the files to a folder first, I don't think you can run directly from zip file
Re: Fully Functional Chess Game (Performance issues)
Posted: February 26th, 2017, 7:31 am
by chili
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).
Re: Fully Functional Chess Game (Performance issues)
Posted: February 26th, 2017, 11:47 am
by eyad
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)
Re: Fully Functional Chess Game (Performance issues)
Posted: February 26th, 2017, 9:37 pm
by cameron
Runs just fine for me.
Re: Fully Functional Chess Game (Performance issues)
Posted: February 28th, 2017, 12:53 pm
by chili
I get 1~0% CPU usage. Runs smooth.
P.S.
Looking good bro
PPS
Add this code between lines 22 and 23 in Graphics.h to get rid of a bunch of annoying warnings:
#include "ChiliWin.h"
Re: Fully Functional Chess Game (Performance issues)
Posted: March 1st, 2017, 10:10 am
by eyad
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