Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Geek Culture / Argh! UNITYYYYYYYYYYYYY!!

Author
Message
Clonkex
Forum Vice President
13
Years of Service
User Offline
Joined: 20th May 2010
Location: Northern Tablelands, NSW, Australia
Posted: 31st Oct 2014 12:58
WARNING: The following is a bit of a rant. If you don't like complaining, don't keep reading

So I've been working for a few weeks now on a new project. It's managed to reach that level where I actually work on it continuously and don't get bored of it, which is a rare event. Last time it occurred was with NeoParticle, which I completed. I'm really hoping it means I'll finish this project also.

I'm building the game in Unity. I'd been using Unity 4.3.something, but reached the stage that I needed some form of GUI. I noticed the 4.6.0b20 stable beta included the awesome new uGUI system, and downloaded it. I backed up my project and then opened it in 4.6. It all worked just fine, so I began working on the GUI. During one of my Minecrafting sessions I closed everything I had open because I only have 8GB of RAM and Minecraft+mods uses a metric crap-tonne of RAM.

After finishing gaming, I wanted to continue working, and opened Unity again. Naturally I went straight for the shortcut pinned to my start menu, forgetting it was still linked to 4.3, which I still had installed. When it opened I realised my mistake, closed Unity and opened 4.6. Unfortunately, the way Unity works, the simple act of opening a project in the wrong version can drastically break stuff... which it did. Since 4.3 didn't know about uGUI, it totally broke the project. Now I'll have to recreate EVERYTHING GUI-related.


AARAAARGRHGRHGGHGHGHJGHJGJHAGIGINCVAHIUOPEVHMONVCLKXNSKJVHGNEKJFGKJABGKABVNM<AG!!!!!!!!!!!!!!!!!!!

WHY.

WHY, Unity.

WHY?!

It would be so insanely simple to ask me, when I open a project with a different version Unity to the one it was last saved with, whether or not I wanted to load the project.

This is not the first time I've been astounded by Unity. Can you believe they don't offer a way to set the cursor position? There's NO WAY to do that, except by manually loading a Windows DLL which is complicated and only works on Windows. How on EARTH are we supposed to keep the cursor inside the window if we can't set the position??

Hhhhhh... Suppose I need to begin recreating all the GUI elements...

Indicium
15
Years of Service
User Offline
Joined: 26th May 2008
Location:
Posted: 31st Oct 2014 13:02
Version control.
Seditious
10
Years of Service
User Offline
Joined: 2nd Aug 2013
Location: France
Posted: 31st Oct 2014 13:12
Quote: "How on EARTH are we supposed to keep the cursor inside the window if we can't set the position??"


Screen.lockCursor = true;
Blobby 101
17
Years of Service
User Offline
Joined: 17th Jun 2006
Location: England, UK
Posted: 31st Oct 2014 13:13
The perils of beta software unfortunately

That does suck though - hope it didn't take too long to sort out! There is a way to keep the cursor inside the window though, even without manually setting its position - just use screen.lockcursor. Docs

Hopefully Unity 5 should be out soon and we can go through all the project breaking over again! xD

TheComet
16
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 31st Oct 2014 13:15
/thread

I like offending people. People who get offended should be offended. -- Linus Torvalds
Van B
Moderator
21
Years of Service
User Offline
Joined: 8th Oct 2002
Location: Sunnyvale
Posted: 31st Oct 2014 13:17
Could be worse - you could be trying to make a GUI for Cryengine3 - sometimes its enough to know the workflow to add the GUI, you know now how to implement it and the next time it'll be more efficient and take less time. It's all good - just pretend you have a marketing department - they'd have you change the GUI 10 times anyway

Look at it as time you'd have spent adjusting things and redoing things differently, there is no wasted time when, it's all just inconvenient practice.

I am the one who knocks...
gamerboots
15
Years of Service
User Offline
Joined: 8th Dec 2008
Location: USA
Posted: 31st Oct 2014 19:45
I can imagine how frustrating this must have been. There should have been some kind of prompt that would say "this file was saved in another version do you still wish to convert it" or something to that effect.

