Skip to content
Permalink
Browse files

fileIO/ represents a series of commands for storing and retrieving da…

…ta for both conectivity, and long term values.

fileIO.cs operates on the basis of having a client conect to a server directly for it's data storage and retrieval, with optional entries.
httpIO.cs is a truncated testbed for connecting to a third party server for data. it does not at this point in time share functionality, given that that would require new users to set up thier own personal account servers, I'd deem that inadvisable for a basic testbed, though it's there if folks want to run with it.
(both) defautls.cs, init.cs, optionsDLG.cs: http://www.garagegames.com/community/resources/view/22334 .while it would indeed be better to fix that source side, this functions to store data and preferences in a user's local data directory.
server.cs, gamecore.cs, joinServerDLG.gui: appends a secondary %connectiondata value to cleint connections used for option selection, while gameCore additionally appends a %client.saveName variable to a client connection. At present that value is filled out by that players name,
though for conflict-prevention that'll need expansion if the storage and retrieval are to be purely server-side, or multiple files are stored per-client so they can go back to a prior state.

chooseSaveDLG is a straight copy of a present game storage and retieval frontend and should be treated as heavily contaminated, but there to serve as a temporary example until I or somone with more time can find generalize it further (thinking in terms of the unlocks/purchased upgrades displays and the like going into a scalable array, for instance).
  • Loading branch information...
