Jump to content
xisto Community
Sign in to follow this  

Text Based Game

Recommended Posts

Hey,I am new to this sight so i don't know a lot of things.Some of these questions maybe off topic since I the FAQ forum does not work for me O_o.I put this under data base thread cuz the main question is about data base.Before that, I was told that i gain credits by posting. How much?Is it a fixed number per post or is it related to number of characters,words or lines. Does the content affect the number of credits awarded?Do replies give credits?Now that thats over I have questions about Data bases.I am new to the data base Mysql. I have some C++ and PHP skills. But i don't know how to intigrate PHP and C++ into databases (Mysql)Can someone tell me how? Cuz when i tried to do it I was getting messages like unknown command or error in input ( I was inputting echo and () along with other normal commands so I dunno why i was getting that)I also want to know if I want to make a data base and intigrate PHP into it (requires a server right?), does this sight have what I need? Cuz other sights cost money to give such services. And if so are they 100% free?Another question regarding database is that I want to make a game, a textbased game that is based on time not turns. Any one can give me an advice on how to make the data base or even give me or tell me where i can download a data base and edit it as i want. The game would be war between militias (same as the theme of mafia but different options and engines)Can you tell me how i can get the sign up and verify thing into my game once i make it?Also, I fail to combine my php files, I made php files that are enough to make a small game but i dunno how to combine them , in other words I have the files but i don't know how to put the game together and get it online.Finally, can i make profit from this sight even if i don't pay money for the webspace? like put adds and charge money for certain previlages in the game?If so, where can i get add offers (similar to googles adsense)Thanks for reading. <_<

Notice from vizskywalker:
Please try to take independent questions, split them up into separate threads, and post them in the proper categories. Keep related questions together. For example, this thread would be better as three separate threads.

Share this post

Link to post
Share on other sites

Hi there and welcome to Xisto forums!

I will try to answer your questions as accurately as possible but I am not too familiar with programming so please bear with me here.


1. Post quality is ALWAYS preferred over post quantity. An average-sized post with good content will earn more credits than a large post with little content. Don't spam, don't post junk and don't post 1-line topics. Do make sure that you have an introduction, strong supporting statements describing your topic/problem and you should usually include a closing to wrap up a topic. This will ensure you get maximum credits for your topic. Using a broad vocabulary also helps, use a thesaurus if you want :P


2. Lines, sentences, character count, word count and paragraph count doesn't matter in the forum as long as you have good content. As stated above, quality is preferred over quantity. :P


3. Replies also count towards post count and credits. Good quality replies in discussing the topic result in more credits being given out. Do not make posts that say only "I agree" or "Thanks" or anything similar. Include some more with your reply. :P


4. You can read about working with MySQL at W3Schools. As far as I know, PHP is the best language for manipulation of MySQL databases. I have no clue whatsoever on anything related to C++ but I am sure you can dig up some information on connecting that with MySQL on Google if it is possible. I searched Wikipedia on C++ and can't seem to find anything about MySQL in there. As far as I know, C++ is for developing software applications while PHP is used for developing web applications and dynamic sites. :?


5. Yes, Xisto provides PHP and MySQL server capabilities for free as long as you keep a sufficient amount of credits in the forum. We are very generous compared to other servers. If you find that keeping credits on the forum too difficult/time-consuming, there is Xisto's sister company, Xisto - Web Hosting, which provides cheap web hosting with equal or greater server capabilities. :P


6. I am also developing a text-based game, but mine is based on turns not time :P. It seems as though you are developing a game similar to Travian with with more textual content. You should look at similar games and search up some more information.


7. I am assuming you mean a registration and login script with a CAPTCHA when you mean sign up and verify. This is quite easy to build. If you do not want to build one form scratch (it's easy as long as you can refer to PHP commands), you can probably find one at HotScripts that suit your needs. I built my own script with MySQL authentication but without a CAPTCHA, it wasn't that hard considering my knowledge of PHP.


8. To link the pages together, you use basic XHTML linking to link the pages <_< Like this in your HTML code:

<a href="page.php">This is a link to a page</a>
If you are talking about including pages within each other using PHP, you do either this:

<?php include('page.php');?>
or the better, stricter way:

<?php require('page.php');?>
The difference is that if you require the page, it will stop loading the page after it finds an error if the page is not found, you made a spelling mistake, etc. If you are including the page, it will generate a PHP warning and continue loading the page even if the page doesn't exist, etc.


9. To my best knowledge, you are allowed to make profit off of your site while being hosted off of Xisto. However, it needs to be legal, secure and within the Xisto Terms and Conditions (Terms of Use). I am not too sure on this one, ask someone else just incase.


10. Google AdSense is not something that you buy to get more privileges to Google. Google AdSense is a way to make money while displaying ads on your page. It is by far the most common one by a trusted company. If you want to make money while offering special privileges to the game, you need to include something in each account (record) in your MySQL database about paid and etc. I have no clue how to implement this though.


I hope that is sufficient information to answer your questions. Good luck and have fun! :D




P.S. This post got me around ~10 credits! ;)

Edited by FirefoxRocks (see edit history)

Share this post

Link to post
Share on other sites

Thanks for the info :PCan you tell me the code needed so that when someone purchases something (items in the game) the item is automatically added to his acount after the payment is complete?Appreciated <_<

Share this post

Link to post
Share on other sites

It could be a yes/no field in the MySQL database. When a button is clicked to purchase, gold/money/units are deducted and the item appears as a yes in that field on that player's record.

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.