--------
DBP Archive
wattywatts
14
Years of Service
User Offline
Joined: 25th May 2009
Location: Michigan
Posted: 1st Nov 2014 00:04
Reminds me of the first time I deleted a bunch of code in DBP to test some things out; of course I didn't save so I had no reason to suspect the code would stay gone... Ever since then I only save my code in notepad.
The Slayer
Forum Vice President
14
Years of Service
User Offline
Joined: 9th Nov 2009
Playing: (Hide and) Seek and Destroy on my guitar!
Posted: 1st Nov 2014 06:49
Quote: "Hopefully Unity 5 should be out soon"

It is...at least, the beta for pre-order customers. And, i am one of them. Whoaaaaaaaaahahahhaaaaaaaaa!

And, on top of that...i simply love the new improved version. I see plenty of good improvements. The global illumination (Enlighten), and the new PBR shader are really awesome, plus the performance improvement is quite noticeable.

Of course, there are still some bugs here and there, but i think any beta, or any other engine, has bugs...bugs, and bugs.

Very sorry to hear that though, Clonkex. It's never fun to loose such hard work. At least, it's 'only' the GUI you need to redo, not the whole project.

Quote: "Close those quotes before they start to spread!...too late! Aaaaaagh!!!
mr Handy
16
Years of Service
User Offline
Joined: 7th Sep 2007
Location: out of TGC
Posted: 1st Nov 2014 09:53
When do people realize that betraying DBPro lays a curse on them...

The Slayer
Forum Vice President
14
Years of Service
User Offline
Joined: 9th Nov 2009
Playing: (Hide and) Seek and Destroy on my guitar!
Posted: 1st Nov 2014 14:23
Quote: "When do people realize that betraying DBPro lays a curse on them..."

Oh really ???

I thought it was AppGameKit, these days??

Well, if that's the case, then i'm pretty sure the curse is on you too, as you've probably already programmed in other languages than just DBPro.

Mwuaaaaaaaaahahahhahhaaaaaaaaaaaa!!

Quote: "Close those quotes before they start to spread!...too late! Aaaaaagh!!!
mr Handy
16
Years of Service
User Offline
Joined: 7th Sep 2007
Location: out of TGC
Posted: 1st Nov 2014 15:49
No, it was BEFORE DBPro, so I am safe now

Oh, HLSL doesn't count i hope?

The Slayer
Forum Vice President
14
Years of Service
User Offline
Joined: 9th Nov 2009
Playing: (Hide and) Seek and Destroy on my guitar!
Posted: 1st Nov 2014 16:21
Quote: "Oh, HLSL doesn't count i hope?"

Hum, not sure about that. We should ask the DBPro Gods.

Quote: "Close those quotes before they start to spread!...too late! Aaaaaagh!!!
Clonkex
Forum Vice President
13
Years of Service
User Offline
Joined: 20th May 2010
Location: Northern Tablelands, NSW, Australia
Posted: 2nd Nov 2014 04:29
Quote: "Version control."


I hate version control, but I'll definitely be doing copy-paste backups from now on.

Quote: "Screen.lockCursor = true;"

Quote: "There is a way to keep the cursor inside the window though, even without manually setting its position - just use screen.lockcursor. Docs"


Haha, I'm not THAT silly I already use Screen.lockCursor, but it's useless in the editor because when you do that it automatically positions the cursor over the Pause button. I can't actually click anything in my game with the cursor locked because it just pauses it.

Quote: "There should have been some kind of prompt that would say "this file was saved in another version do you still wish to convert it" or something to that effect."


Exactly!

Quote: "Reminds me of the first time I deleted a bunch of code in DBP to test some things out; of course I didn't save so I had no reason to suspect the code would stay gone... Ever since then I only save my code in notepad."


Whaaaat. A) What actually happened? B) How do you mean, save your code in notepad?

Quote: "It is...at least, the beta for pre-order customers. And, i am one of them. Whoaaaaaaaaahahahhaaaaaaaaa!"


So jealous!

Quote: "And, on top of that...i simply love the new improved version. I see plenty of good improvements. The global illumination (Enlighten), and the new PBR shader are really awesome, plus the performance improvement is quite noticeable."