Azaezel committed Jan 9, 2014
1 parent af15e27 commit d7271b991c9bcc062d52722a8237d2388d4ee104
@@ -0,0 +1,337 @@
//--- OBJECT WRITE BEGIN ---
%guiContent = new GuiControl(chooseSaveDlg) {
position = "0 0";
extent = "1024 768";
minExtent = "8 8";
horizSizing = "width";
vertSizing = "height";
profile = "GuiOverlayProfile";
visible = "1";
active = "1";
tooltipProfile = "GuiToolTipProfile";
hovertime = "1000";
isContainer = "1";
canSave = "1";
canSaveDynamicFields = "1";
enabled = "1";

new GuiWindowCtrl(ChooseSaveWindow) {
text = "Save Games";
resizeWidth = "1";
resizeHeight = "1";
canMove = "1";
canClose = "1";
canMinimize = "0";
canMaximize = "0";
canCollapse = "0";
closeCommand = "closeSaveDlg();";
edgeSnap = "1";
margin = "0 0 0 0";
padding = "0 0 0 0";
anchorTop = "1";
anchorBottom = "0";
anchorLeft = "1";
anchorRight = "0";
position = "265 219";
extent = "494 330";
minExtent = "8 2";
horizSizing = "center";
vertSizing = "center";
profile = "GuiWindowProfile";
visible = "1";
active = "1";
command = "closeSaveDlg();";
accelerator = "escape";
tooltipProfile = "GuiToolTipProfile";
hovertime = "1000";
isContainer = "1";
canSave = "1";
canSaveDynamicFields = "0";

new GuiButtonCtrl(newcharBtn) {
text = "New";
groupNum = "-1";
buttonType = "PushButton";
useMouseEvents = "0";
position = "5 45";
extent = "180 30";
minExtent = "8 2";
horizSizing = "right";
vertSizing = "bottom";
profile = "GuiButtonProfile";
visible = "1";
active = "1";
command = "chooseSaveDlg.makeNewChar();";
tooltipProfile = "GuiToolTipProfile";
hovertime = "1000";
isContainer = "0";
canSave = "1";
canSaveDynamicFields = "0";
};
new GuiContainer(newcharOptions) {
margin = "0 0 0 0";
padding = "0 0 0 0";
anchorTop = "1";
anchorBottom = "0";
anchorLeft = "1";
anchorRight = "0";
position = "5 45";
extent = "484 30";
minExtent = "8 2";
horizSizing = "right";
vertSizing = "bottom";
profile = "GuiDefaultProfile";
visible = "0";
active = "1";
tooltipProfile = "GuiToolTipProfile";
hovertime = "1000";
isContainer = "1";
hidden = "1";
canSave = "1";
canSaveDynamicFields = "0";

new GuiButtonCtrl(createNewcharBtn) {
text = "Create";
groupNum = "-1";
buttonType = "PushButton";
useMouseEvents = "0";
position = "311 0";
extent = "136 30";
minExtent = "8 2";
horizSizing = "right";
vertSizing = "bottom";
profile = "GuiButtonProfile";
visible = "1";
active = "1";
command = "chooseSaveDlg.createNewChar();";
tooltipProfile = "GuiToolTipProfile";
hovertime = "1000";
isContainer = "0";
canSave = "1";
canSaveDynamicFields = "0";
};
new GuiBitmapButtonCtrl(chartype0) {
bitmap = "art/gui/charIcons/ico0_grey";
bitmapMode = "Stretched";
autoFitExtents = "0";
useModifiers = "0";
useStates = "1";
groupNum = "-1";
buttonType = "PushButton";
useMouseEvents = "0";
position = "180 0";
extent = "30 30";
minExtent = "8 2";
horizSizing = "right";
vertSizing = "bottom";
profile = "GuiDefaultProfile";
visible = "1";
active = "1";
command = "chooseCharType(0);";
tooltipProfile = "GuiToolTipProfile";
hovertime = "1000";
isContainer = "0";
canSave = "1";
canSaveDynamicFields = "0";
};
new GuiBitmapButtonCtrl(chartype1) {
bitmap = "art/gui/charIcons/ico1_grey";
bitmapMode = "Stretched";
autoFitExtents = "0";
useModifiers = "0";
useStates = "1";
groupNum = "-1";
buttonType = "PushButton";
useMouseEvents = "0";
position = "212 0";
extent = "30 30";
minExtent = "8 2";
horizSizing = "right";
vertSizing = "bottom";
profile = "GuiDefaultProfile";
visible = "1";
active = "1";
command = "chooseCharType(1);";
tooltipProfile = "GuiToolTipProfile";
hovertime = "1000";
isContainer = "0";
canSave = "1";
canSaveDynamicFields = "0";
};
new GuiBitmapButtonCtrl(chartype2) {
bitmap = "art/gui/charIcons/ico2_grey";
bitmapMode = "Stretched";
autoFitExtents = "0";
useModifiers = "0";
useStates = "1";
groupNum = "-1";
buttonType = "PushButton";
useMouseEvents = "0";
position = "244 0";
extent = "30 30";
minExtent = "8 2";
horizSizing = "right";
vertSizing = "bottom";
profile = "GuiDefaultProfile";
visible = "1";
active = "1";
command = "chooseCharType(2);";
tooltipProfile = "GuiToolTipProfile";
hovertime = "1000";
isContainer = "0";
canSave = "1";
canSaveDynamicFields = "0";
};
new GuiBitmapButtonCtrl(chartype3) {
bitmap = "art/gui/charIcons/ico3_grey";
bitmapMode = "Stretched";
autoFitExtents = "0";
useModifiers = "0";
useStates = "1";
groupNum = "-1";
buttonType = "PushButton";
useMouseEvents = "0";
position = "276 0";
extent = "30 30";
minExtent = "8 2";
horizSizing = "right";
vertSizing = "bottom";
profile = "GuiDefaultProfile";
visible = "1";
active = "1";
command = "chooseCharType(3);";
tooltipProfile = "GuiToolTipProfile";
hovertime = "1000";
isContainer = "0";
canSave = "1";
canSaveDynamicFields = "0";
};
new GuiButtonCtrl(cancelNewCharbtn) {
text = "x";
groupNum = "-1";
buttonType = "PushButton";
useMouseEvents = "0";
position = "451 0";
extent = "30 30";
minExtent = "8 2";
horizSizing = "right";
vertSizing = "bottom";
profile = "GuiButtonProfile";
visible = "1";
active = "1";
command = "chooseSaveDlg.cancelNewChar();";
tooltipProfile = "GuiToolTipProfile";
hovertime = "1000";
isContainer = "0";
canSave = "1";
canSaveDynamicFields = "0";
};
new GuiTextEditCtrl(newCharName) {
historySize = "0";
tabComplete = "0";
sinkAllKeyEvents = "0";
password = "0";
passwordMask = "*";
text = "Name";
maxLength = "1024";
margin = "0 0 0 0";
padding = "0 0 0 0";
anchorTop = "1";
anchorBottom = "0";
anchorLeft = "1";
anchorRight = "0";
position = "5 6";
extent = "129 18";
minExtent = "8 2";
horizSizing = "right";
vertSizing = "bottom";
profile = "GuiTextEditProfile";
visible = "1";
active = "1";
tooltipProfile = "GuiToolTipProfile";
hovertime = "1000";
isContainer = "1";
canSave = "1";
canSaveDynamicFields = "0";
};
};
new GuiBitmapButtonCtrl(scrollSavesUpbtn) {
bitmap = "art/gui/vert-previous-button";
bitmapMode = "Stretched";
autoFitExtents = "0";
useModifiers = "0";
useStates = "1";
groupNum = "-1";
buttonType = "PushButton";
useMouseEvents = "0";
position = "50 92";
extent = "180 20";
minExtent = "8 2";
horizSizing = "right";
vertSizing = "bottom";
profile = "GuiDefaultProfile";
visible = "0";
active = "1";
command = "ChooseSaveWindow.previousPreviews();";
tooltipProfile = "GuiToolTipProfile";
hovertime = "1000";
isContainer = "0";
hidden = "1";
canSave = "1";
canSaveDynamicFields = "0";
};
new GuiDynamicCtrlArrayControl() {
colCount = "1";
colSize = "380";
rowCount = "3";
rowSize = "32";
rowSpacing = "0";
colSpacing = "0";
frozen = "0";
autoCellSize = "0";
fillRowFirst = "1";
dynamicSize = "0";
padding = "0 0 0 0";
position = "50 120";
extent = "380 160";
minExtent = "8 2";
horizSizing = "right";
vertSizing = "bottom";
profile = "GuiDefaultProfile";
visible = "1";
active = "1";
tooltipProfile = "GuiToolTipProfile";
hovertime = "1000";
isContainer = "1";
internalName = "SaveGamePreviews";
canSave = "1";
canSaveDynamicFields = "0";
};
new GuiBitmapButtonCtrl(scrollSavesDownbtn) {
bitmap = "art/gui/vert-next-button";
bitmapMode = "Stretched";
autoFitExtents = "0";
useModifiers = "0";
useStates = "1";
groupNum = "-1";
buttonType = "PushButton";
useMouseEvents = "0";
position = "50 290";
extent = "180 20";
minExtent = "8 2";
horizSizing = "right";
vertSizing = "bottom";
profile = "GuiDefaultProfile";
visible = "0";
active = "1";
command = "ChooseSaveWindow.nextPreviews();";
tooltipProfile = "GuiToolTipProfile";
hovertime = "1000";
isContainer = "0";
hidden = "1";
canSave = "1";
canSaveDynamicFields = "0";
};
};
};
//--- OBJECT WRITE END ---
@@ -553,7 +553,9 @@ function JoinServerDlg::join(%this)
Canvas.repaint();

%conn = new GameConnection(ServerConnection);
%conn.setConnectArgs($pref::Player::Name);
readSave($pref::Player::Name);
$PlayerStats = $saveRecord.getKey(0);
%conn.setConnectArgs($pref::Player::Name,$connectionData);
%conn.setJoinPassword($Client::Password);
%conn.connect($ServerInfo::Address);
}
Oops, something went wrong.

0 comments on commit d7271b9

Please sign in to comment.
You can’t perform that action at this time.