My first game using Chili Framework

The Partridge Family were neither partridges nor a family. Discuss.
Natories
Posts: 107
Joined: June 21st, 2012, 7:06 am
Location: USA
Contact:

My first game using Chili Framework

Post by Natories » July 6th, 2012, 12:36 am

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 **
Last edited by Natories on July 16th, 2012, 10:04 pm, edited 1 time in total.

Natories
Posts: 107
Joined: June 21st, 2012, 7:06 am
Location: USA
Contact:

Re: My first game using Chili Framework

Post by Natories » July 6th, 2012, 3:38 am

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 ...

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

Re: My first game using Chili Framework

Post by chili » July 6th, 2012, 9:36 am

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.
Chili

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

Re: My first game using Chili Framework

Post by LuX » July 6th, 2012, 9:36 am

Cool game. I see a couple of things that could be enhanced, but I think the code is pretty good.
ʕ •ᴥ•ʔ

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

Re: My first game using Chili Framework

Post by chili » July 6th, 2012, 9:46 am

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.
Chili

Natories
Posts: 107
Joined: June 21st, 2012, 7:06 am
Location: USA
Contact:

Re: My first game using Chili Framework

Post by Natories » July 6th, 2012, 3:47 pm

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.

SquareMan
Posts: 4
Joined: July 8th, 2012, 1:09 am

Re: My first game using Chili Framework

Post by SquareMan » July 8th, 2012, 1:31 am

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.

Natories
Posts: 107
Joined: June 21st, 2012, 7:06 am
Location: USA
Contact:

Re: My first game using Chili Framework

Post by Natories » July 8th, 2012, 4:06 am

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!

SquareMan
Posts: 4
Joined: July 8th, 2012, 1:09 am

Re: My first game using Chili Framework

Post by SquareMan » July 8th, 2012, 6:33 am

No problem, I'll love to play the new version, maybe throw up a quick review on my youtube channel.

Natories
Posts: 107
Joined: June 21st, 2012, 7:06 am
Location: USA
Contact:

Re: My first game using Chili Framework

Post by Natories » July 9th, 2012, 4:09 pm

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.

Post Reply