Bug Reports · Legacy archive
Step by step generator creation for personal use
-
Step by step generator creation for personal use
#1I am softly sliding into tech-land here and wondered if there would be any interest in articles describing the creation of generators in different programming languages?
I could provide this for:
-Visual Basic (.NET)
-C++ and Windows API /.NET (or even C or Java)
-javascript/html/php
Other possible project:
-The ultimate GM player online client
Including
*GM music tools
*Show map functionality
*Dice roller
*other stuff
-
Re: Step by step generator creation for personal use
#2I'd certainly be willing to read them, or even help. Especially that ultimate GM-Player client...That one sounds fun to make. Package it with my labyrinth generator and some other stuff, and we'd have a veritable GM Suite. Interesting...*ponders* -
Re: Step by step generator creation for personal use
#3BRING IT ON! -
Re: Step by step generator creation for personal use
#4Yes, please. -
Re: Step by step generator creation for personal use
#5:D
Will commence this project as soon as I am on top of things at work... And Chaosmark, yes. (re: your pm) -
Re: Step by step generator creation for personal use
#6Well, in response to AG's agreement to let me on the design team, I've been designing a one on one chat program to make a direct connection between a GM and a Player, for inclusion within the Ultimate GM Suite. I can also make a simple dice-rolling program as well, which falls under both the Suite AND the generator.
However, would you guys want just general open source generator code, or the actual dice-rolling code, or both? I can include just about anything you want within my VB6 guide. Remember, it's all for you guys, so tell me what you want. -
Re: Step by step generator creation for personal use
#7I was thinking along the lines of an article with commented code and step by step instructions. It sounds great Chaosmark. What you want to include should be enough information for an inexperienced user to replicate your programming effort. That would also require info about the IDE (Integrated Development Environment, Visual Studio 6 in your case) and the compiler (VB6). -
Re: Step by step generator creation for personal use
#8I'd just like to note that I have started writing said article, as well as the coding for it. Because of certain timings, I'll have alot of time to work on it over this weekend, and so I should have it finished by next week. I'm currently working on an open source dice-roller, and of course I'll set up a compiled version for all the Strolenites that wish to test it out for themselves.
But for those that want to make their own/see the coding and don't have VB6, I'll be providing the entire code in my article.
One final thing AG: are we going to be using this thread to post the final products, or are we setting up another thread? Or are we going to make a subset of your page to hold it all? -
Re: Step by step generator creation for personal use
#9I am making the GM client server now... As I am working with COM and ATL it will be a Microsoft C++ thang. My time is severely and acutely limited, however, and I surely cannot promise anything so soon.
As for the use of this thread... Why not?
We can move it later ;) -
Re: Step by step generator creation for personal use
#10This poor topic has been lying around dead for a while. I myself haven't had much chance to work on it, and I'm sure AG hasn't either. So, I think it'd be good to test the waters, especially since I've come up with another good idea for GM software.
Quick round up of the planned stuff (and who was last known to be working on it):
*Some sort of chat client to allow a player and a GM to communicate. (AG)
**Will this allow more than a one on one conversation?
**If so, will this client have suitable options for actually RPing live over chat?
*Dice roller (CM)
**How high should we let the dice sides/count go before cutting it off? I'm forseeing some poor GM not paying attention to what he's doing and overloading his CPU with a massive random number generation.
*Random Labyrinth Generator (CM)
**I've got some of the conception out of the way, but my one prior attempt to code it failed miserably, and so I've set it on the back burner for a time.
*Music tools (not assigned, presumably AG was working on this)
**What file formats are we planning on supporting?
**Will there be playlists available, and will there be a save/load functionality to it?
And since this is something we didn't clarify earlier, I've got a few questions: What platforms are we going to be releasing this suite for? Just Windows, and let those willing port it once they have the source code? Also, what license are we going to use for it: BSD, LGPL, GPL, etc.? And furthermore (this isn't an issue for me), since you (AG) code professionally, are you currently under a contract that would allow your employers any sort of claim to the code you contribute to this project? That has been an issue in the past with professional coders.
...And now that I've got all that out of the way, I shall invoke my (hypothetical) power as co-creator to propose an application that will allow you to keep a good record of your creatures, and perhaps more than just creatures if others wish for it. Anyone willing to give this a 'thumbs-up, I'd use it'?
Things to record would include:
*Name
*Species
*Origin
*Sex
*Abilities
*Appearance
*History
*Anything else relevant
Anyone else care for this? -
Re: Step by step generator creation for personal use
#11*raises hand* Dude, totally. And not just for RPG stuff, this sounds like it could be useful for my fictional efforts as well. -
RollDice()
#12Introducing, the Dice Rolling function! Yes folks, that's right, the Dice Rolling function is the key to rolling any sort of dice within the GM Suite! Get it right now, for the low, low price of...
*ahem* Sorry about that. I got a little carried away.
I have here a bit of code that should be saved as a C++ Header file (.h) that has one function in it, RollDice. Why didn't I compile it into a program you ask? Well, that's because by doing it this way, we now have a function that can simply be included with any piece of software that needs dice rolling capabilities. But beyond that, if all you wanted was a dice roller, there are plenty of those out on the net. Just Google it for pete's sake. (Oh, and because the Citadel doesn't allow for .exe uploads. If anyone really wants a compiled executable dice roller, I'll upload one to RapidShare or some such place.)
As with the majority of my source code, I commented extensively, so even someone with no clue about C++ should be able to follow the process. If you see something wrong, please tell me, otherwise it probably won't get fixed.
// Coded by Joe Ciskey, July 2006
// A very simple dice roller function
// that allows for input of range (number of sides)
// and number (how many dice), then outputs the rolls
#Ifndef DiceRoller_H //Checks to see if the header has already been defined
#define DiceRoller_H //If not, defines DiceRoller_H so that it won't duplicate
#include //Gives us the rand() and srand() functions
#include //Gives us time function and time_t data type
using namespace std;
int RollDice(int numDice, int numSides) //Main function has two arguments:
{ //number of dice, and number of sides
int total; //Sets up a variable to hold the overall total
time_t seconds = time(NULL); //Generates us a random seed for rand
srand((unsigned int) seconds); //Converts seconds to an unsigned int
//and seeds our rand() function with it
for(int i = 1; i < numDice; i++) //Loops so that all the dice are rolled
{
total = total + ((rand() %numSides) + 1); //Generates a total for us
} //End of Loop i
return total; //Returns the total of the dice rolled
} //End RollDice()
#endif