Thanks to the developers! (& suggestion for savegames)

nick
Posts: 85
Joined: Mon Sep 08, 2014 9:24 pm
Location: Plymouth, UK

Re: Thanks to the developers! (& suggestion for savegames)

Post by nick »

I could log in again, and choose a unique name?
nick
Posts: 85
Joined: Mon Sep 08, 2014 9:24 pm
Location: Plymouth, UK

Re: Thanks to the developers! (& suggestion for savegames)

Post by nick »

No log out button either. Had to close browser earlier.
Using Firefox.
bszlrd
Posts: 1084
Joined: Mon Jul 01, 2013 3:25 pm
Location: Budapest HU

Re: Thanks to the developers! (& suggestion for savegames)

Post by bszlrd »

Strange I don' think it requires any plugin. It worked for me in an IOS chrome browser.
It should look like this,
nick
Posts: 85
Joined: Mon Sep 08, 2014 9:24 pm
Location: Plymouth, UK

Re: Thanks to the developers! (& suggestion for savegames)

Post by nick »

Thing I've got it :)
Needed to do a "query", which DOES have a text input field
nick
Posts: 85
Joined: Mon Sep 08, 2014 9:24 pm
Location: Plymouth, UK

Re: Thanks to the developers! (& suggestion for savegames)

Post by nick »

With much help from nozmajner, I've committed the jsonsaveload branch (thanks nozmajner!)
https://github.com/pioneerspacesim/pioneer/pull/3350

However, I've not merged anything - just copied the following files from my working copy (taken from github on 3rd January) to my local git:

Code: Select all

Body.cpp
Body.h

CameraController.cpp
CameraController.h

CargoBody.cpp
CargoBody.h

CollMesh.h

DynamicBody.cpp
DynamicBody.h

Frame.cpp
Frame.h

GalacticView.cpp
GalacticView.h

Game.cpp
Game.h

HyperspaceCloud.cpp
HyperspaceCloud.h

LuaRef.cpp
LuaRef.h

LuaSerializer.cpp
LuaSerializer.h

Missile.cpp
Missile.h

ModelBody.cpp
ModelBody.h

NavLights.cpp
NavLights.h

PersistSystemData.h

Planet.cpp
Planet.h

Polit.cpp
Polit.h

Projectile.cpp
Projectile.h

PropertyMap.h

SectorView.cpp
SectorView.h

Sfx.cpp
Sfx.h

Shields.cpp
Shields.h

Ship.cpp
Ship.h

ShipAICmd.cpp
ShipAICmd.h

ShipController.cpp
ShipController.h

ShipCpanel.cpp
ShipCpanel.h

ShipCpanelMultiFuncDisplays.cpp
ShipCpanelMultiFuncDisplays.h

Space.cpp
Space.h

SpaceStation.cpp
SpaceStation.h

Star.cpp
Star.h

TerrainBody.cpp
TerrainBody.h

utils.cpp
utils.h

WorldView.cpp
WorldView.h

galaxy\Galaxy.cpp
galaxy\Galaxy.h

galaxy\GalaxyGenerator.cpp
galaxy\GalaxyGenerator.h

galaxy\SectorGenerator.cpp
galaxy\SectorGenerator.h

galaxy\StarSystem.cpp
galaxy\StarSystem.h

galaxy\SystemPath.h

collider\GeomTree.cpp
collider\GeomTree.h

scenegraph\Model.cpp
scenegraph\Model.h

scenegraph\ModelSkin.cpp
scenegraph\ModelSkin.h
so any changes in those files since 3rd January will not be there (just the new JSON save/load code).
Hopefully most of these files have not changed since 3rd January???

There are two new files:
contrib\json\JsonUtils.cpp
contrib\json\JsonUtils.h

Apologies for not doing a merge (I was going to do it manually, but thought I ought to get something committed).
I've always been the only person working on any code, so I've never had to do a proper merge!

If this is a complete non-starter, then I'll have another go at committing, but do a proper merge (perhaps using winmerge).
A manual merge using notepad++ is not an impossible task I think - the JSON save/load functions are immediately below their existing serialisation counterparts, and I doubt the save/load functions have changed since 3rd January.

I should add that there's a bug while loading the views (crashes), but loads everything up to that point - please see my commit comments.

From here: I could either continue working on the non-git copy (from 3rd Jan) and merge later, or merge now and continue working on a more recent pioneer managed by git.
Would be nice to do the latter - as my 3rd of Jan version has very low frame rate (pre openGL-optimisation).
impaktor
Posts: 1008
Joined: Fri Dec 20, 2013 9:54 am
Location: Tellus
Contact:

Re: Thanks to the developers! (& suggestion for savegames)

Post by impaktor »

You can merge in master into your branch, and solve any merge conflict and then commit and push just as you did first time, and the branch and pull request will be updated.
nick
Posts: 85
Joined: Mon Sep 08, 2014 9:24 pm
Location: Plymouth, UK

Re: Thanks to the developers! (& suggestion for savegames)

Post by nick »

Thanks :) Will have a go later this evening.

I should add that I didn't replace the MSVC solution file in the branch, so the two new files won't be included in the project (and it won't compile). The two new files (JsonUtils.cpp and JsonUtils.h) also need to be dragged to the correct folder in solution explorer (json).
nick
Posts: 85
Joined: Mon Sep 08, 2014 9:24 pm
Location: Plymouth, UK

Re: Thanks to the developers! (& suggestion for savegames)

Post by nick »

I've done:
"git checkout master"
"git fetch upstream"
"git pull -ff-only upstream master"
and it says "already up to date" - that seems fine.

then:
"git checkout jsonsaveload"
"git merge master"
and it says "already up to date" - don't understand this - I'm trying to merge latest pioneer (upstream) with my branch jsonsaveload (expecting some conflicts - but hoping git merge can handle them assuming code diffs do not overlap).

Will be grateful for some pointers :)
I'm on IRC

[Edit] I'll wait for some advice before I break anything :)
In fact, I think I'll go back to bugfixing my non-git working copy (snapshot of 3rd Jan) and worry about merges later...
Will continue tomorrow evening.
FluffyFreak
Posts: 1343
Joined: Tue Jul 02, 2013 1:49 pm
Location: Beeston, Nottinghamshire, GB
Contact:

Re: Thanks to the developers! (& suggestion for savegames)

Post by FluffyFreak »

git checkout master
git fetch upstream
git pull upstream master
git push origin master
To push the merged changes back up to your master.
Then you can do:
git checkout jsonsaveload
git merge origin master
or what I usually do would be:
git checkout jsonsaveload
git pull upstream master
Since I want to be in sync with the upstream/master not my own origin/master when I do a Pull Request.
nick
Posts: 85
Joined: Mon Sep 08, 2014 9:24 pm
Location: Plymouth, UK

Re: Thanks to the developers! (& suggestion for savegames)

Post by nick »

Thank you :)
Will have a go later if I manage to fix the LuaSerializer issue.
Post Reply