C++ Workshop - Project 1
Hi Everyone!
I'd like to thank everyone who took the time to work on Project 1. Doing the projects will help deepen your understanding of the information you're reading in the book, and it will help polish your skills. If you were unable to complete project 1, you need to re-read what we've done so far, perhaps multiple times.
Although a bit time consuming in places, the tasks involved in project 1 were not overly difficult. Mostly it just required wrapping your head around the project guidelines and coming up with a logical plan of attack. This is the most fundamental part of programming, as programming - in any language - is really just a form of problem solving using logic and a compiler.
At this point, Project 1 is officially over. Please feel free to continue to post your questions, sample source code, and design ideas however, but keep in mind that many of the readers will be moving on to Project 2 this week. So answers to your questions about Project 1 may be a bit slower coming.
And for those who've done project 1, you'll be happy to know that project 2 is indeed a continuation of project 1, and I'll be posting the full details as I did the last time in a few days.
Cheers!
I'd like to thank everyone who took the time to work on Project 1. Doing the projects will help deepen your understanding of the information you're reading in the book, and it will help polish your skills. If you were unable to complete project 1, you need to re-read what we've done so far, perhaps multiple times.
Although a bit time consuming in places, the tasks involved in project 1 were not overly difficult. Mostly it just required wrapping your head around the project guidelines and coming up with a logical plan of attack. This is the most fundamental part of programming, as programming - in any language - is really just a form of problem solving using logic and a compiler.
At this point, Project 1 is officially over. Please feel free to continue to post your questions, sample source code, and design ideas however, but keep in mind that many of the readers will be moving on to Project 2 this week. So answers to your questions about Project 1 may be a bit slower coming.
And for those who've done project 1, you'll be happy to know that project 2 is indeed a continuation of project 1, and I'll be posting the full details as I did the last time in a few days.
Cheers!
Jeromy Walsh
Sr. Tools & Engine Programmer | Software Engineer
Microsoft Windows Phone Team
Chronicles of Elyria (An In-development MMORPG)
GameDevelopedia.com - Blog & Tutorials
GDNet Mentoring: XNA Workshop | C# Workshop | C++ Workshop
"The question is not how far, the question is do you possess the constitution, the depth of faith, to go as far as is needed?" - Il Duche, Boondock Saints
Sr. Tools & Engine Programmer | Software Engineer
Microsoft Windows Phone Team
Chronicles of Elyria (An In-development MMORPG)
GameDevelopedia.com - Blog & Tutorials
GDNet Mentoring: XNA Workshop | C# Workshop | C++ Workshop
"The question is not how far, the question is do you possess the constitution, the depth of faith, to go as far as is needed?" - Il Duche, Boondock Saints
Is there a tutor who is willing to look through my source code of project 1? I have project 1 as good as finished (maybe it needs some cleaning up) but before I start with project 2 I would like to have some feedback on what I have done. This way I won't continue building on a bad design.
I am going to take down the list of tutors. Those who are listed as tutors rarely post, and those who aren't do. Its purpose is mostly lost now.
Jeromy Walsh
Sr. Tools & Engine Programmer | Software Engineer
Microsoft Windows Phone Team
Chronicles of Elyria (An In-development MMORPG)
GameDevelopedia.com - Blog & Tutorials
GDNet Mentoring: XNA Workshop | C# Workshop | C++ Workshop
"The question is not how far, the question is do you possess the constitution, the depth of faith, to go as far as is needed?" - Il Duche, Boondock Saints
Sr. Tools & Engine Programmer | Software Engineer
Microsoft Windows Phone Team
Chronicles of Elyria (An In-development MMORPG)
GameDevelopedia.com - Blog & Tutorials
GDNet Mentoring: XNA Workshop | C# Workshop | C++ Workshop
"The question is not how far, the question is do you possess the constitution, the depth of faith, to go as far as is needed?" - Il Duche, Boondock Saints
I have uploaded my source code to a fileshare service, I hope you guys are able to download it from there. You should be able to get it with the following link:
http://www.4shared.com/file/3868368/e660eb75/project1.html
Please Note:
This project contains a few memoryleaks which I discovered yesterday night. I haven't fixed those in this project yet, but my sources should give you all a good idea of how I build Project1.
http://www.4shared.com/file/3868368/e660eb75/project1.html
Please Note:
This project contains a few memoryleaks which I discovered yesterday night. I haven't fixed those in this project yet, but my sources should give you all a good idea of how I build Project1.
I finaly finished it. I have all the obvious bugs worked out, shouldnt be any memory leaks.
--edit-- My wife played it and was able to point out a few errors in game play, forgot to deduct item cost from plyer when purchasing items, Forgot to adjust armor prices to my gold scale, crit multipliers are 20 for all weps (instant kill).--- Once I get feed back Ill fix all bugs and place a new revision.
Things I like aobut it:
40 unique enemy names
Assigns armor and wepons to enemies by random withing a bracket dependent on level.
Once you buy equipment, you own it and can re-equip any item you own.
You get to see the enemy before you fight, and get the option to back out...
but be warned.. it comes with a price that could be your head.
Menu System, Character System, and Item System are completely OO.
Things Im critical about:
Could have made better use of functions, especially in the code that controlls the fight sequence.
Should have tried to make the fight sequence a class based instance to OO my code even further.
Not as efficient as I think the code could be.
Please comment in any way... Ill welcome and need the feed back.
Source is here: http://files.filefront.com//;5528936;;/
[Edited by - westond on September 22, 2006 12:55:15 PM]
--edit-- My wife played it and was able to point out a few errors in game play, forgot to deduct item cost from plyer when purchasing items, Forgot to adjust armor prices to my gold scale, crit multipliers are 20 for all weps (instant kill).--- Once I get feed back Ill fix all bugs and place a new revision.
Things I like aobut it:
40 unique enemy names
Assigns armor and wepons to enemies by random withing a bracket dependent on level.
Once you buy equipment, you own it and can re-equip any item you own.
You get to see the enemy before you fight, and get the option to back out...
but be warned.. it comes with a price that could be your head.
Menu System, Character System, and Item System are completely OO.
Things Im critical about:
Could have made better use of functions, especially in the code that controlls the fight sequence.
Should have tried to make the fight sequence a class based instance to OO my code even further.
Not as efficient as I think the code could be.
Please comment in any way... Ill welcome and need the feed back.
Source is here: http://files.filefront.com//;5528936;;/
[Edited by - westond on September 22, 2006 12:55:15 PM]
Okay, my take is here.
Opponents are randomly generated, choose a random weapon/armor up to their level. I must say, with these rules, it's a pretty tough game.
Problems I know about:
* No colours or other console magic, including delays. I exceeded my download limit, so I'm on trickling bandwidth till the end of the month, and hence no platform SDK for me for a while.
* Menu design is slightly flawed, probably assigning anchors ( void (*)() 's ) would have allowed for more flexible code; right now, they are linked into each other manually and it's only comfortable due to specifics of the menu succession.
* Commonly used procedures are in a separate, not nicely implemented class. I had some problems with including headers and referencing those procedures, so I ended up with this.
* Random fixed, thanks surfi.
* Monsters weren't getting their XP initialized properly, they are now.
Any suggestions?
[Edited by - Darkstrike on October 18, 2006 2:59:27 AM]
Opponents are randomly generated, choose a random weapon/armor up to their level. I must say, with these rules, it's a pretty tough game.
Problems I know about:
* No colours or other console magic, including delays. I exceeded my download limit, so I'm on trickling bandwidth till the end of the month, and hence no platform SDK for me for a while.
* Menu design is slightly flawed, probably assigning anchors ( void (*)() 's ) would have allowed for more flexible code; right now, they are linked into each other manually and it's only comfortable due to specifics of the menu succession.
* Commonly used procedures are in a separate, not nicely implemented class. I had some problems with including headers and referencing those procedures, so I ended up with this.
* Random fixed, thanks surfi.
* Monsters weren't getting their XP initialized properly, they are now.
Any suggestions?
[Edited by - Darkstrike on October 18, 2006 2:59:27 AM]
Quote:
Random is not perfectly fair. Would need to know MAX_INT or whatever gives me back the maximum value that rand() returns to discard the few top values that cause the bias toward the lower values. Shouldn't be anything noticeable, but it's conceptually wrong, so it bugs me.
You can use RAND_MAX, defined in "stdlib.h". The random numbers are defined in the range [0,RAND_MAX].
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement