Jump to content

  • Log In with Google      Sign In   
  • Create Account

Banner advertising on our site currently available from just $5!


1. Learn about the promo. 2. Sign up for GDNet+. 3. Set up your advert!


Robot Ninja

Member Since 01 Jul 2011
Offline Last Active Jul 07 2014 04:54 PM

#5057083 Best time to commit changes to repo...and branching?

Posted by Robot Ninja on 26 April 2013 - 03:22 PM

Since I've been working on a fairly large scale project of my own (2D level editor using XNA/Monogame), I've been using version control much more so than in the past, namely Git. I usually commit both when I feel like I've made major progress (several hours of work) in my code and when the code compiles. This doesn't appear to be the best practice, and I wanted to get some opinions of when it is best to commit to the repository. When do you usually commit?

 

Also if I'm just working off of a personal repo, what situations call for branching code? So far the only situation I could think of is when I want to try an alternative implementation in my project, and don't want to mess up already functioning systems. I would like to learn more "best practices" when it comes to utilizing version control. I would love to hear any advice. It's a bonus if someone is able to share Git-specific techniques. biggrin.png




#5023574 Version control for begginers

Posted by Robot Ninja on 20 January 2013 - 12:54 PM

+1 for Git. The nice thing about Git too is that you can keep a local repository if you don't want/can't get an online one. If you want to learn more about Git, Scott Chacon created an online version of his book, Pro Git, which is free to view. Of course if you feel like you're getting a lot out of it, you're encouraged to purchase his book to support his hard work. smile.png I also like to use Git Extensions with Visual Studio because it provides a nice little interface for handling my repos, rather than doing everything via the command line. There are a ton of other GUI's for Git out there too if you want to check out some other ones. Some of them are listed here. Good luck!




#5011984 A gaming PC

Posted by Robot Ninja on 18 December 2012 - 04:53 AM

If you just have the intention of making a 3D game, one that's not too graphically intensive (i.e. not like Crysis), then I think it would be better to invest in a laptop so that you can make your game on the go. On the other hand, if you're planning on making a graphically demanding and/or using this PC to play the latest and greatest games, then build yourself a nice gaming PC with a good CPU, GPU, and RAM (8 GB is good to start with).


#4989260 Sorting a Linked List

Posted by Robot Ninja on 11 October 2012 - 02:54 PM

If you want to implement sorting algorithms it's best to make sure you understand them completely so you can be sure they run as intended. It's very easy to make a sorting algorithm very inefficient by not implementing it correctly.

For string sorting you'll want to take a look at Radix Sort
For general purpose sorting you could take a look at Quicksort or Mergesort which are O(n log n) average case solutions which do not sort in-place, or Heapsort which can sort in-place.


Yes, you should get an understanding of some sorting algorithms first. If you can only use 1 singly linked list, then you would probably have to have functions to sort the names and health and then output it...BUT that's a terrible waste of cycles if you plan on outputting multiple times. What you should do is sort the data as it's being added to the list. So I wonder...

If you're looking for a more efficient method, then the Sorted list can't be a singly linked list.


+1 If you're using a linked list, but aren't restricted how many nodes you can keep track of, then what would be good in your case is if you had two pointers in your "HealthProfile" class (name it whatever you want, pointing to the node with the next name and the node with the next health score, respectively. Technically, the class would contain two singly linked lists inside of it - a double singly-linked list (lol). As you add data to the list, your class should be doing operations on each of those lists to keep them in order. Then when you want to output the names in order, you would iterate through the name nodes, and when you want to output the health scores in order, then you would iterate through the health nodes. Please let me know if you need clarification. I explain things in a confusing way sometimes, but it makes sense to me.

*EDIT* Sorry I used the term "pointer". C++ is my primary language, and I don't know what you work with.


PARTNERS