Absolutely! Unity 5 is going to be freaking awesome!

Quote: "Very sorry to hear that though, Clonkex. It's never fun to loose such hard work. At least, it's 'only' the GUI you need to redo, not the whole project."


Thanks. Yeah well, it'll take me maybe half an hour to recreate the setup I had (once I stop procrastinating on these forums), so it's not all that bad.

Quote: "When do people realize that betraying DBPro lays a curse on them..."


lol

Quote: "Oh, HLSL doesn't count i hope?"


No it doesn't, so long as you're writing HLSL for use with DBPro

TheComet
16
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 2nd Nov 2014 04:47 Edited at: 2nd Nov 2014 04:55
Quote: "I hate version control, but I'll definitely be doing copy-paste backups from now on."


Use version control. Specifically, register an account at https://github.com/ and install http://git-scm.com/. I recommend the command line tool (install the "Bash" option) just because it's way more comprehensible than any GUI I've seen so far (you only need to know 4 commands in total). If you need help, hit me up on skype or post in TPC.

You'll hate it now, but you'll love it once you've used it a few times. It's nothing like SVN or any of those other horrible version control systems.

Just to re-iterate why making zip backup files is not a good idea:
1) Highly error prone.
2) No easy way to merge changes between snapshots.
3) No easy way to synchronize project with other machines.

Why github and git is awesome:
1) Can log comprehensible messages for every snapshot.
2) Built in issue tracker, milestones, and comments section for collaboration.
3) Your project is online and accessible at any time -> backed up.
4) Far more sophisticated method for bisecting bugs. Have you ever written a line of code that bit you in the butt months later?

I like offending people. People who get offended should be offended. -- Linus Torvalds
wattywatts
14
Years of Service
User Offline
Joined: 25th May 2009
Location: Michigan
Posted: 2nd Nov 2014 06:04
Quote: "Whaaaat. A) What actually happened? B) How do you mean, save your code in notepad?"

Don't tell me I'm the only one this happens to? If I make changes to my code in DBP and don't save the project, it still saves automatically when I close the program. So when I'm working on a project I copy and paste all my code in a notepad file instead of saving in DBP.
Clonkex
Forum Vice President
13
Years of Service
User Offline
Joined: 20th May 2010
Location: Northern Tablelands, NSW, Australia
Posted: 2nd Nov 2014 07:06 Edited at: 2nd Nov 2014 07:14
Quote: "Use version control."


I was waiting for you to say that

Quote: "Specifically, register an account at https://github.com/ and install http://git-scm.com/."


I have a github account (AFAIK), but I'm checking out the other website now.

Quote: "I recommend the command line tool"


As long as I can stick the commands in batch files, that's fine. I just hate having to type long cd commands just to run a simple command.

Quote: "(install the "Bash" option)"


You haven't forgotten I'm on Windows, have you?

Quote: "You'll hate it now, but you'll love it once you've used it a few times."


I already love the idea, but version control so far has been ridiculously fiddly and confusing.

Quote: "It's nothing like SVN or any of those other horrible version control systems."


I'm glad you said that. I didn't want to have to (yet again) turn down your advice, but I also didn't want to have to try and use SVN-type systems. I'll give git a go (alliteration FTW ).

Quote: "Just to re-iterate why making zip backup files is not a good idea:"


I wasn't intending to make zip backups. Just plonk a copy of the project folder messily on my desktop.

Quote: "1) Highly error prone.
2) No easy way to merge changes between snapshots.
3) No easy way to synchronize project with other machines."


1) Not at all error-prone: Delete desktop copy, copy-paste new copy to desktop.
2) I'm not trying to do version control! I'm just making backups in case I irreversibly break something.
3) I only have one machine and only ever intend to have one machine (at least for dev).

Quote: "Why github and git is awesome:"


Those features sound cool, but for the most part I still won't be merging code or forking or branching or whatever the terminology is. I only ever work on one version of the project and don't trust version control merging not to make a huge mess of my code. Also I don't write very modular code so replacing even a small thing with a different version could break my entire project. Shutup, I know you're probably horrified, but I'm just not very good at separating code systems.

