Jump to content
MakeWebGames

Simple RTS Engine


Ayern

Recommended Posts

The working 0.3 alpha demo is here: http://www.simplerts.netai.net

-Manage 4 units. 2 Military 2 Production

-Manage Weapons/Tools

-Purchase Slaves for military or production

-Turns are given frequently and are used to Attack and steal resources from others

-Turns are also used to get gold in the mines, as well as Diamonds - a not-so-premium currency.

-Grind Quests with the click of a button. Multiple Quests!

-Grind Mobs with a single click as well, hordes of em!

-Run out of things to Grind but still have an itch? Go to the Tavern and pick up some more for gold or diamonds.

-Bank to store resources

-Level up your Adventurer's so you can earn more resources faster!

-Experience requirements are enforced for advanced features

-Level and Exp prerequisites to be incorporated into current and future game functions.

 

I've released the working game with minor bells-n-whistles Alpha 0.3 neatly packaged with a sql dump... minimal server setup knowledge required, basic php mysql stuffs. The source code for 0.3a can be found here: https://github.com/Ayern/sRTS

The new version is called Grind Engine, the game mechanics and content slightly changed from the above with tons of added content that ive added the past couple weeks. This version will be released as soon as I deem it stable and functioning. Probably still released open-source with the intent the community will contribute.

The attached .png is what im looking at now.

srts 0.3a.zip

gameupdate.thumb.png.3dd00905840110d07f73f59ec57ebb6c.png

Edited by Ayern
Added Github link
Link to comment
Share on other sites

Thank you for your quick response Dave :) I hope you keep tabs and your interest piqued.

 

Good on you for releasing it for free as well.

I'm glad you think so! The current live version with Grinding/Tavern isn't released yet of course as I don't know if it is completely bug-free. I test my code to the point of exhaustion, over and over yet those creeps still pop up from time to time.

I am taking donations, compensation in the form of in-game diamonds, and the funds will go towards a freakin' host who's servers got some extra stink in em'. 000 is great for testing phpmysql with crons but their freebie servers are too overpopulated imho.

Link to comment
Share on other sites

Thank you for your quick response Dave :) I hope you keep tabs and your interest piqued.

I'm glad you think so! The current live version with Grinding/Tavern isn't released yet of course as I don't know if it is completely bug-free. I test my code to the point of exhaustion, over and over yet those creeps still pop up from time to time.

I am taking donations, compensation in the form of in-game diamonds, and the funds will go towards a freakin' host who's servers got some extra stink in em'. 000 is great for testing phpmysql with crons but their freebie servers are too overpopulated imho.

Some would say I don't have a life outside of these forums... that's a lie haha.

I always enjoy a good free release, I may have to play around with it at some point. Bug testing is crucial in any development I find, if it doesn't work don't release it till it's fixed!

Yeah, free hosting sucks! You need some power behind it to truly experience your scripts abilities.

Link to comment
Share on other sites

well i cannot download the project at once, and i dont want to download each file and wait 5 seconds on each file, maybe you can add a zip to download? (Version Control System like git would be much better but i gues it would be too much)

just a side note http://php.net/manual/en/migration55.deprecated.php i would replace all your mysql_* functions with mysqli or PDO

Link to comment
Share on other sites

What license does the project have?

Open-Source if I did it right:

Simple RTS is under the Creative Commons Attribution 3.0 Unported License

and hereby distributed as-is and may be altered and redistributed with

the proper credit to the original content creator(s).

SimpleRTS.netai.net is managed by Chris Dugwyler aka Ayern

Original core engine design by Copephobia and further developed by Ayern

Link to comment
Share on other sites

Open-Source if I did it right:

Simple RTS is under the Creative Commons Attribution 3.0 Unported License

and hereby distributed as-is and may be altered and redistributed with

the proper credit to the original content creator(s).

SimpleRTS.netai.net is managed by Chris Dugwyler aka Ayern

Original core engine design by Copephobia and further developed by Ayern

Creative Commons is mostly made for Graphical/Music Stuffs, in Code you have License like

http://www.wtfpl.net/

http://opensource.org/licenses/MIT

GPL

AGPL

BSD and so on..

