RPGDXThe center of Indie-RPG gaming
Not logged in. [log in] [register]
 
 
Post new topic Reply to topic Goto page 1, 2  Next 
View previous topic - View next topic  
Author Message
ManaTroph
Monkey-Butler


Joined: 14 Nov 2007
Posts: 57

PostPosted: Thu Feb 28, 2008 3:18 pm    Post subject: combat system blues... [quote]

over the course of the past couple of weeks i have been working hard on the combat system for my first serious rpg. This week i've been working on adding a simple spell system to combat. unfortunately it has not been going well. yesterday i broke my combat system... not a clue what went wrong, since all of the code seems to be in order. with the way i've been coding things the combat / spell system has just gotten too convaluded. if i had not broke the program and continued the way i was going it would've got so complicated that if something went wrong it would've been almost imposible to fix. which is fine since i've been thinking about redoing the whole combat and spell system. I really need to simplify things. of course it will require a lot of rewriting, rearanging, and adding code.

i guess i've fallen into a trap all too common when a programmer does thier first big project. and by that i mean not taking the extra time in the first stages of programming a new system or subsystem of a game. by putting the extra time in begining a part of the program i can save myself a ton of time later. i guess i shoul've expected this to happen, since the scope of this project goes well beyond that of anything i have done before. though i thought i was using good practices for game programming, i guess i got a tad over zealous, and forgot to slow down and plan things out a little more.

if anyone has any tips regarding doing that first big project, i would certainly apreciate any sugestions i can get at this point.
_________________
Life is what happens while you're waiting for the stress to subside...
Back to top  
Hajo
Demon Hunter


Joined: 30 Sep 2003
Posts: 779
Location: Between chair and keyboard.

PostPosted: Thu Feb 28, 2008 3:41 pm    Post subject: [quote]

I can only give a few hints, maybe it's too detailed for a game, though:

1) Write a requirements document first, listing all the features of the game (Answering the question: "What?")

2) Write a specification, which describes how the features will work (Answering the question: "How?")

3) Try to group the features into modules, subsystems, libraries. Define their responsibilities, limits and the interfaces between them, and how they will interact.

4) Implement them.

You can go through these steps several times, refining and extending what you created previously. But at the start you should have a somewhat precise idea about (1) and (2) otherwise projects tend to loose structures or develop bad structures and you will spend much time on redoing (3) and (4) each iteration.

Note 1:

My impression is that code erodes. The first implemtation usually is clean, each expansion erodes the structure a bit. It requires effort to keep up good code quality.

Note 2:

Many hobby programmers do 1 and 2, also 3 in their heads, and don't write it down. This works up to a certain size of project, and while you work alone. With bigger projects and a team, it helps to have it written down.

Note 3:

If you write, try to keep it short and precise. It shall help, not hinder you.
Back to top  
toturi
Pretty, Pretty Fairy Princess


Joined: 09 Feb 2008
Posts: 9

PostPosted: Fri Feb 29, 2008 7:37 am    Post subject: [quote]

I'm surprised that revision control isn't discussed much, if at all, on these forums.

I used Visual Source Safe and CVS for years and now use Subversion almost exclusively (gotta break out the VSS client every once in a while to examine old repositories you know).

Please, look up Subversion and learn to install and use it locally or search for free Subversion repository hosting sites (there are many).

Once you get used to using a revision control system, you'll wonder how you ever wrote code without it.

In fact, I guarantee you'll never "break" your code again.

Hmm, that sounds almost like a sales pitch...
Back to top  
Hajo
Demon Hunter


Joined: 30 Sep 2003
Posts: 779
Location: Between chair and keyboard.

PostPosted: Fri Feb 29, 2008 9:45 am    Post subject: [quote]

Maybe version control is considered to be quite standard so it's not mentioned that often? I mean all projects on Sourceforge have it anyways, and most programmers should be used to it.

So no need to discuss it much ;)
Back to top  
ManaTroph
Monkey-Butler


Joined: 14 Nov 2007
Posts: 57

PostPosted: Fri Feb 29, 2008 2:19 pm    Post subject: [quote]

revision controll system huh? I'll definately have to look into that. so subversion, is that free? and if so can i use it in conjunction with dev c++?
_________________
Life is what happens while you're waiting for the stress to subside...
Back to top  
Hajo
Demon Hunter


Joined: 30 Sep 2003
Posts: 779
Location: Between chair and keyboard.

PostPosted: Fri Feb 29, 2008 3:12 pm    Post subject: [quote]

Free and open source:

http://subversion.tigris.org/

I still like CVS but only because I grew up with that. SVN is better.

More info:

http://en.wikipedia.org/wiki/Subversion_%28software%29
Back to top  
Mattias Gustavsson
Mage


Joined: 10 Nov 2007
Posts: 457
Location: Royal Leamington Spa, UK

PostPosted: Fri Feb 29, 2008 4:32 pm    Post subject: [quote]

I don't bother with version control anymore, I just keep a few backups (Second Copy) on an external HD.
_________________
www.mattiasgustavsson.com - My blog
www.rivtind.com - My Fantasy world and isometric RPG engine
www.pixieuniversity.com - Software 2D Game Engine
Back to top  
DeveloperX
202192397


Joined: 04 May 2003
Posts: 1626
Location: Decatur, IL, USA