To summarise, I still intend to give git a go. I'm just hoping it doesn't rely on fast or plentiful internet because I don't have either.

Quote: "Don't tell me I'm the only one this happens to? If I make changes to my code in DBP and don't save the project, it still saves automatically when I close the program."


I can't say I've ever heard of this before. Wait, you are using the DGS IDE aren't you? Not the crappy original DBPro IDE? It should look like this:



------------------------------------------------------

I have some news. I was in the process of trying to work out how I had divided up my GUI before when a had a *lightbulb!* moment. Shadow Copy! I quickly found my project's folder and checked, and.... YES. Thank you Windows!! Somehow - I don't know how - Windows seems to know which files I'm going to corrupt and save them in a restore point. It saved me once before, when AppGameKit crashed and erased an entire 600+ line source file. I panicked, and on a whim checked the Previous Versions tab, and lo and behold the file was there. I didn't even know I had System Restore turned on!

After the AppGameKit incident I always make sure I keep System Restore turned on. It only uses 10GB of HDD space and I can tell you right now it's worth it!

So I have my project back. It's about 3 days old, but in the last 3 days (as with the AppGameKit incident) I've barely worked on it at all, so it's almost exactly as it was when I broke it. Hooray for strange little Windows features that actually turn out to be really useful!

Rudolpho
18
Years of Service
User Offline
Joined: 28th Dec 2005
Location: Sweden
Posted: 2nd Nov 2014 11:33
Quote: "Don't tell me I'm the only one this happens to? If I make changes to my code in DBP and don't save the project, it still saves automatically when I close the program. So when I'm working on a project I copy and paste all my code in a notepad file instead of saving in DBP."

As far as I know it saves when you compile but it shouldn't when you close the editor unless you click the yes button in some "Do you want to save your changes"-esque popup box.
Of course this behaviour may vary between editors as Clonkex suggested.

Clonkex
Forum Vice President
13
Years of Service
User Offline
Joined: 20th May 2010
Location: Northern Tablelands, NSW, Australia
Posted: 2nd Nov 2014 12:37
Quote: "As far as I know it saves when you compile but it shouldn't when you close the editor unless you click the yes button in some "Do you want to save your changes"-esque popup box."


That's what I would expect, yeah.

Quote: "Of course this behaviour may vary between editors as Clonkex suggested."


Having the file save automatically when you close the program sounds very much like a TGC sort of thing to do, and AFAIK they wrote the original IDE Of course the DGS IDE wasn't written by TGC so it's fine

Dar13
15
Years of Service
User Offline
Joined: 12th May 2008
Location: Microsoft VisualStudio 2010 Professional
Posted: 3rd Nov 2014 00:05
Quote: " You haven't forgotten I'm on Windows, have you?"

There's a bash shell for Windows. It's probably one of the most portable pieces of software ever written(up there with Vim IIRC). But yeah, Git Bash is miles and miles above Windows CMD or even PowerShell in most common use-cases.

Quote: " Those features sound cool, but for the most part I still won't be merging code or forking or branching or whatever the terminology is. I only ever work on one version of the project and don't trust version control merging not to make a huge mess of my code. Also I don't write very modular code so replacing even a small thing with a different version could break my entire project. Shutup, I know you're probably horrified, but I'm just not very good at separating code systems."

If your code is really like that then Git will make you do a manual merge anyways since it'll detect a conflict. Then you can manually merge the code in to make it match. And even if you don't do branches(I usually don't for my personal projects either), the history that git keeps is useful all by itself for reverting changes and determining where bugs were introduced. The one sticking point about using Git for game development is that it doesn't track binary files very well and there's usually a lot of binary files that get passed around in game dev.

Quote: "1) Not at all error-prone: Delete desktop copy, copy-paste new copy to desktop.
2) I'm not trying to do version control! I'm just making backups in case I irreversibly break something.
3) I only have one machine and only ever intend to have one machine (at least for dev)."

Then your hard drive dies a sudden, unexpected death and you've lost everything. Or NTFS craps out and tosses half your project as a bad sector on the disk. Or a BSOD happens during a save and corrupts your project binary. True backups are necessary for all computer users, not just developers. At least put the folder backup on a separate hard drive if not on Dropbox or something.

