COOL PROJECT!!!! (Need a partner or two!)

Whether you're a newbie or an experienced programmer, any questions, help, or just talk of any language will be welcomed here.

Moderator: Coders of Rage

Fallental
Chaos Rift Newbie
Chaos Rift Newbie
Posts: 43
Joined: Mon Mar 02, 2009 6:13 pm

COOL PROJECT!!!! (Need a partner or two!)

Post by Fallental »

:D SOOO Im real excited about this project idea i came up with, if anyone would like to join me, just tell me!

Ok so heres my project A C++ Program that acts as a dictionary that i could implement into a game or just a quick dictionary.

So say i want to to know the definition of noob: I woulde type /noob

and the output would be: A Player new to the game.

I want it to be functional yet editable and for use in later projects!

I have basic knowledge in C++ And i think i can pull it off!

Also,(If possible) I would like to have it so players can make their own definitions like typing /createdef awesome "Very cool"

In quotes would be definition, and the definitions would be stored to a file.
I dont know just ideas! please feel free to comment!

Thanks,
Fallental 8)
User avatar
thbp
Chaos Rift Regular
Chaos Rift Regular
Posts: 132
Joined: Tue Dec 08, 2009 5:32 pm
Current Project: Learn
Favorite Gaming Platforms: PC/PS/GC/DC
Programming Language of Choice: C(++)/Perl
Location: wrestling matts
Contact:

Re: COOL PROJECT!!!! (Need a partner or two!)

Post by thbp »

Umm first rite the dictionary then later intergrate it with the game...... wouldn't that be much easier?

and to be honest wouldnt this require somethign like......
get directive
if direcive def
get code from file

if add
save file to code in xml


amd i close?
XNA ========== eXtreme Nuclear Atomic
Image
Image
Image
Wrestlers have three motion: side 2 side , circle, and stalk
Fallental
Chaos Rift Newbie
Chaos Rift Newbie
Posts: 43
Joined: Mon Mar 02, 2009 6:13 pm

Re: COOL PROJECT!!!! (Need a partner or two!)

Post by Fallental »

Im not working on a game.

I just want to make a dictionary
User avatar
thbp
Chaos Rift Regular
Chaos Rift Regular
Posts: 132
Joined: Tue Dec 08, 2009 5:32 pm
Current Project: Learn
Favorite Gaming Platforms: PC/PS/GC/DC
Programming Language of Choice: C(++)/Perl
Location: wrestling matts
Contact:

Re: COOL PROJECT!!!! (Need a partner or two!)

Post by thbp »

i mean the dictionary part would be easy embedding into game wouldn't tha be hard???

my basic code that i think i should pos that may work (idk i'm a complete newb)

Code: Select all

#include <iostream>
#include <string>
using namespace std;

int main() {
string getDir;
cin >> getDir;
if (getDir = add) {
//code to get xml file data
}
else if (getDir = find) {
//get xml data
}
else {
cout << "enter rite keyword";
}

return 0;
|



am i close with a basic dictionary?
XNA ========== eXtreme Nuclear Atomic
Image
Image
Image
Wrestlers have three motion: side 2 side , circle, and stalk
Fallental
Chaos Rift Newbie
Chaos Rift Newbie
Posts: 43
Joined: Mon Mar 02, 2009 6:13 pm

Re: COOL PROJECT!!!! (Need a partner or two!)

Post by Fallental »

Thanks for the psuedocode. Im not sure if you are rite with it ill tinker with it, i am new to c++
User avatar
Falco Girgis
Elysian Shadows Team
Elysian Shadows Team
Posts: 10294
Joined: Thu May 20, 2004 2:04 pm
Current Project: Elysian Shadows
Favorite Gaming Platforms: Dreamcast, SNES, NES
Programming Language of Choice: C/++
Location: Studio Vorbis, AL
Contact:

Re: COOL PROJECT!!!! (Need a partner or two!)

Post by Falco Girgis »

thbp wrote:i mean the dictionary part would be easy embedding into game wouldn't tha be hard???

my basic code that i think i should pos that may work (idk i'm a complete newb)

Code: Select all

#include <iostream>
#include <string>
using namespace std;

int main() {
string getDir;
cin >> getDir;
if (getDir = add) {
//code to get xml file data
}
else if (getDir = find) {
//get xml data
}
else {
cout << "enter rite keyword";
}

return 0;
|



am i close with a basic dictionary?
Dude... really?

Code: Select all

if (getDir = add) {
*facepalm*

I'm just being a dick.
User avatar
thbp
Chaos Rift Regular
Chaos Rift Regular
Posts: 132
Joined: Tue Dec 08, 2009 5:32 pm
Current Project: Learn
Favorite Gaming Platforms: PC/PS/GC/DC
Programming Language of Choice: C(++)/Perl
Location: wrestling matts
Contact:

Re: COOL PROJECT!!!! (Need a partner or two!)

Post by thbp »

whoa are you saying about my

Code: Select all

if (getDir = "add") 
mess up? if so it's normal for me most my comparisons are of variables like it would be

Code: Select all

string add = "add"
don't ask me why but it makes my code feel cleaner i guess (though it's not)
XNA ========== eXtreme Nuclear Atomic
Image
Image
Image
Wrestlers have three motion: side 2 side , circle, and stalk
Fallental
Chaos Rift Newbie
Chaos Rift Newbie
Posts: 43
Joined: Mon Mar 02, 2009 6:13 pm

Re: COOL PROJECT!!!! (Need a partner or two!)

Post by Fallental »

please explain how your code works
User avatar
thbp
Chaos Rift Regular
Chaos Rift Regular
Posts: 132
Joined: Tue Dec 08, 2009 5:32 pm
Current Project: Learn
Favorite Gaming Platforms: PC/PS/GC/DC
Programming Language of Choice: C(++)/Perl
Location: wrestling matts
Contact:

Re: COOL PROJECT!!!! (Need a partner or two!)

Post by thbp »

Code: Select all

//preprocessors
#include <iostream>
#include <string>
using namespace std;

//main 
int main() {

//declare string to get
string getDir;

//get string
cin >> getDir;

//Dending on input of Add or Find you will do the following 
if (getDir = "add") {
//this code will allow you to update your dictionary (i don't know ow to code this so i'll leave it blank)
}

else if (getDir = "find") {
//search your xml data base for keywords 
}

else {
// to get the rite one (needs loop but too lazy to put in)
cout << "enter rite keyword";
}

// end program
return 0;
|
above code would have to generate the tags then be able to find the tags once again.
then edit them (optional) to be correct)

EDITED THE FOLLOWING TYPO'S TO BE CORRECT (i think)
xml (example) (god i hope i'm rite)

Code: Select all

<dict> 
<world one>
<def>A nice word </def>
</wrordone>
<word2>
<!---more crap here//--->
</word2>
</dict>
XNA ========== eXtreme Nuclear Atomic
Image
Image
Image
Wrestlers have three motion: side 2 side , circle, and stalk
Fallental
Chaos Rift Newbie
Chaos Rift Newbie
Posts: 43
Joined: Mon Mar 02, 2009 6:13 pm

Re: COOL PROJECT!!!! (Need a partner or two!)

Post by Fallental »

im gonna sound hella stoopid but here it goes.



what is xml :shock2:
User avatar
thbp
Chaos Rift Regular
Chaos Rift Regular
Posts: 132
Joined: Tue Dec 08, 2009 5:32 pm
Current Project: Learn
Favorite Gaming Platforms: PC/PS/GC/DC
Programming Language of Choice: C(++)/Perl
Location: wrestling matts
Contact:

Re: COOL PROJECT!!!! (Need a partner or two!)

Post by thbp »

CRASH COURSE ON BASICS (like real basics)

eXtesible Markup Language (xml)

you difine you own tags to mark up your text it's more in my opion a text database kinda (please tell me if i'm wrong).

open notepad and type

Code: Select all

<HI>
<hello> Hello </hello>
<hola> Hola </hola>
</Hi>
save as hi.xml and open in fx (firefox).

some quick rules

1. it is Case senstive
2. always end a tag
3. (personal preference) Always document.
4. Muste be properly nested (<b><I> hello <i><b>
5.must have a root (in example root is <HI></HI>

why use xml?
1. It's awsome
2. cross platform
3. your code can read it and anyone else can no need to make 2 sets a code for two databases
4. can be styled (xslt (i believe)
5. Powerful in alittle way trust me it can be all your data problems (not alway efiecient but usually can (again not sure))

some cool examples of the power of Xml
Rss is used alot (based off xml (actually if i'm rite) it is xml with other components)



some articles
http://www.gamedev.net/reference/articl ... le1928.asp

tutorial
http://www.gamedev.net/reference/progra ... s/modxml1/
Last edited by thbp on Sun Dec 20, 2009 1:04 am, edited 1 time in total.
XNA ========== eXtreme Nuclear Atomic
Image
Image
Image
Wrestlers have three motion: side 2 side , circle, and stalk
Fallental
Chaos Rift Newbie
Chaos Rift Newbie
Posts: 43
Joined: Mon Mar 02, 2009 6:13 pm

Re: COOL PROJECT!!!! (Need a partner or two!)

Post by Fallental »

Code: Select all

CMarkup xml;
xml.AddElem( "Dictionary" );
xml.AddChildElem( "Noob" );
xml.IntoElem();
xml.AddChildElem( "Def", "A new player" );
xml.AddChildElem( "LOL" );
xml.intoelem();
xml.AddChildElem( "Def", "Laughing out loud" );
CString csXML = xml.GetDoc();
Would this create

Code: Select all

<dictionary>
<noob>
<def>A new player</def>
</noob>
<LOL>
<def>Laughing our loud </def>
</LOL>
</dictionary>
If so how do i implement this piece of code I Created into c++ !

Thanks!
Fallental
User avatar
Innerscope
Chaos Rift Junior
Chaos Rift Junior
Posts: 200
Joined: Mon May 04, 2009 5:15 pm
Current Project: Gridbug
Favorite Gaming Platforms: NES, SNES
Programming Language of Choice: Obj-C, C++
Location: Emeryville, CA
Contact:

Re: COOL PROJECT!!!! (Need a partner or two!)

Post by Innerscope »

thbp wrote:whoa are you saying about my

Code: Select all

if (getDir = "add") 
mess up? if so it's normal for me most my comparisons are of variables like it would be

Code: Select all

string add = "add"
don't ask me why but it makes my code feel cleaner i guess (though it's not)
That conditional statement is assigning getDir with "add". You need to put == if you're checking for equality.
Current Project: Gridbug
Website (under construction) : http://www.timcool.me
Fallental
Chaos Rift Newbie
Chaos Rift Newbie
Posts: 43
Joined: Mon Mar 02, 2009 6:13 pm

Re: COOL PROJECT!!!! (Need a partner or two!)

Post by Fallental »

Ah, xml code is similar to html i see
User avatar
thbp
Chaos Rift Regular
Chaos Rift Regular
Posts: 132
Joined: Tue Dec 08, 2009 5:32 pm
Current Project: Learn
Favorite Gaming Platforms: PC/PS/GC/DC
Programming Language of Choice: C(++)/Perl
Location: wrestling matts
Contact:

Re: COOL PROJECT!!!! (Need a partner or two!)

Post by thbp »

hey man not to be mean but i don't know i'm just giving help to the full extent i know. The only way to find out is to try it out best way to learn.

and if it works i just learned something myself
XNA ========== eXtreme Nuclear Atomic
Image
Image
Image
Wrestlers have three motion: side 2 side , circle, and stalk
Post Reply