To all SSC Station occupants
Thank you for the donations over the past year (2024), it is much appreciated. I am still trying to figure out how to migrate the forums to another community software (probably phpbb) but in the meantime I have updated the forum software to the latest version. SSC has been around a while so their is some very long time members here still using the site, thanks for making SSC home and sorry I haven't been as vocal as I should be in the forums I will try to improve my posting frequency.
Thank you again to all of the members that do take the time to donate a little, it helps keep this station functioning on the outer reaches of space.
-D1-
Some initial stuff i kept in mind as the basis of the example/attempt:
- The goal is to incorporate as many as possible multiplayer aspects in Pioneer game using the same application and keeping current Physics and functionality.
- The multiplayer aspects should not make the game deviate from the standalone execution either at all, or very slightly in order for the player to have (almost) the same gameplay experience.
- The multiplayer aspects would be implemented in non-default and in optional basis, letting the player choose, but the execution models will not mix, ie the multiplayer "save" cannot be used as a standalone "save" and vice versa (store/load functionality).
The multiplayer aspects will be built around a Central database Server (PostgreSQL 9.2+), which will hold data and needed functionality.
In order to test the example, you need (not all):
1. to have access or install a PostgreSQL Database Server. The Server is open source, free and you can find install packages at this address:
http://www.enterprisedb.com/products-services-training/pgdownload#windows (download Installer Version 9.2.2).
2. download scripts to make the necessary infrastructure from the address:
https://github.com/dkontominas/pioneer-db/tree/master/dbackup
a.) Create the users ( https://github.com/dkontominas/pioneer-db/blob/master/dbackup/create_users.sql ). In PostgreSQL terms users are roles.
You may need to manually add the role Dionisis as a member of the role player for the example only. Keep in mind that the idea is all the roles are members
of the role player which actually has the right to call the necessary functionality - the other roles are used for authentication reasons only.
The implemented functionality and infrastructure is under the user pioneerbase, who exposes it via store procedure (API) calls to user player, which
incorporates all other roles as member acting as a placeholder for them and providing them by propagation the rights to call the API.
b.) Create the tablespace ( https://github.com/dkontominas/pioneer-db/blob/master/dbackup/create_tablespace.sql ). In the tablespace creation, actually
you define where the data files for the database will be placed (system path) and please modify the path as appropriate to your system.
c.) Run the restore_psqldb.bat. This executable is a windows batch file and should be modified to correspond to the paths of the installation
of the PostgreSQL database bin directory. It uses the pioneer-db.sql file as an input which includes all data and commands needed to setup the infrastructure.
d.) The backupdb.bat is a windows batch file that should be modified to correspond to the paths of the installation of the database bin directory,
to run correctly and actually backups your database in an .sql script for saving database purposes if you fell you need to.
3. If you want to build the branch the address to download the source is: https://github.com/dkontominas/pioneer/tree/pioneerbase.
The branch is based on alpha 29 master sources (Pioneer executable shows alpha 30 when running). Also for this reason.. (4.)
4. you need to download the libpqxx-4.0 C++ PostgreSQL database access framework. The sources reside in the address:
https://github.com/dkontominas/libpqxx-4.0. Amongst the directories, there exist a directory lib where you can find the compiled binaries for the WIN32 platform.
So if you are WIN32 you don't need to make the binaries because they are already made (both static/dynamic + debug versions). If you are in other
environment you need to build the corresponding binaries from the provided sources.
5. The sources have been tested with Microsoft's Visual Studio 2010, in debug mode and the corresponding solution file is updated. I don't have any other
environment to test the branch, so i can't speak of any adjustments on the build process needed on that.
Also in pioneer-db repository there exists a directory docs, where you can find 2 documents. The big one is the manual of PostgreSQL and the small one
is a document for naming conventions that have been followed in the database development that has been done (well they come from Oracle PL/SQL, but they
gently apply to PostgreSQL PLgSQL which is very similar language).
As a general feeling the store/load process in the Database is a bit slower from the conventional file mechanism and that is also increased by the fact that the run/compile
i did was under full debug. Possibly using release settings things would go much faster.
Finally, you need in order the executable to run to copy in the Pioneer's executable directory some .DLLs that already exist in your PostgreSQL directories. These
are the: SSLEAY32.dll, LIBEAY32.dll, LIBINTL.dll. In Unix/Mac they will probably have different extensions but the name possibly remains the same.
Of course you need to place there also the libpqxxD.dll (for the debug version) and the libpq.dll which are the main access library for the Database.
Best regards
Requests and Technical Information
In order to prepare for integration the functionality to main project, and accommodate changes i need help on UI/Settings.
Since that i am completely ignorant of that part from the technical side i would deeply appreciate if senior dev(s) can give a
hand on appropriately take over the prepare. I don't know what would be the best way to do the integration, but i propose the following.
(Proposal):
1. In the Options form, where currently 3 tabs exist (Sights, sounds & saving games | Controls | View) add one more tab: Net.
This tab should have items for these values:
Online (boolean, checkbox) [Net or standalone execution)
User (text box) [Net/Database settings #1]
Password (text box) [Net/Database settings #2]
host (text box) [Net/Database settings #3]
dbname (text box) [Net/Database settings #4]
port (text box: port number) [Net/Database settings #5]
The values on the items should also be saved as the others on other tabs. The change on the Online should terminate currently
executing game.
2. According to the Online Setting value, the load/save form should (at least) disable the list box for the savegames selection and
the corresponding text box. The buttons based on the value of Online have already the needed functionality to behave appropriately,
in the branch as long of course a they acquire access on the setting.
3. Make the connection between the values in the items/settings file and the Database Settings in game. The settings currently are
constructed statically in createDBConnectionString() function in Database.cpp in Database project (in the solution).
Reserved
Good work I hope to get time to take a look at it, another possible use for this is we could start to offer "cloud" saving of the game so you could play the same save game on different machines without having to copy it around.
A good solid start anyway.
Andy
friends, think first about what deal we would make with a multiplayer game.
once more i'm browsing the web for fun (not everything is fun i see).
i noticed that there exist some really evil trolls who make themself a fun out of trolling MMO's.
the only reason they have is, that it attracts a lot of people to watch the clips on youtube,
who get "entertained" by watching when someone is getting upraged, because the troll spoils the game (messing up the team i.e.).
this generates a lot of calls for the clips and since they earn a little with the advertises it generates money for the troll
(if someone with a commercial interest can be called a troll at all), respectively for the uploader.
well, if you like to have such evil trolls in your game, go on make it multiplayer.
---
besides i'm not sure who is more stupid,
the kid or player who get upraged,
the "troll" who spoils the game for coins,
or the ppl who watch this finally and feed the troll.