Clonkex
Forum Vice President
13
Years of Service
User Offline
Joined: 20th May 2010
Location: Northern Tablelands, NSW, Australia
Posted: 3rd Nov 2014 02:42 Edited at: 3rd Nov 2014 02:43
Quote: "Then your hard drive dies a sudden, unexpected death and you've lost everything."

Quote: "True backups are necessary for all computer users, not just developers. At least put the folder backup on a separate hard drive if not on Dropbox or something."


?? What made you think I don't back up my drive? We have a 14TB custom-built expandable NAS (4TB dedicated for computer backups, 8TB for general storage, 2TB as parity drive for SnapRAID-based backup of general storage drives). The NAS is a recent (and very expensive ) addition to our home network, so I haven't actually set up the whole-computer backup system yet, but my entire HDD will be backed up within the next couple of days. Also, for the record, we didn't have to buy the drives all in one go because we'd already been using 14TB of external USB drives that we'd bought over the years; we just shucked and used those.

Quote: "Or NTFS craps out and tosses half your project as a bad sector on the disk."


What? I've never once seen NTFS remove data that was on a bad sector before.

Quote: "Or a BSOD happens during a save and corrupts your project binary."


Yeah, that could happen, but:

A) My computer is exceptionally stable. I haven't had a single BSOD (ok - maybe one whilst playing Assassin's Creed 3) since I built it more than 8 months ago.
B) This is what the copy-paste backup of my project folder is for.

Clonkex
Forum Vice President
13
Years of Service
User Offline
Joined: 20th May 2010
Location: Northern Tablelands, NSW, Australia
Posted: 3rd Nov 2014 02:46 Edited at: 3rd Nov 2014 02:46
Also, I just remembered I came back to this thread to complain about something else with Unity.

You can't GameObject.Find(..) inactive GameObjects.

AARGHGHGHAGJGJHGHJGRGHGRHGHGHGHGAHGHRGHGHGHGH!!!!!

Suppose I'd better get to work on my own management system.... *sigh*

Dark Java Dude 64
Community Leader
13
Years of Service
User Offline
Joined: 21st Sep 2010
Location: Neither here nor there nor anywhere
Posted: 3rd Nov 2014 04:27 Edited at: 3rd Nov 2014 04:27
@Rudolpho -- Off topic question: What font is that you use in your signature? I quite like it.

Seditious
10
Years of Service
User Offline
Joined: 2nd Aug 2013
Location: France
Posted: 3rd Nov 2014 06:48
Revisional backups (automatic with subversion) are a must with programming, if you ask me. Nothing worse than realising you removed some important code a week ago and don't have a copy of it anywhere.
Clonkex
Forum Vice President
13
Years of Service
User Offline
Joined: 20th May 2010
Location: Northern Tablelands, NSW, Australia
Posted: 3rd Nov 2014 07:13
Quote: "Revisional backups (automatic with subversion) are a must with programming, if you ask me."


I've never used revisional backups. Well actually, having said that, I just remembered my standard procedure with DBPro projects (and quite a few other languages/engines) is, just before making large changes, to copy the source files to a folder called "OldVersions\v1". Obviously the version number changes. I suppose that was a kind of rudimentary revisional backup system.

Quote: "Nothing worse than realising you removed some important code a week ago and don't have a copy of it anywhere."


Never had that problem, presumably because I spend so much time carefully considering any changes before making them. That's probably why I never finish any projects either

Indicium
15
Years of Service
User Offline
Joined: 26th May 2008
Location:
Posted: 3rd Nov 2014 15:34
I don't see your aversion to programs designed to back up code. It becomes habit and effort free to just click commit in git and you no longer have to worry about ever losing that code.
Dar13
15
Years of Service
User Offline
Joined: 12th May 2008
Location: Microsoft VisualStudio 2010 Professional
Posted: 3rd Nov 2014 16:44
Quote: " Never had that problem, presumably because I spend so much time carefully considering any changes before making them. That's probably why I never finish any projects either "

It only takes once, trust me.

TheComet
16
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 3rd Nov 2014 16:51
Use version control.

