Inside Look – Git Flow

Working on small projects, picking up a version control system (VCS) was hardly a must for me. I don’t any project here has ever had more than 4 people working on it at once. Nevertheless, using Git and a well established process can be incredibly useful for even the individual coder. It allows a one (or multiple people) to work on multiple paths of a project without (or at least little) worry of seriously corrupting the source code. Git is known as a decentralized version control system. There is no one golden repository which everyone must work from. In fact, any individual has their own copy of the repository which they can use to track their own local changes as they’re working. There are many ways to use Git to keep on top of a project and I think everyone finds their own style, but I’d like to share what I’ve been using.

My projects consist of two main branches, master and develop. These branches will always exist and will never be removed.

The two main branches.

The two main branches.

Master is considered sacred and only touched if a completely sound production release is ready. Instead, develop contains typically the latest, active, and (reasonably) working code. When a the team has a new feature they want to introduce, they create a branch off of develop. This is called a feature branch. This is worked on until completed and then merged back into develop. Sometimes, merges may happen before a feature is fully completed. Maybe there was a specific change that needed to be present in develop for other feature branches or some bug was found.

A feature branch example

A feature branch example.

In a perfect world, these are all the branches of code you would ever need to care about. There are many corner cases that can occur where you may need to create a hotfix branch to fix a bad release on master, you may have a feature with sub-features being worked on, and many more. For a nice example, here’s a bigger picture of what that may look like.

A full Git Flow example.

A full Git Flow example.

Huge credit goes to Vincent Driessen for these images. You can find his post at http://nvie.com/posts/a-successful-git-branching-model/ which describes the full process. Over a year ago when I was just getting into this Git thing, his post allowed me to finally grasp a good method of using this powerful tool.

Tagged , , ,

Dev Update – Parallax!

I’m sure you’ve played a few 2D side-scrollers. I’m sure some of those implemented parallax scrolling as well. If you don’t already know, parallax can be described as follows:

Parallax is a displacement or difference in the apparent position of an object viewed along two different lines of sight, and is measured by the angle or semi-angle of inclination between those two lines. As the viewpoint moves side to side, the objects in the distance appear to move slower than the objects close to the camera.

One great example of this is standing in a forest, looking out and seeing many tree trunks. If you focus on one tree as you side-step in one direction while looking forward, you’ll see trees farther away are moving slower and trees closer are moving faster in respect to the one you chose to focus on. Making sense? Good! Anyway, I wanted to show a quick clip of what our parallax looked like.

Parallax in the flesh!

Parallax in the flesh!

Neat, huh? The process behind this is actually remarkably easy. Each “layer” of art gets its own parallax factor. This is just a multiplier that will be applied to the speed of the camera moving. If the parallax factor is less than 1 but greater than 0, the layer will move slower than the camera (such as the ocean at 0.8). If the factor is negative, they will move faster than the camera (such as the light posts at -.1). The pavement, pillars, and the car are all on the same layer as the player, so they move at normal speed (essentially 1.0).

Also, giving a shout-out to GifCam which was used to make this gif. Super easy and free (donations accepted!). Pretty much as good as the Snipping Tool for Windows. Will definitely be using in the future for posts here.

Tagged , , ,

Dev Update – Adjusting Art Style

Before making this post, I realized I didn’t have a category for simply posting updates on work that wasn’t tied in to some release or patch notes. Well, I guess now is as good as any to introduce Development Updates! For the premiere of these posts, I wanted to show a little teaser of our current and possibly future art style we’ll be going with.

The current style being used.

The current style being used. http://ashnovember.com/

Pretty sweet, huh? You can thank Stewart Leith for that and check out more of his work at his own blog. Those waves are animated, too! Obviously, we went with a bit of a retro, pixelated look. Nothing wrong with that, but it turned out to be quite limiting (just check out Stewart’s stuff, epic potential!). So yesterday, he sent me a simple concept of what the new look could be, changing the game into more of a platformer than a runner.

The planned style for the near future.

