|
| | #16 (permalink) |
| Registered User Join Date: Jun 2005
Posts: 132
| I've tooled around with this for awhile and I think it's just about the coolest thing ever. I am working on a small simple rpg after work, but I think the art requirements are going to eventually crush me. I can build and rig characters but it takes me a long long time. I'll probably eventually get distracted and never finish this. I'm doing bsp based worlds so I can easily make maps with quake editing utils like QERadiant or whatever spits out a .map. Collision and pathfinding become super easy in a bsp environment. It's not really needed for rendering anymore but for gameplay stuff it's very handy. |
| | |
| | #18 (permalink) |
| Registered User Join Date: Jul 2002 Location: Los Angeles California
Posts: 188
| I've done the same... i have a TileMap engine built and am working on the simplest battle engine known to man, except I'm having problems with it >.< How would you consider doing your battle engine? Right now I have all the map data in static arrays in a MapName.cs (like Town.cs, Dungeon.cs, etc)... I have a few ideas but i've been looking at code all day fixing up the tile engine and commenting the hell out of it before i posted it on the net.. was just curious how you would go about doing it. BTW, if you wanted to see what i've done, the link is here: shackrpg - Google Code Keep in mind its my first "big" project, never programmed before in my life and learned less than a few months ago. If you have any tips or suggestions, i'd love to hear'em! |
| | |
| | #19 (permalink) | |
| Fueled by Red Bull Join Date: Oct 2002 Location: Not in fucking Acton, MA anymore!
Posts: 2,528
| Quote:
My battle system is currently a clusterfuck of bad code. I would never share it out of embarrassment lol. Going to refactor it heavily... but I don't think it will ever be what I want it to be. What issues are you haveing with the battle system? The largest issue I personally hit was dealing with the placement of menus, etc... got so sick of calculating shit out. | |
| | |
| | #20 (permalink) | |
| Registered User Join Date: Jul 2002 Location: Los Angeles California
Posts: 188
| Quote:
I know a lot of the map editors i've found use XML too, like Tiled and Mappy.as far as menu placement, I found a trick that I read in a book, setting up some unit tests for the method used to draw the menu sprites. I used it a lot when doing the main menu sprites, you can see it at the bottom of GameEngine.cs, just search for #region Unit Test. | |
| | |
| | #24 (permalink) |
| Registered User Join Date: Jun 2005
Posts: 132
| Cloud I sent you a link in private message. BTW I was always under the impression that you had to rely on the content pipeline on the xbox, but I was looking at the storage stuff and it looks like you can just load your own assets if you want. |
| | |
| | #25 (permalink) |
| Registered User Join Date: Jul 2002 Location: Los Angeles California
Posts: 188
| not true, there are a lot of programmers that dislike the XNA content pipeline. One of the books I got to learn how to program using XNA was from a guy named Benjamin Nitschke, (who worked on Arena wars if im not mistaken) and he hates the content pipeline for a lot of big projects because you have to re-compile your shit if you try to do something like load a new texture. I dont fully understand it all, but some people just like to build their own. Having said that, for games that we're making it works amazingly well because we're not loading 100's of MBs of textures / models / sounds / etc. |
| | |
| | #26 (permalink) | |
| Fueled by Red Bull Join Date: Oct 2002 Location: Not in fucking Acton, MA anymore!
Posts: 2,528
| Quote:
| |
| | |
| | #27 (permalink) | |
| Registered User Join Date: Jul 2002 Location: Los Angeles California
Posts: 188
| Quote:
I have all the rectangles where I want them, and it draws the sprites great... and I have done a ton of the logic in psudo code, i just need to actually write the code for it now. Its actually a great learning experience doing this, besides being really interesting and fun... When the entire battle engine is done and built, I'll post it on the google site, would love some feedback on it (how you guys would do things differently, etc) | |
| | |
| | #28 (permalink) | |
| Fueled by Red Bull Join Date: Oct 2002 Location: Not in fucking Acton, MA anymore!
Posts: 2,528
| Quote:
For example, one of the characters (one of the characters I personally designed) drains life with a large portion of his attacks. While his Katana is unsheathed (he wields a cane sword) the drained life is placed is stored in the sword. Upon sheathing the sword by defending his life is healed for the amount stored. He can also opt to use the stored life to power up special attacks etc... I have to program shit like that for 6 more characters -.- and thats by far the easiest one. | |
| | |
| | #29 (permalink) |
| Registered User Join Date: Jul 2002 Location: Los Angeles California
Posts: 188
| ... and you're putting all that in the battle engine? How are you doing that? My thought process would be to code the battle engine pretty standard, so you can add items like that all day and take some away.. or add properties to that sword later if you choose. Basically if the health drain was attached to the item, place a method in that items cs file, something like; Code:
I know i didn't explain that well, but thats how i'd try to code it... What are some other options? (trying to get a feel of getting many different solutions to problems, see things from other angles, u know? ) ![]() EDIT: Ok i think i have a better way of explaining what i was trying to say For example, in my battle engine I have a 3 public methods (Initialize, Update and Draw) what i would probably do ispublic void Update() { UpdateTimers(); // Updates the battle timers (can player attack yet, monster attack yet, any repeating environmental damage, haste / slow effects, etc UpdatePlayer(); // if player timer is expired, show players options, execute options, set timer, etc etc UpdateMonster(); // if MOBs timer is expired, let the MOB do their move, set monster timer, etc etc }//end Update then later on in UpdatePlayer(), when they swing their weapon do something like UpdatePlayer() { yadda yadda, other code here, do all this jazz... if (attack) { Swing weapon; check weapons OnSwing() method for any additional properties attached to weapon; apply those OnSwing() properties. If haste grant user haste for X rounds... if health leach, drain health while adding to you, etc etc. } } Last edited by Cloud9_ : 02-29-2008 at 09:51 PM. |
| | |
| | #30 (permalink) |
| Registered User Join Date: Aug 2002 Location: Paris
Posts: 326
| Seems like you are trying to hard code a lot of stuff Vinen. What you are trying to do could be defined as behavior for each character. This behavior could be an attribute of your Character class, and at each frame your game engine would iterate over all your Characters who would in turn process their behavior. You could have a BasicBehavior class which would be responsible for the basic behavior of a character during battle (whatever that it is you define as "basic"). That class would be the default behavior attribute of a character. And then you can have as many class as you want inheriting from BasicBehavior to implement more specific behaviors such as the one you explained. This way you can define as many behaviors as you want and change them whenever you want. You could also manage them through a BehaviorManager singleton class which would return an instance of a behavior class on demand. You could also define your behaviors in a way that allows a Character to have multiple behavior and process them all at each frame. There are a lot of ways to improve that idea ![]() When designing game mechanics like these, you should always try to think them as evolutive as possible. It saves a lot of work for later when you are trying to change stuff. |
| | |
![]() |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
| |