|
| | #76 (permalink) |
| Registered User Join Date: Apr 2007
Posts: 16
| I would be dead happy if tomorrow I could be coding XNA games and tools in C# for game development. I guess I could be in a couple of years if I really got my act together, but I get paid well for doing what I do now so taking a paycut to do game development is not a super attractive proposition. At the very least I'll be keeping an eye on your project, all the concepts that you've pulled together in such a short time is really quite impressive, while trying to fit my own brushing up of skills in somewhere. You could probably even write a book yourself after a few more months on how to learn basic XNA2.0 and C# concepts from scratch ![]() |
| | |
| | #77 (permalink) |
| Registered User Join Date: Dec 2003
Posts: 1,978
+15 Internets | How do you make a while loop exit if one of variables meets a criteria? or just make a program exit entirely from within the while loop? nevermind, break; it is. Last edited by Saban : 03-27-2008 at 04:51 PM. |
| | |
| | #78 (permalink) |
| Registered User Join Date: Dec 2003
Posts: 1,978
+15 Internets | So actually sitting down and making your own text rpg as soon as you learn the most basic things makes it so much more fun. So far i've got the most basic fight against the player and an npc, 3 command options and crit system. next up, refining my code and making more sensible loops. |
| | |
| | #79 (permalink) | |
| Registered User Join Date: Jul 2002 Location: Los Angeles California
Posts: 228
+9 Internets | Quote:
good example, when you learn about for loops, make an exp table that uses arrays. for (int i = 0; i < (iMaxLevel + 1); i++) { int exp; //declares the exp variable exp = i * 350; //sets the amnt of exp needed for that level iExpTable[i] = exp; //fills in the exp table with the exp needed }//end Exp Table You just did in 6 lines of code, what i used to do in 60 (with 60 levels in my game) ... simple ![]() foreach is another great one ![]() | |
| | |
| | #80 (permalink) |
| Registered User Join Date: Dec 2003
Posts: 1,978
+15 Internets | i'm more interested in making a decent combat system that can call in new enemies instead of having the program exit after i win or lose against by single opponent, and have a couple classes too. All in due time. |
| | |
| | #84 (permalink) |
| Registered User Join Date: Dec 2003
Posts: 1,978
+15 Internets | Yea, but i'm still having this problem, i have 3 if's, one for if crit is above 17, one if crit is 1 for critical fails, and an if for anything in between. the problem is when i crit or critically fail, the if for the normal damage still goes. every time i try to stick an else or something in there, compiler shits a brick. Spoiler Alert, click show to read: oh ho ho fixed it. Last edited by Saban : 03-27-2008 at 07:16 PM. |
| | |
| | #85 (permalink) |
| Registered User Join Date: Jul 2002 Location: Los Angeles California
Posts: 228
+9 Internets | have you tried 'stepping through' to see what everything is doing, line by line? goto the 'if attack' line, hit f9, Run... it will stop there... just keep hitting f11 (or the 'step into' button) and go through it line by line. |
| | |
| | #90 (permalink) |
| Registered User Join Date: Dec 2003
Posts: 1,978
+15 Internets | Well, nothing really. It's just i find my code to be cleaner if i can call functions instead of having a really huge main(). So say i need to have a combat resolved, instead of copy/pasting the combat code i can just call a function that resolves it. |
| | |
![]() |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
| |