Link to comment
Share on other sites

Game flow has been heavily altered because i ran into a problem where I could reach 85 quintillion everything. It was all panic and disorder for a few moments. All better now I hope, it feels like grinding now at least haha.

Link to comment
Share on other sites

I submitted a release .. do i need to add single pages of code as well? I left afterwards for family fun :)

https://github.com/Ayern/sRTS/releases

you have to clone the repository , then add the files , then commit it and push them back into repository.

if you use Netbeans IDE you can do it like this:

First select at the Top Navigation Team > Git > Clone .. in new Window copy the Repository URL(you find it https://github.com/Ayern/sRTS right bottom side) and type your github username and password in , then select a branch(usually master) and then select location on your PC(it must be an empty folder) , now youre done (and you schould have a project in the Projects tab on the left side in the IDE).

Next step is to take your files and copy them inside the folder you cloned locally, now you will see that in the Project view in the IDE the filenames have Blue Color.

Next step: Right Click on Project name select Git -> Add, Right Click again Git -> Commit, type something in Commit Message (e.g. Initial Commit) and commit your changes. Then Right Click again Git -> Remote -> Push.. and push it to github

Link to comment
Share on other sites

you have to clone the repository , then add the files , then commit it and push them back into repository.

if you use Netbeans IDE you can do it like this:

First select at the Top Navigation Team > Git > Clone .. in new Window copy the Repository URL(you find it https://github.com/Ayern/sRTS right bottom side) and type your github username and password in , then select a branch(usually master) and then select location on your PC(it must be an empty folder) , now youre done (and you schould have a project in the Projects tab on the left side in the IDE).

Next step is to take your files and copy them inside the folder you cloned locally, now you will see that in the Project view in the IDE the filenames have Blue Color.

Next step: Right Click on Project name select Git -> Add, Right Click again Git -> Commit, type something in Commit Message (e.g. Initial Commit) and commit your changes. Then Right Click again Git -> Remote -> Push.. and push it to github

NetBeans has a great UI for this, but I personally prefer doing it through the console.

If you're running Windows, you can install git bash

Basic commands you'll need;

git add <filename/wildcard> #Add files to staging area
git commit -m <msg> # Add commit message to files
git branch -b <branch> # Create new branch based on the branch you're on
git checkout <branch> # Checkout into an existing branch
git status # See the status of git
Link to comment
Share on other sites

NetBeans has a great UI for this, but I personally prefer doing it through the console.

If you're running Windows, you can install git bash

I thank you blackscorp for that explanation but I think Github actually has a windows client..gonna see if I can make it work now if not within a couple hours.

Link to comment
Share on other sites

I thank you blackscorp for that explanation but I think Github actually has a windows client..gonna see if I can make it work now if not within a couple hours.

Yes, windows does have a client and it is very easy to use and awesome. I use it for any of my GIT projects and it makes life very easy.

Link to comment
Share on other sites

Yes, windows does have a client and it is very easy to use and awesome. I use it for any of my GIT projects and it makes life very easy.

Oh yes, quite simple indeed. Already done.

So if Instead i wish to release version 0.5a serperately do i make that the master and move 0.3a to a new branch?

Link to comment
Share on other sites

Oh yes, quite simple indeed. Already done.

So if Instead i wish to release version 0.5a serperately do i make that the master and move 0.3a to a new branch?

I'm not too sure about that but what I suggest is release the full source not as a "release" but on GIT.

 

  1. Go to your documents on your PC/Laptop
  2. Open the Simple RTS folder
  3. Extract the zipped contents of the engine in to that folder
  4. Then push the update so we can view the file from GIT

 

That will allow us to fork the engine, modify, then push updates to you so you can check then merge them.

Edited by Script47
Link to comment
Share on other sites

Seems like you got it fairly somewhat right.

1. Why would you save the sql as a .txt? Take the contents and save as db.sql.

2. You should aim to have consistency when naming your tables and columns. So either you rename all tables to be in plural or keep them all singular. Here is two good questions about the subject: http://stackoverflow.com/questions/338156/table-naming-dilemma-singular-vs-plural-names

http://stackoverflow.com/questions/808992/singular-or-plural-database-table-names

(Personally I use plural, only lowercases and uses underscores, when dealing with mapping tables I take tables in alphabetical order in singular, like Laravel framework does it).

So please pick a style and adapt afterwards. Consistency is the key.

3. Consider using UTF8 instead of latin1. Read: http://www.utf8everywhere.org/

4. Restructure your project structure to be more logical and readable. For example put all your assets (CSS files, JavaScript files) in a assets/ folder. The db.sql in a sql/db folder.

Files I presume are included (functions.php) in a includes/ folder. When you have all files just in the root it gets messy and some files should not be direct script accessed like functions.php and header.php.

5. Please consider to separate the PHP and HTML. It's bad practice having them mixed up, harder to manage, more complex to work on same project as a team, etc. This can be pretty much work to do, but a good way to start is something like this:

5a. Make sure all "business" PHP is in the top, only the things you output echo, looping out array data, etc should be within the HTML. So make a clear separation all PHP that does something in the top and the things to be outputted in the bottom the HTML and echo stuff..

5b. Now take the PHP code in the top and put in new files and have them included in the top of the files.

 

6. Drop the use of mysql_ extension and use PDO or MySQLi instead. I have written a tutorial that exists on these forums that introduces you to PDO, have a look at it and get started! Mysql_ API is depreceated and is to be removed in future PHP version.

7. Stop using md5 for password hashing. Its bad and insecure, definitely insecure without salting. You should use bcrypt. I have written a tutorial about how to make a registration page on this forums that uses bcrypt, the in-built password_hash methods that comes with PHP 5.5 and show also how to use these on systems using < 5.5.

8. Use die; after your redirects on header(); because, in other case, your script will be executed till the end, what can cause some unexpected behavior.

Link to comment
Share on other sites

Seems like you got it fairly somewhat right.

1. Why would you save the sql as a .txt? Take the contents and save as db.sql.

2. You should aim to have consistency when naming your tables and columns. So either you rename all tables to be in plural or keep them all singular. Here is two good questions about the subject: http://stackoverflow.com/questions/338156/table-naming-dilemma-singular-vs-plural-names

http://stackoverflow.com/questions/808992/singular-or-plural-database-table-names

(Personally I use plural, only lowercases and uses underscores, when dealing with mapping tables I take tables in alphabetical order in singular, like Laravel framework does it).

So please pick a style and adapt afterwards. Consistency is the key.

3. Consider using UTF8 instead of latin1. Read: http://www.utf8everywhere.org/

4. Restructure your project structure to be more logical and readable. For example put all your assets (CSS files, JavaScript files) in a assets/ folder. The db.sql in a sql/db folder.

Files I presume are included (functions.php) in a includes/ folder. When you have all files just in the root it gets messy and some files should not be direct script accessed like functions.php and header.php.

5. Please consider to separate the PHP and HTML. It's bad practice having them mixed up, harder to manage, more complex to work on same project as a team, etc. This can be pretty much work to do, but a good way to start is something like this:

5a. Make sure all "business" PHP is in the top, only the things you output echo, looping out array data, etc should be within the HTML. So make a clear separation all PHP that does something in the top and the things to be outputted in the bottom the HTML and echo stuff..

5b. Now take the PHP code in the top and put in new files and have them included in the top of the files.

 

6. Drop the use of mysql_ extension and use PDO or MySQLi instead. I have written a tutorial that exists on these forums that introduces you to PDO, have a look at it and get started! Mysql_ API is depreceated and is to be removed in future PHP version.

7. Stop using md5 for password hashing. Its bad and insecure, definitely insecure without salting. You should use bcrypt. I have written a tutorial about how to make a registration page on this forums that uses bcrypt, the in-built password_hash methods that comes with PHP 5.5 and show also how to use these on systems using < 5.5.

8. Use die; after your redirects on header(); because, in other case, your script will be executed till the end, what can cause some unexpected behavior.

 

Thank you very much John, very good need to know info. I will do my best to start those changes as soon as possible, it shouldn't be too complicated I would hope. Right? This is my first attempt at any program so I thank you for pointing out things like to not use md5, had no clue.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...