Page 1 of 4

My first game using Chili Framework

Posted: July 6th, 2012, 12:36 am
by Natories
Hello everyone!
I just finished my first C game using all the stuff that Chili taught us through lesson 22 and I wanted to share it! It still has a few problems, like randomized items being placed on other randomized items but over all, its complete. It doesn't have fancy graphics, and utilizes only the keyboard but I will probably add mouse routines later. It's a very lengthy code for functionality and if anyone sees ways to improve, by all means let me know! Lastly, sorry it's so big!
Thanks again Chili for the lessons that got me this far!

** UPDATE: I removed the file from this post, browse to the bottom of this listing to get the newest revision **

Re: My first game using Chili Framework

Posted: July 6th, 2012, 3:38 am
by Natories
Found a bug in the code for a change I made, here is the line and the fix:
Game.cpp, line 347
char Buffer[ 30 ],
change to
char Buffer[ 120 ].
You get a buffer error if you press the space bar to engage the distance generator ...

Re: My first game using Chili Framework

Posted: July 6th, 2012, 9:36 am
by chili
Thanks for uploading dude, but next time make sure you follow the directions for cleaning your solution properly. You left the .sdf file in the root folder.

Re: My first game using Chili Framework

Posted: July 6th, 2012, 9:36 am
by LuX
Cool game. I see a couple of things that could be enhanced, but I think the code is pretty good.

Re: My first game using Chili Framework

Posted: July 6th, 2012, 9:46 am
by chili
Nice job on the game bro, looks like you've more or less mastered all the concepts of the tutorials so far. You coding style looks good too, and you make good use of structures and enums. The only thing I would point out is that you do a lot of game logic in the compose frame function, but that function should really only contain drawing code. Other than that very nice work.

Re: My first game using Chili Framework

Posted: July 6th, 2012, 3:47 pm
by Natories
Chili:
Dang, I thought I got all of them deleted! Sorry, I won't make that mistake again!
Thanks for pointing out that the some of the logic was in compose frame ... I started adding and forgot where it was I was adding it too; will fix that! Newbie mistakes? Thanks for your words of encouragement!

Lux:
Thanks for noting that, I'm already working on modifications, so hopefully that will do it, the enhancements that is.

Re: My first game using Chili Framework

Posted: July 8th, 2012, 1:31 am
by SquareMan
Nice game, finally beat it on my 3rd try, I encountered a bug in one level where two exits spawned beside each other, and sometimes the AI was a little slow to start coming after me, but over all, it was a pretty nice game.

Re: My first game using Chili Framework

Posted: July 8th, 2012, 4:06 am
by Natories
Thanks SquareMan!
I've actually reworking the code, placing teleport pads instead of using the distortion generator, adding +health and +energy crates. I also fixed the issue with my logic residing in the Compose Function (wow that was a mess ).
The AI will only come after you if you come within a certain distance of them or any of the gates... did you discover how you get bonus points in the game? There a two methods at the moment...
If you like, I'll upload the new version when I'm finished so you can give it a try. :-)
OH, and I will rework the gate issue, along with the random object drops, now that I know about it! Thanks for the heads up!

Re: My first game using Chili Framework

Posted: July 8th, 2012, 6:33 am
by SquareMan
No problem, I'll love to play the new version, maybe throw up a quick review on my youtube channel.

Re: My first game using Chili Framework

Posted: July 9th, 2012, 4:09 pm
by Natories
Sounds great SquareMan, when I finish it, I'll upload it again. I might even throw in a txt file with the game's story board. lol.