I like offending people. People who get offended should be offended. -- Linus Torvalds
Indicium
15
Years of Service
User Offline
Joined: 26th May 2008
Location:
Posted: 3rd Nov 2014 16:55
Quote: "Version control."
Quote: "Use version control."
Quote: "Revisional backups (automatic with subversion) are a must with programming"


There is no argument for copying and pasting folders that beats proper version control.
Rudolpho
18
Years of Service
User Offline
Joined: 28th Dec 2005
Location: Sweden
Posted: 3rd Nov 2014 21:58
Quote: "@Rudolpho -- Off topic question: What font is that you use in your signature? I quite like it."

It is Eight One with ~10% extra thickness.

Clonkex
Forum Vice President
13
Years of Service
User Offline
Joined: 20th May 2010
Location: Northern Tablelands, NSW, Australia
Posted: 3rd Nov 2014 23:26
Quote: "I don't see your aversion to programs designed to back up code."


I have none. I have a strong aversion to overcomplicating things, however, and that has been my experience with version control up to this point.

Quote: "It only takes once, trust me."


I'm aware, which is why I'm always careful and make copy-paste backups before changing anything big.

Quote: "There is no argument for copying and pasting folders that beats proper version control."


The argument is for simplicity. "Proper version control" can be SVN as well, which is definitely not simple.

But as I said already, I intend to give git a go. Which means I will try version control. I did say this already, didn't I?

TheComet
16
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 3rd Nov 2014 23:34 Edited at: 3rd Nov 2014 23:35
There's a reason why git is used by nearly 60% of the entire open source community, and why every sane programmer these days uses some form of version control - even the insane ones.

See the average rank for the 5 most popular VCS (bottom right diagram):



Use git. If you don't like git, learn to like it. Zip backups are a terrible idea and you should be ashamed for considering that.

I like offending people. People who get offended should be offended. -- Linus Torvalds
Clonkex
Forum Vice President
13
Years of Service
User Offline
Joined: 20th May 2010
Location: Northern Tablelands, NSW, Australia
Posted: 3rd Nov 2014 23:37
Quote: "Zip backups are a terrible idea and you should be ashamed for considering that."




^^ That's my ashamed face.

Dar13
15
Years of Service
User Offline
Joined: 12th May 2008
Location: Microsoft VisualStudio 2010 Professional
Posted: 4th Nov 2014 04:25
Quote: " I have none. I have a strong aversion to overcomplicating things, however, and that has been my experience with version control up to this point."

You do realize you don't have to use a command line to use Git right? Or SVN? They have very nice GUIs you can use so that it's literally a button press to commit all changes you've done and another press to push it to a remote repository(if you decide to do that, you don't have to).

And SVN is dead simple. It's one of the simplest forms of version control, I use it at work all the time (Just to head you off Comet, SVN is a better fit for the work environment here that's why it's used. I personally prefer Git but SVN isn't all that painful to work with).

I'm curious as to how you've gotten such a bitter taste in your mouth from version control.

Clonkex
Forum Vice President
13
Years of Service
User Offline
Joined: 20th May 2010
Location: Northern Tablelands, NSW, Australia
Posted: 5th Nov 2014 12:42 Edited at: 5th Nov 2014 12:47
Quote: "You do realize you don't have to use a command line to use Git right? Or SVN?"


Yup, I started out with a GUI with SVN.

Quote: "They have very nice GUIs you can use so that it's literally a button press to commit all changes you've done and another press to push it to a remote repository(if you decide to do that, you don't have to)."


Noooooo, they are NOT nice GUIs! TMB syndrome. (hmm... I just googled that term, and it appears it normally stands for Typical Male Behaviour... I meant Too Many Buttons)

EDIT: Oops, wrong image. Hangon a sec while I find the one I MEANT to link...

THAT is not a simple interface. (Incidentally, that's just a Google Images image; I'm not running Windows XP ) Add to that the fact that all the tutorials I've found assume prior knowledge of SVN and the fact that I just could not work out how to make it upload my current files and you can see why I didn't like it. It just seemed really, really fiddly, slow and seems to take up a LOT of disk space.

TheComet
16
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 5th Nov 2014 12:55
I can't see the image

I like offending people. People who get offended should be offended. -- Linus Torvalds
Clonkex
Forum Vice President
13
Years of Service
User Offline
Joined: 20th May 2010
Location: Northern Tablelands, NSW, Australia
Posted: 5th Nov 2014 13:11
Ok, so after searching for the image I meant to link, I can't find it. I also can't find any others that show what I'm talking about in my last post. I can picture in my mind what the interface looked like, and it wasn't good, but for the life of me I can't remember exactly what program it was. I thought it was TortoiseSVN, but none of the images seem to match.

Anyway, so I decided to just jump straight in and download GitHub for Windows, which is supposed to be easy to use, but right away I'm stuck:



If I already have a project with files in it, how would I tell it where to find that and make it use that folder as the repository?

Van B
Moderator
21
Years of Service
User Offline
Joined: 8th Oct 2002
Location: Sunnyvale
Posted: 5th Nov 2014 13:19
I'm not a huge fan of version control either with game projects. For professional stuff, like work systems and databases I have quite a strict version control and deployment procedure... but for games... to me it just detracts from creativity.

Like, with version control, it's easy to switch back to a version of the software before adding something - but what if the thing you wanted to add is really cool, what if it's the only thing making your project unique. It's too easy to bottle it and switch back to an earlier version, whereas without version control the only real option is to persevere and get it working, or take it out again... but taking it out is as much a hassle as adding it, so your more likely to persevere I think - put in more effort to understand the issues and how to get around them and increase the likelihood of the feature actually making it into the game.

I prefer to view game projects more organically, I tend not to have design documents or exacting designs or procedures for anything. I prefer to spend development time on the project, not maintaining it, and that's worked for 1.2.3... 13 completed game projects!. I think it's better to have a straightforward backup routine that you know inside and out and can perform before any major updates or code changes, it should be stored on an external or separate drive - anything more than that for a solo project is just inviting procrastination IMO.
For projects that involve more than just yourself, version control is much more relevant, but again it's something that should be fully understood by all users otherwise it does more harm than good.

I am the one who knocks...
Clonkex
Forum Vice President
13
Years of Service
User Offline
Joined: 20th May 2010
Location: Northern Tablelands, NSW, Australia
Posted: 5th Nov 2014 13:23 Edited at: 5th Nov 2014 13:24
Quote: "anything more than that for a solo project is just inviting procrastination IMO."


And I cannot afford to invite procrastination; he invites himself around far too often as it is

Quote: "For projects that involve more than just yourself, version control is much more relevant"


Yes, I totally understand the need for version control systems when more than one person is trying to work on the same files.

------------------------------------

Ok, so I worked out how to make GitHub stick a repository in my project folder (after backing it up of course!), but then I discovered that GitHub costs $7/month for private repositories. Well, goodbye GitHub and hello BitBucket.

TheComet
16
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 5th Nov 2014 14:09
Quote: "If I already have a project with files in it, how would I tell it where to find that and make it use that folder as the repository?"


It looks like you've downloaded the server software for github. I'm not sure why you'd need that unless you plan on not pushing to www.github.com.

I've never used a GUI so I apologize if this is not the solution you seek.

On github.com, create a new repository:





Once created, copy the URL to your clipboard - you'll need it so git knows where to push to:



Start Git Bash. You'll need to initialise your project with git. You can do this with the following:


You will notice a hidden file in your project folder called ".git". This is where the entire repository will be stored. You will also notice that on the command line before the "$" symbol the words "(master)" appear. This means you're in a git repository and it's on the branch "master". This probably means gibberish to you right now, but after a few pushes you'll start to understand.

Next, you need to tell git where to push and pull changes to/from. This is where you paste the URL you copied earlier, but with a slight modification:


The second command you may learn later on. It tells git that the current branch you're on

Important: Notice how I added "TheComet93@github.com"? You should do that with your repository as well, only use your username and not mine.

That's basically it. You're set up.

The next step is to pull the README.md and LICENSE file from the git repository, and then push your project to github.com.

To pull:


To check what files have changed (right now, everything will be red because you've not committed anything yet):


To push your files:


Git may ask you to configure your e-mail and user name. If so, you can do that with:


That's all you really need to know. From now on, pushing changes is always done with the 4 commands:


I like offending people. People who get offended should be offended. -- Linus Torvalds
Dar13
15
Years of Service
User Offline
Joined: 12th May 2008
Location: Microsoft VisualStudio 2010 Professional
Posted: 5th Nov 2014 15:12
@TheComet
He wants a GUI solution, so setting him up with the terminal way of doing things wouldn't help.

@Clonkex
You create the repository in the directory where your project is. Then you would add all of your files you want to be in version control to the repository from within the GUI.

And an example of a good GUI for Git would be SmartGit. Not necessarily Github.

The Zoq2
14
Years of Service
User Offline
Joined: 4th Nov 2009
Location: Linköping, Sweden
Posted: 6th Nov 2014 22:14
Quote: "I'm not a huge fan of version control either with game projects. For professional stuff, like work systems and databases I have quite a strict version control and deployment procedure... but for games... to me it just detracts from creativity."


I don't see how version control would limit creativity. When working alone I don't use it that much except for 2 things. First is moving between computers, I just commit the changes on one and pull it on the other. The other thing is when I want to make a change that might potentially break my code (like a big refactoring), instead of doing a backup manually I do it using git and I can roll it back if I fail. And that also means that I get a non-local backup which is safer without doing anything else.

Say ONE stupid thing and it ends up as a forum signature forever. - Neuro Fuzzy
Clonkex
Forum Vice President
13
Years of Service
User Offline
Joined: 20th May 2010
Location: Northern Tablelands, NSW, Australia
Posted: 7th Nov 2014 00:15
Quote: "I've never used a GUI so I apologize if this is not the solution you seek."


Nice guide! You've spent a while making that... which is why I'm wondering if you saw that I'm not using GitHub now:

Quote: "but then I discovered that GitHub costs $7/month for private repositories"


Quote: "@TheComet
He wants a GUI solution, so setting him up with the terminal way of doing things wouldn't help."


Actually, surprisingly, it does help a bit. I can more of what's really going on with commandline.

Clonkex
Forum Vice President
13
Years of Service
User Offline
Joined: 20th May 2010
Location: Northern Tablelands, NSW, Australia
Dar13
15
Years of Service
User Offline
Joined: 12th May 2008
Location: Microsoft VisualStudio 2010 Professional
Posted: 7th Nov 2014 02:50 Edited at: 7th Nov 2014 02:50
That's for private repositories. If you want free private repositories, you can use BitBucket(bitbucket.org). I can almost guarantee you that your project will not be forked or really even looked at until it's extremely popular on GitHub.

Also if you're a student you can get 3 private repositories for free as well as a bunch of free development software(including UE4).

Clonkex
Forum Vice President
13
Years of Service
User Offline
Joined: 20th May 2010
Location: Northern Tablelands, NSW, Australia
Posted: 7th Nov 2014 03:26
Quote: "That's for private repositories. If you want free private repositories, you can use BitBucket(bitbucket.org)."


I know. That's why I said, "Well, goodbye GitHub and hello BitBucket."

Quote: "I can almost guarantee you that your project will not be forked or really even looked at until it's extremely popular on GitHub."


Yeah, but the problem is that I intend for my game to become really popular (doesn't everyone? ) and then if I wasn't quick enough in changing back to a private repo someone might grab the code.

Dar13
15
Years of Service
User Offline
Joined: 12th May 2008
Location: Microsoft VisualStudio 2010 Professional
Posted: 7th Nov 2014 04:26
Quote: " I know. That's why I said, "Well, goodbye GitHub and hello BitBucket.""

Didn't see it due to the page being stretched out on my screen.

Clonkex
Forum Vice President
13
Years of Service
User Offline
Joined: 20th May 2010
Location: Northern Tablelands, NSW, Australia
Posted: 7th Nov 2014 05:09
Quote: "Didn't see it due to the page being stretched out on my screen."


lol

Login to post a reply

Server time is: 2024-04-23 13:31:22
Your offset time is: 2024-04-23 13:31:22