The planned style for the near future. http://ashnovember.com/

Much more painterly, interesting to look at, and putting some parallax onto these scenes is gonna be a treat. Maybe I can get some gifs up then to show that off. Might even play around with the current scene to test it. Anyway, I hope that has wet your appetite for a bit of content for now. More to come later this week!

Tagged , , ,

More on Git

So with the new project, I’ve chosen to stick with good ol’ git to manage our version control. This is quite a challenge when it comes to Unity3D, as there’s a large number of irrelevant files that will get changed, added, and deleted which really should be ignored. In comes .gitignore. Without it, version control in Unity would be a nightmare. It took me a bit of searching to find a nice list of the type of files I should be excluding, so I want to make sure to post it here for anyone else that might need it:

# =============== #
# Unity generated #
# =============== #
Temp/
Obj/
UnityGenerated/
Library/

# ===================================== #
# Visual Studio / MonoDevelop generated #
# ===================================== #
ExportedObj/
*.svd
*.userprefs
*.csproj
*.pidb
*.suo
*.sln
*.user
*.unityproj
*.booproj

# ============ #
# OS generated #
# ============ #
.DS_Store
.DS_Store?
._*
.Spotlight-V100
.Trashes
Icon?
ehthumbs.db
Thumbs.db
/*.csproj
/*.sln
/*.userprefs
/*.sln
/*.csproj

Also, just starting using Sourcetree instead of TortoiseGit to have a bit more of a visual process for those new to VCS’s. They’re also the makers of bitbucket.org which we’re using to host the project so obviously the support is there! Currently exploring the possibilities of GUI elements for Unity! Quite handy (and a hell of a lot easier than using pygame to make simple windows!).

Tagged , ,

Hello Again World!

It’s been while (over a year!) since I last posted here. Work got busy, the Java game fell through, and just didn’t have time to mess around with my Python project or blog. Well, I might get back into this as an artist friend of mine has been interested with learning Unity3D and experimenting with creating a game. I, also been wanting to check out Unity3D, eagerly jumped on board to help out with the scripting. So, from Python to Javascript and now to C#, I seem to be getting a healthy exposure to some common scripting languages! 

Unfortunately, this project is a private one to protect our art assets. We may open it up in the future or may pursue actually trying to put something on the app market. Who knows! Either way, I’d still like to post what I can here and maybe show off some releases if we can ever make something presentable! 

Tagged , , , ,

Inside Look – pyjs

Although not directly affiliated with my own personal project, I still want to try making some posts about interesting Python things I run across and use. Today’s Inside Look is about pyjs! I mentioned it in my last post, but I wanted to give a little more insight into it and why I have been using it.

Now that I’ve been working on some web development, I was thinking my only options would be Javascript and some CSS. I started doing some self-learning to review what Javascript I knew, but for what our team wanted to do, it felt so cumbersome and difficult to will the code to my expectations. This spurred me on to look for some alternative, maybe a way that I could stay with Python, but have all power and control that Javascript has. I nearly immediately ran into pyjs, the Python web app developer’s best friend. It quite literally converts your written Python code into Javascript. There is a large support for most of Python’s built-ins and most imported modules seem to work just fine. I’ve had some issues with using time.sleep(), but I may just be doing something wrong. Pyjs also includes its own module which contains a large amount of UI classes to use and expand upon.

I’ve been designing the prototype for the game using Panels. These are simply cells in a table. Eventually, I would like to progress to using the Canvas. This will probably require more art assets (just basics available right now) and some re-organizing of existing code to be more Canvas, less table. I’m having a meeting tonight with the three other team members to go over weekly progress and what we’d like to focus work on. Hopefully we can get a place to host our app (we’re looking at Chrome Web Store) so we can get testing on multiple platforms and make it easily available for people to play!

If pyjs just isn’t flexible enough or proves to much of a hurdle just to use Python, we may eventually switch over to Javascript. At least transferring Python over to Javascript will be easy!

Tagged , ,

A Little Break from The First Fantasy

With v0.1 released, I feel like it’s in a nice, stable place to sit for a little while. In the meantime, I’ve volunteered to join a small group of my friends in our attempt to make a web game. This is something I’ve never really done before. JavaScript is mostly foreign to me, especially CSS and advanced web concepts. However, I’ve found and have been using a handy tool called pyjs (or PyJamas). It literally takes your python code and compiles it into JavaScript. It also provides a number of modules to facilitate a more “web focused” design. This is also my first “real” attempt at running the entire game through GUI elements.

We’re starting off with a simple Blackjack game to make sure we can get through the entire process (brainstorm, design, art, code, web stuff, hosting) without too many problems. If it all works out and we’re mildly impressed, we may try to make some actual attempts at bringing in some money with future games. It should be fun and already is a definite learning opportunity. I’ll post some information about it when I can, but we’d like to be as hush-hush about it until we know what the hell we’re doing!

Tagged , , ,

Release – v0.1

Summary

It’s here! Although lacking in significant map/travel changes, 8 other significant changes have been made. Many of the changes have been to items and inventory usage while in combat. The market (used to be the shop) is now working in towns and only supplies existing consumables. More interesting things will be added here for sure as a way for the player to gather gear that they may have missed while exploring. Saving and loading games now allows any name to be used for the file. There is no overwrite warning for now, but it will be put in soon. Otherwise, enjoy the game! Send in your feedback or even make some contributions!

Changelist

  • Run option in combat
  • Player can now “die” can not fight until healed in some way
  • Rework and cleanup of inventory and item equipping
  • Inventory is now usable in combat, but equipping gear will skip your next turn
  • Clearer inventory messaging
  • Market system added
  • Save system overhaul

Known Issues

Contributors

Download

Windows Only Executable: 0.1

Source: 0.1

Tagged , , ,

Wrapping up v0.1

I haven’t posted in awhile as I’ve been pretty busy this last weekend getting my girlfriend moved in and with the release of Guild Wars 2, but I have done a few updates on our code and we’re getting close to getting v0.1 ready. You can see here that there are only a few issues left. Map readability may not make it into this release unless someone finds a quick, awesome way of going about it, but as of now, I don’t think it’s work throwing too much time into as it is “working” already. This release will definitely feature all functionality in place. There won’t be an option that doesn’t work or an operating system unsupported. The features may not be as polished as I and others would like, but there will always be room for advancement.

After this release, I’m going to be changing the Downloads page to include the following for each release (if applicable):

  • Executable (Windows Only)
  • Source Zipball
  • Changelist Post
  • Contributors: <List of Contributors>

I found that I could actually choose any commit from the repository’s history and download the Zipball at that moment in time. This should allow me to link to the specific releases instead of overriding each time when the “master” get branch will be updated with a new release or patch. Anyway, I’m going to be at PAX this weekend, so unless something amazing happens code-wise, the release should be out early next week.

Tagged , ,

Getting Started With Git

I’ve chosen to use git as my version control system (VCS) for The First Fantasy that is currently hosted on github. Git is a more complicated VCS than some others such as Subversion, but it provides a few features that is only possible with a fully distributed workflow. Simply, git allows each developer to have their own private copy of a remote shared repository that can be modified and changed without effecting anyone else’s work until the developer decides to push their local changes (called commits) into the remote repository.

Git has a full range of powerful console commands, but if you’re looking for the convenience and visual ques of a GUI, there’s a number of options out there. I currently use EGit, a git package for Eclipse that integrates itself into the tool. The official git site features a number of GUI clients. I highly recommended using GitHub as it integrates well to their project hosting site, SmartGit, or the built-in GUI (gitk and git-gui) that comes with git. For those wanting to bust out your command prompt skills with git, this is a nice guide that will get you started.

To make a clone of my project and get started, all you need to do is give the following command:

git clone git://github.com/Bluedagger21/the-first-fantasy.git

If you have any good experiences with a particular way of using git, fill us in!

Tagged , ,
%d bloggers like this: