View previous topic - View next topic |
Author |
Message |
RedSlash Mage
Joined: 12 May 2005 Posts: 331
|
Posted: Tue Feb 20, 2007 5:35 am Post subject: |
[quote] |
|
Nice characters! I like their expressions. Looking forward to the games.
|
|
Back to top |
|
|
Rainer Deyke Demon Hunter
Joined: 05 Jun 2002 Posts: 672
|
Posted: Thu Feb 22, 2007 12:23 am Post subject: |
[quote] |
|
I am withdrawing from the contest.
What I have right now is playable, but it isn't fun, the plot isn't working, it doesn't really fit the theme of the contest, and I have found several major design flaws in the engine. None of these problems are insurmountable, but I would have to work very hard in my remaining time, and at this point I just don't care anymore. What I really want to do is work on another project entirely, so that's just what I'm going to do.
I do intend to eventually fix the problems in my engine and use it to write a real game. But not this month, and not for this contest.
|
|
Back to top |
|
|
Terry Spectral Form
Joined: 16 Jun 2002 Posts: 798 Location: Dublin, Ireland
|
Posted: Thu Feb 22, 2007 12:31 am Post subject: |
[quote] |
|
If you've lost interest, then you've lost interest; that's fair enough. But I've got a feeling that you're being a little hard on yourself. Why don't you sleep on it before you make a decision? There's only a week left, after all.
Sorry, that's the best I can manage for encouragement at the moment... I'm not feeling too positive about my entry either :( _________________ http://www.distractionware.com
|
|
Back to top |
|
|
tunginobi Wandering Minstrel
Joined: 13 Dec 2005 Posts: 91
|
Posted: Thu Feb 22, 2007 10:19 am Post subject: |
[quote] |
|
Noooooooo!!!
Well, couldn't you release what you have for the compo anyway? I'd be happier with a buggy engine demo that goes nowhere and contains little to no gameplay than nothing.
Plz?
|
|
Back to top |
|
|
DeveloperX 202192397
Joined: 04 May 2003 Posts: 1626 Location: Decatur, IL, USA
|
Posted: Thu Feb 22, 2007 2:37 pm Post subject: |
[quote] |
|
We've hit a bit of a snag....the internet is down in Darkstarbane's area, and he cannot get online to download/upload files for the project.
The only time he gets a chance to get online, is when he's at work, which is making finishing our entry reaaly difficult.
I've been beating my brains out trying to figure out a nice clean method to produce "properly word-wrapped" output for my storyline.......and well, have not been able to get it to work correctly.
If anyone thats obviously got more experience could/would lend a hand, it would be most appreciated.
My idea was this:
store each story segment in a single std::string and pass it to a PRESENTER class instance, that has a method called present() which takes an int for the milliseconds time-delay for the output to be printed, and an int for the number of characters to limit each row to.
so, something like
Code: |
std::string strStory = getFileContents("story0.txt");
PRESENTER* kStory = new PRESENTER;
kStory->setContent (strStory);
kStory->present (500, 70);
...
delete kStory;
|
I want the present() method to display 1 character of the string every 500 milliseconds (the time-delay) and wrap each line within the character-limit given (70) without breaking words.
so you don't get this:
there was a storm las
tnight.
you would get this:
there was a storm
lastnight.
ok well, yeah theres my problem. I'm all out of ideas to get it to work, so........yeah. *yawns* freakin 30 hours...still cannot figure it out. goodnight. _________________ Principal Software Architect
Rambling Indie Games, LLC
See my professional portfolio
|
|
Back to top |
|
|
Ninkazu Demon Hunter
Joined: 08 Aug 2002 Posts: 945 Location: Location:
|
Posted: Thu Feb 22, 2007 4:00 pm Post subject: |
[quote] |
|
I'm going to use char* strings because I regrettably don't know std::string off the top of my head and don't want to load up MSDN.
This is my solution which uses indices that point to where each line begins, where we are in the string and how many strings we've drawn so far. I'm not gonna mess with delays or dynamic allocation to keep it simple.
Code: | class CPresenter {
private:
char szString[MAX_LENGTH];
int stringLength; //don't do strlen every time
int indices[MAX_LINES];
int currentChar; //where in the current line
int currentLine; //which line are we on
int absoluteChar; //where in the string are we
bool done; //did we finish the string
CPresenter():szString(NULL),currentChar(0),currentLine(0),stringLength(0),absoluteChar(0) { }
void setContent(char *pContent) {
//beware buffer overflow
strcpy(szString, pContent);
stringLength = (int)strlen(szString);
};
void present(int lineLength) {
if(done) //just draw the lines and return
if(currentChar == 0 && szString[lineLength-1] != ' ') {
for(int k = lineLength-2; k >= 0; k--) {
if(szString[k] == ' ') {
szString[k] = 0; //break the string here
indices[currentLine] = k+1;
break;
}
}
//draw the full strings
int sum = 0;
for(int k = 0; k < currentLine; k++) {
drawString(szString+indices[k]+sum);
sum += indices[k];
}
char savedChar = szString[sum + currentChar+1];
szString[sum + currentChar + 1] = 0; //null terminate to draw
drawString(szString + sum);
szString[sum + currentChar + 1] = savedChar;
absoluteChar++;
currentChar++;
if(absoluteChar == stringLength) done = true;
else if(currentChar == indices[currentLine]-1) {
currentLine++;
currentChar = 0;
}
}
}
|
I haven't tried the code, but it seems pretty straightforward.
Save the time it updates and return if time + delay is greater than the current time. Don't use Sleep(delay) or anything like that.
Also, this is ugly. Make it nicer. I'm just in class right now..
|
|
Back to top |
|
|
Nodtveidt Demon Hunter
Joined: 11 Nov 2002 Posts: 786 Location: Camuy, PR
|
Posted: Thu Feb 22, 2007 8:39 pm Post subject: |
[quote] |
|
Unfortunately, I have to drop out as well. This morning, my wife had a miscarraige, and tonight she's going to be admitted to the hospital for a morning D&C operation. She'll be out for at least a week, so in the meantime, I'll be doing the workload by myself, which means absolutely no free time for me. _________________ If you play a Microsoft CD backwards you can hear demonic voices. The scary part is that if you play it forwards it installs Windows. - wallace
|
|
Back to top |
|
|
DeveloperX 202192397
Joined: 04 May 2003 Posts: 1626 Location: Decatur, IL, USA
|
Posted: Thu Feb 22, 2007 9:00 pm Post subject: |
[quote] |
|
nodtveidt wrote: | Unfortunately, I have to drop out as well. This morning, my wife had a miscarraige, and tonight she's going to be admitted to the hospital for a morning D&C operation. She'll be out for at least a week, so in the meantime, I'll be doing the workload by myself, which means absolutely no free time for me. |
Oh shit. Man I'm sorry to hear about your wife. I hope she's alright.
Take care man. _________________ Principal Software Architect
Rambling Indie Games, LLC
See my professional portfolio
|
|
Back to top |
|
|
DeveloperX 202192397
Joined: 04 May 2003 Posts: 1626 Location: Decatur, IL, USA
|
Posted: Thu Feb 22, 2007 9:24 pm Post subject: |
[quote] |
|
Ninkazu wrote: | I'm going to use char* strings because I regrettably don't know std::string off the top of my head and don't want to load up MSDN.
This is my solution which uses indices that point to where each line begins, where we are in the string and how many strings we've drawn so far. I'm not gonna mess with delays or dynamic allocation to keep it simple.
I haven't tried the code, but it seems pretty straightforward.
Save the time it updates and return if time + delay is greater than the current time. Don't use Sleep(delay) or anything like that.
Also, this is ugly. Make it nicer. I'm just in class right now.. |
Uhm.....yeah, thanks for trying......that don't work at all. and I don't follow the logic behind what you tried to do. _________________ Principal Software Architect
Rambling Indie Games, LLC
See my professional portfolio
|
|
Back to top |
|
|
Terry Spectral Form
Joined: 16 Jun 2002 Posts: 798 Location: Dublin, Ireland
|
Posted: Thu Feb 22, 2007 10:39 pm Post subject: |
[quote] |
|
nodtveidt wrote: | Unfortunately, I have to drop out as well. This morning, my wife had a miscarraige, and tonight she's going to be admitted to the hospital for a morning D&C operation. She'll be out for at least a week, so in the meantime, I'll be doing the workload by myself, which means absolutely no free time for me. |
Oh, no - I don't know what to say. I'm really sorry for your news. _________________ http://www.distractionware.com
|
|
Back to top |
|
|
Terry Spectral Form
Joined: 16 Jun 2002 Posts: 798 Location: Dublin, Ireland
|
Posted: Thu Feb 22, 2007 10:48 pm Post subject: |
[quote] |
|
I made a new sprite today. This is one of my main characters, Crystalus.
[edit: btw, thanks Redslash :)] _________________ http://www.distractionware.com
|
|
Back to top |
|
|
Ninkazu Demon Hunter
Joined: 08 Aug 2002 Posts: 945 Location: Location:
|
Posted: Thu Feb 22, 2007 11:35 pm Post subject: |
[quote] |
|
DeveloperX wrote: | Uhm.....yeah, thanks for trying......that don't work at all. and I don't follow the logic behind what you tried to do. |
The logic is thus (and sorry it didn't work right out of my head):
If at the length of the line you want to type there isn't a space character, march backwards until a space is found. Break the string at that point so when you print it, it stops there. Also save the next index so you know where to start the next line.
Now that the end of the line is found, print all the lines that have been completely typed, then the line currently being typed.
The line currently being typed has to have the character after the last one saved then changed to null so when you print it, it terminates there. Replace the character you overwrote.
Now increment which character we're on. Is it past the length of the line we calculated up top? If so go to the next line. If we finished the entire string then we're done.
So ya, that was my line of thought while in lecture.
|
|
Back to top |
|
|
Verious Mage
Joined: 06 Jan 2004 Posts: 409 Location: Online
|
Posted: Fri Feb 23, 2007 1:29 pm Post subject: |
[quote] |
|
Echo, that sprite looks great. Keep up the good work.
|
|
Back to top |
|
|
Terry Spectral Form
Joined: 16 Jun 2002 Posts: 798 Location: Dublin, Ireland
|
Posted: Fri Feb 23, 2007 4:51 pm Post subject: |
[quote] |
|
Verious wrote: | Echo, that sprite looks great. Keep up the good work. |
Cheers, Verious :)
You haven't posted anything about your project in a while. How's it going? _________________ http://www.distractionware.com
|
|
Back to top |
|
|
Verious Mage
Joined: 06 Jan 2004 Posts: 409 Location: Online
|
Posted: Fri Feb 23, 2007 6:51 pm Post subject: |
[quote] |
|
Not so good.
On the personal side:
I've been somewhat slammed at work so I haven't had much time to work my game.
It never fails, just when I think I'm going to have some free time, we land more business. Oh, well... such is life and I really don't have anything to complain about.
On the development side:
I was planning to use GDI+ in C# (so people could play the game on Linux using Mono); however, the performance of the tile engine is terrible for even the most basic graphics operations. Therefore, I'm currently in the process of switching to Managed DirectX.
|
|
Back to top |
|
|
|
|
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
|
|