PostPosted: Fri Feb 29, 2008 5:01 pm    Post subject: [quote]

I have never used any source control services.

I just zip/tar.gz/rar/7z (archive) my project folder and give it a timestamped filename and burn it to a rewritable CD. until the dics is full then it gets burned to a mastered CD.

This method has been working for me for 2 years now, and I see no reason to change.
_________________
Principal Software Architect
Rambling Indie Games, LLC

See my professional portfolio
Back to top  
cowgod
Wandering Minstrel


Joined: 22 Nov 2005
Posts: 114
Location: Pittsburgh, USA

PostPosted: Fri Feb 29, 2008 7:34 pm    Post subject: [quote]

DeveloperX wrote:
I have never used any source control services.

I just zip/tar.gz/rar/7z (archive) my project folder and give it a timestamped filename and burn it to a rewritable CD. until the dics is full then it gets burned to a mastered CD.

This method has been working for me for 2 years now, and I see no reason to change.

I've been doing the same thing on my current project and the last one. I have a backup task with Ant that does the work for me.

One problem I had was that the music files are so huge that the zip files were taking up too much space. Since the music files stay the same for pretty much the whole project once they're added, I just didn't include them in the zips on this project. It makes a real difference when you have 100 or more backup zip files.

I tried to write my own sort of simple CVS program, but it was too buggy to use. Just not backing up the music is alot easier.
Back to top  
DeveloperX
202192397


Joined: 04 May 2003
Posts: 1626
Location: Decatur, IL, USA

PostPosted: Fri Feb 29, 2008 9:55 pm    Post subject: [quote]

I typically don't include the content files with the source.
I make backups of the content separately if and when it changes.

That way my project backups are almost always less than 1MB each, and there are only 1 or 2 content backups (nearly never change the content. My work is usually from a placeholder content file to the final content file.

This works out quite well.
_________________
Principal Software Architect
Rambling Indie Games, LLC

See my professional portfolio
Back to top  
ManaTroph
Monkey-Butler


Joined: 14 Nov 2007
Posts: 57

PostPosted: Sat Mar 01, 2008 1:24 am    Post subject: [quote]

i've been doing the backup thing myself, but this was a problem that would've kept getting worse. so it had to be addressed now at this time. had i just gone back a version or two instead it would've just ended up in a similar state again eventually. i've been thinking as well of storing my program components in seperate modules. it just means i'll be a lot more carefull from now on, regardless of the method i use.
_________________
Life is what happens while you're waiting for the stress to subside...
Back to top  
Rainer Deyke
Demon Hunter


Joined: 05 Jun 2002
Posts: 672

PostPosted: Sat Mar 01, 2008 3:49 am    Post subject: [quote]

The advantages of a real revision control system include finer granularity and deeper history. I can make ten or more check-ins per day, yet my revision control history goes back years. And because I never touch the actual files in the repository, there's no danger of accidentally deleting my backups. And if something breaks, I can easily check the differences between my the current state of the project and the last known working revision.

In short, I don't think manual zip backups are a valid substitute for a real revision control system like subversion. (Of course, my subversion repository itself is backed up across several computers to protect against disk failure.)
Back to top  
toturi
Pretty, Pretty Fairy Princess


Joined: 09 Feb 2008
Posts: 9

PostPosted: Sat Mar 01, 2008 7:14 am    Post subject: [quote]

I'm constantly amazed at how some people who are normally very detail-oriented and thoroughly nit-picky can be so nonchalant about revision control.

I brought it up because revision control systems are designed to prevent exactly what happened to the OP: protect you from making changes that irreparably damage your work.

I'm going to stop here or this will just turn into a rant.

Thanks, Rainer, for pointing out just a few of the reasons to use revision control.
Back to top  
Mattias Gustavsson
Mage


Joined: 10 Nov 2007
Posts: 457
Location: Royal Leamington Spa, UK

PostPosted: Sat Mar 01, 2008 8:32 am    Post subject: [quote]

Revision control can be very useful, especially if more than one person is working with the same code.

I think the point we were trying to make is that it is good to have some sort of system (preferably automated) to back up your work. Some prefer revision control systems, others prefer other ways of doing it.

Personally, I don't need to go back to old versions of my files. I never did it back when I was using source control, so that's part of the reason I stopped using it.

But the important thing is to make sure you make regular backups of your code.
_________________
www.mattiasgustavsson.com - My blog
www.rivtind.com - My Fantasy world and isometric RPG engine
www.pixieuniversity.com - Software 2D Game Engine
Back to top  
DeveloperX
202192397


Joined: 04 May 2003
Posts: 1626
Location: Decatur, IL, USA

PostPosted: Sat Mar 01, 2008 11:21 am    Post subject: [quote]

I agree with Mattias on this.
While its not important if you use one method or another, it is just important that you do have some method of keeping track of your project.

And to ManaTroph;

I'm not sure what language you are using, but if it is c++ I can offer some tips for keeping your code structured and organized.
If you would like to talk more about it, PM me. or chat me up in the chat room.
_________________
Principal Software Architect
Rambling Indie Games, LLC

See my professional portfolio
Back to top  
Post new topic Reply to topic Page 1 of 2 All times are GMT
Goto page 1, 2  Next 



Display posts from previous:   
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum