Need Partners (D&D fan preferably)

This is a discussion on Need Partners (D&D fan preferably) within the Game Programming forums, part of the General Programming Boards category; ...or the simple property syntax in C# (which also exists in Visual C++ btw, Microsoft's version of C++): What? Properties ...

  1. #31
    Super Moderator VirtualAce's Avatar
    Join Date
    Aug 2001
    Posts
    9,596
    ...or the simple property syntax in C# (which also exists in Visual C++ btw, Microsoft's version of C++):
    What? Properties in C++? Please do tell. Or were you saying that C# exists in VC++ b/c that statement is just as incorrect. C# exists in Microsoft Visual Studio. If you are saying the property syntax exists in C++ .NET that is a different story than just C++. Also C# also is no longer owned by Microsoft since they handed it over to ECMA for standardization.
    Last edited by VirtualAce; 10-28-2008 at 05:32 PM.

  2. #32
    Dae
    Dae is offline
    Deprecated Dae's Avatar
    Join Date
    Oct 2004
    Location
    Canada
    Posts
    1,034
    Quote Originally Posted by Bubba View Post
    What? Properties in C++? Please do tell. Or were you saying that C# exists in VC++ b/c that statement is just as incorrect. C# exists in Microsoft Visual Studio. If you are saying the property syntax exists in C++ .NET that is a different story than just C++. Also C# also is no longer owned by Microsoft since they handed it over to ECMA for standardization.
    I'm saying Microsoft's C++ compiler has some alterations (compared to GCC) that allow for "properties" as we know them.

    http://blogs.msdn.com/ericflee/archi...ties-in-c.aspx

    Pretty sure I've seen better get/set C++ examples in the MSDN docs. A tad messy, but none-the-less VC++ has some interesting differences/extensions from standard C++. I'd prefer it was all standardized though. Would be cool if Window's kernal was designed more like Unix, in regards to sockets, threads, etc. and used POSIX. Then ditch Microsoft's compiler, win32, and cross-compatibility and standardization would be a whole lot less messy.
    Last edited by Dae; 10-28-2008 at 08:21 PM.
    Warning: Have doubt in anything I post.

    GCC 4.5, Boost 1.40, Code::Blocks 8.02, Ubuntu 9.10 010001000110000101100101

  3. #33
    C++まいる!Cをこわせ! Elysia's Avatar
    Join Date
    Oct 2007
    Posts
    22,583
    Wow! Never knew there was such a thing. It really stings that it is not standardized but... oh well. Still, I am already loving this.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  4. #34
    Registered User C_ntua's Avatar
    Join Date
    Jun 2008
    Posts
    1,853
    Oh, this is still active? I forgot about it :P

    Well, I want to inform that I am in a good point in my program. I almost finished the whole game mechanic. I haven't added classes and feats yet, so I am not 100% sure everything will work. I don't plan the whole thing. I just make code and hopes it works (bad practice, but planning something non-profitable is bad practice also...)

    So, in a few days I believe I will post a code that works. It will let you create a game, place the characters. The characters will be able to equip basic weapons and armory. And they will have races but not classes yet. No feats yet and the terrain/hiding system is not yet fully supported. Only cover...

    I put some minor rules in the game, that differ from the original. Doesn't change the game experience, I just had to decide somethings:
    1) You move with the arrows. No going back. If your characters moves he moved
    2) Every distance is measured vertically/horizontally. No diagonals. Counting a diagonal space as 1 square is wrong in 4th. The 0.5 square of 3E was better. You can still attack 1 square diagonally though, for character to have more control.
    3) You have two ways of targeting. Target a character you see, or manually choose a square and hope you hit something. As for attacking yourself. Well, why note? It helps me debug :P. But, generally I will let everybody do whatever they want, as long as it is legal. Of course, when an ally passes from an adjacent space you won't be able to make an attack of opportunity. But you can target him with your own powers if you want.
    4) A more serious decision is when do you lose your action. Generally when you do something you will lose your action (standard,move or minor), like targeting a character out of range, using ranged attack with a melee weapon. If though, you cannot see a square you won't lose action targeting it. Generally the rule is whatever the character can do, he can do.
    5) There are no squares :P I ll admit I didn't put them because I don't know which control to use. There has to be a table... The characters DO move and target squares, they are just not visible to the user. I actually liked the idea. It is more realistic. Characters cannot count distance that accurately. So you can target a fireball but maybe miss 1 of the 10 enemies you wanted to burn. You will know if somebody is 5 squares away but not that accurately if he is 40 squares away.
    7) You will choose your close blast area by selecting an adjacent square and a direction. The origin space will be one corner and the direction will determine the upper corner. Not sure this is the best method. If it is an area blast, you will choose with the mouse the origin square and with the keyboard the direction. The wall will be utilized by selecting one-by-one the squares with the arrows.
    8) Some minor things that might not work exactly as the rules.
    9) Characters invisible will be invisible for the opponent. I will make them blink when you "notice" them but not see them.

    That is all. When I am done with the main game some effects can be added and generally make the game more nice.

    As for better graphics, Dae, we can think about that after everything else is finished. The code is not much depended on the existing graphics. It just uses some PictureBoxes for the characters and changes there location and disables them/changes color if the character dies.

    Yeah, the board shouldn't resize. But that is up to the user. It handles what it needs to handle to work proberly when the board moves.

    As a final note I want to say that making a game is MUCH harder than I though. There are a lot small details in D&D that make it easy to mess up. Now I understand why games like Neverwinter Nights have SO many bugs when it comes to the game mechanics. Though they and only they are to blame...

    At last, I would STILL like some help with the code. But not now. I will make every game mechanic ready and bug-less (hahaha..bug-less...HAHAHA) and then it will be fairly easy to people to add feats and powers. And in the end monsters. If somebody is interested now he can add classes, which will be a bit more challenging, but won't require to know everything int the code either.

    I ll post the game when it is ready, after I do some testing. Hopefully you will play it and tell me some bugs I missed.
    Last edited by C_ntua; 11-02-2008 at 06:42 PM.

  5. #35
    Registered User C_ntua's Avatar
    Join Date
    Jun 2008
    Posts
    1,853
    Also, I want to note that I actually use get/set now a lot (thanks for the advise). They were a lifesaver, because I actually had to check and change somethings for example when somebody modifies somebody else's Hit Points. Like check if he died, if he is bloodied etc etc. Or change the maximum HP when the CON changes and things like that. And some more polymorphism which was essential. As for delegates, they are really usefull

    Also, I have this.One character class and races that derive from them. How should I make the character classes? They could be functions that change a character, but I would prefer if they where classes, but I cannot think of a possible way. Of course I could make a character class class for every race...
    Last edited by C_ntua; 11-02-2008 at 06:57 PM.

  6. #36
    C++まいる!Cをこわせ! Elysia's Avatar
    Join Date
    Oct 2007
    Posts
    22,583
    Quote Originally Posted by C_ntua View Post
    Also, I want to note that I actually use get/set now a lot (thanks for the advise). They were a lifesaver, because I actually had to check and change somethings for example when somebody modifies somebody else's Hit Points. Like check if he died, if he is bloodied etc etc. Or change the maximum HP when the CON changes and things like that. And some more polymorphism which was essential. As for delegates, they are really usefull...
    That is why we have get/set! So of course they are very useful
    Also, I think you are jumping too far ahead of yourself. You should probably work out the classes and design them before you move, because there is nothing worse than if you see that the current framework or structure you have does not work and have to redo it.
    Start with a good basic structure and evolve it from there!

    And as they all say... take it easy and do it in steps and thoroughly test it before moving on, and you will not get so much headaches (oh, how I know those ones!)...
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  7. #37
    Registered User C_ntua's Avatar
    Join Date
    Jun 2008
    Posts
    1,853
    Good advise, but too late now :P

    I have finished creating the game with races and (some) weapons. How to use:
    1) Rename the files without the .txt. One is a .rar that has everything and the other is the .exe file
    2) There are a few files. In the "Form1" file there is a function called "test". There you can create the game as you like.
    3) You move with the arrows and stop your movement with the space. You can shift your character by pressing "s" and then move with arrows.
    4) Basically when you have to choose a square you place your mouse somewhere and press <Enter> and the appropriate button is pressed.
    5) You enter strings, like when you select your name, in the right textbox. The bottom textbox shows what happens to the game.

    Please test the game and tell whatever bugs there are. Haven't tested it a lot, it works on some simple scenarios (except some errors in calculations).

    Thanx for your time!
    Attached Files Attached Files

  8. #38
    Dae
    Dae is offline
    Deprecated Dae's Avatar
    Join Date
    Oct 2004
    Location
    Canada
    Posts
    1,034
    Yikes, just came back from a crash. Thought Firefox was frozen, but found dd.exe consuming 100&#37; cpu. It's not exiting properly, there was 2 running. (I ran it twice because it doesn't seem to work- just keeps saying player is off the board or something).
    Warning: Have doubt in anything I post.

    GCC 4.5, Boost 1.40, Code::Blocks 8.02, Ubuntu 9.10 010001000110000101100101

  9. #39
    Registered User
    Join Date
    Nov 2005
    Posts
    673
    I had the same problem. I couldn't get it to create a character, and doesn't exit properly.

  10. #40
    Registered User C_ntua's Avatar
    Join Date
    Jun 2008
    Posts
    1,853
    Hmm. Is there a way to make it exit properly? Except of handling every possible exception that is...
    I am making at the moment a character creation screen because the old one was just... awful. Sorry, should have made this first so it will be easier for people to start the game. I ll finish it and post the code here and on the "Post your games here..." section.

    Now, you will be able to create a simple character normally on a character sheet (nothing fancy though)

  11. #41
    Registered User
    Join Date
    Nov 2005
    Posts
    673
    Im not very good at C# but, my assumption is you are handling the exit event wrong for the window.

    You could force exit.
    Can I possibly get the code from you, and I can look through it and see if I can find the error.

  12. #42
    Registered User C_ntua's Avatar
    Join Date
    Jun 2008
    Posts
    1,853
    OK, done for now.
    1) You should be able to create simply a creature now. Here are some quick instructions just in case:
    -- MAX PLAYERS 3! (even though technically I say 4. So 2 vs 1 is acceptable but not 2 vs 2)
    --In the beginning, you enter number of teams, for each team a name and number of players.
    --After that the tab should change and you should go to the character sheet. Note: the character is initialized by selecting a Race!
    2) After you are done creating all characters (saved with the Save button) and placing each one of them on the board, you will go to the arena tab and fight to death.
    --You should be able to change tabs and view the current character.
    --You can change/equip weapons by Actions-->Simple-->Switch weapons. You currently have a longsword and longbow to check both Basic Melee and Basic Ranged At-will powers/actions.
    --You have to press End Turn to end a turn. If the player playing is unconious this wil be done automatically.
    --The game ends when only one pawn is alive. Dead pawns should be white/grey. Unconcious ones pink (though this might not work).

    Enjoy and again report bugs. You should be able to finish a normal game. Also, tell me generally if you like it or not

    Note for existing bugs:
    1) Maybe you couldn't create a player because of my crappy character creation system. Try again now
    2) Well, I don't handle exit at all :P. It stacks on a while-loop. Well, that natural in a way, meaning it has a serious bug. My apologies

    I ll post the .exe file only this time
    Attached Files Attached Files

  13. #43
    Registered User
    Join Date
    Nov 2005
    Posts
    673
    Then it is probably a error in your while loop. If you are willing, I am willing to look over it for you. It is probably a simple mistake that we all make at one time or another. I am free for the next 3 hours, but after that gotta go to work.

  14. #44
    Registered User C_ntua's Avatar
    Join Date
    Jun 2008
    Posts
    1,853
    OK, i ll post the code. But it has changed since last time, so maybe the error has been fixed. here is the whole project in VS-08
    Attached Files Attached Files

  15. #45
    Registered User C_ntua's Avatar
    Join Date
    Jun 2008
    Posts
    1,853
    OK. Now the game with all classes with their basic powers and abilities. Also featuring weapon and armors. The basic core game is ready, except from the whole "seeing" system, which is half-ready. Need to test the game as it is and add the rest of the 1-2 level powers. And feats.

    I give again the entire solution and the exe file (in .txt so rename). Report any bugs please and tell me how much you like it
    Attached Files Attached Files

Page 3 of 3 FirstFirst 123
Popular pages Recent additions subscribe to a feed

Similar Threads

  1. [Hardware + Software][C++ or C#] USB Fan
    By Mywk in forum C++ Programming
    Replies: 16
    Last Post: 07-04-2009, 03:12 PM
  2. What is the fan size?
    By adr in forum A Brief History of Cprogramming.com
    Replies: 6
    Last Post: 12-06-2007, 02:21 PM
  3. Computer Fan question
    By the dead tree in forum Tech Board
    Replies: 2
    Last Post: 12-28-2005, 03:16 PM
  4. Stress Test: Graphics/CPU intense
    By RoD in forum Tech Board
    Replies: 90
    Last Post: 01-19-2003, 12:20 PM
  5. P4 Fan problem: Urgent
    By RoD in forum Tech Board
    Replies: 5
    Last Post: 01-15-2003, 11:12 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21