Saturday, December 05, 2009

Two little Git helpers

Git is really powerful but some of its commands can be very obtuse. Two little helpers I have in my .gitconfig that I thought some of you might find useful are

[alias]
uncommit 
reset --soft HEAD^
unstage reset HEAD 

The uncommit will back out the last non-pushed commit. Unstage will do as it says, remove a file from the staging buffer.

The alias section is a great place for your shortcuts.

 

Posted by Stu on 12/05/2009 at 11:18 PM Permalink to this post.
Filed Under : ComputersDevelopment
Comments are closed There are no comments on this entry.
Tags: ,

Friday, February 06, 2009

Release .. 7DRL Tomb of Rawdin

Well, Im in before the deadline, I could have spent a few more hours testing/balancing but I’m done..

I cranked this sucker out so most of the code lies within main.c/dungeon.c there is support code I pulled from cnc like my memory management code, astar. It uses libfov, libtcod (+sdl), etc.

The game was designed to kinda play like the original rogue, but without the food factor.

The name was supposed to be in the spirit of the
Amulet of Yendor / Rodney…
Wizardry / Trebor + Werdna…

Rawdin.. Darwin.. only the strong survive…

blah. cheesy I know.

What didn’t make it into the game in time… Quite a few things actually…

The biggest omission was the lack of better magics, and there is no ranged anything. It is all bump combat.

Scrolls and Potions are limited and mostly gimicky but some really do help (cure poison, poison resistance, etc.)

Some of the buffs didnt get used…

If it were continued the todo list would be;

Finish the attributes that were half done
* Fire / Ice / Acid
* More items
* More monsters
* Lessen the AStar affect (astar pathing makes it overwhelming/too precise)
* Ranged weapons/magic?

Dragons on level 10 need to be buffed up a bit more too.

Thoughts…
I did initial design for fire/ice and other stuff but didnt really get around to using them in game. ASTAR makes life hard, as in all the monsters on the map with astar flag beeline to you and suddently your surrounded by 10 enemies and nowhere to go….

LibTCOD has some odd designs.. To print a single char you need 3 function calls (char, foreground + background colours).. Then there is the whole pile of crap that is the TCOD_BKGND_SET flag stuff, set/none/add/blah, but that is just me. Console emulator doesnt give you proper console colours… where is brown? Cyan, light cyan, light green, etc. but hey, I do get 3 variations of yellow, 4 of red/orange. Oh there is a dark brown but its so close to black its worthless. Silver and Grey are so close there is little difference.. only 1 green?

Should at least give us the proper 16 colour defaults, then the extra’s.

At least it has a rich set of functions for defining your own colors
(Nice work there!).

To me it feels backwards (col,row), I’m too used to row,col calling, but thats a personal thing…

Redefines true/false (hello! super bad behaviour!!!) without using stdbool which is not what libfov expects… also means you cant include stdbool in your headers (and the header files are not properly extern’d for C usage)

All in all, these are just minor things easily fixed, despite this, jice did an amazing job on libtcod.

Things I should have done but didnt; Use offscreen buffers for message/stat window rather than redraw EVERYTHING every frame…

I came to like TCOD in the end after the intial cringe, so I might consider movinv CNC from my own SDL console emulation to use TCOD instead.

oh links…

homepage
http://redmine.bloodycactus.com/projects/rawdin/wiki

downloads;
http://redmine.bloodycactus.com/projects/rawdin/files

source;
git clone git://bloodycactus.com/rawdin

Posted by Stu on 02/06/2009 at 03:32 PM Permalink to this post.
Filed Under : ComputersDevelopmentGeneral Development Releases
Comments are closed There are no comments on this entry.
Tags: , ,

Tuesday, November 25, 2008

GIT merge bug?

So before I did a merge of one of my local branches into another I thought I’d checkout the man page..

GIT-MERGE(1)

NAME
       git-merge - Join two or more development histories together

SYNOPSIS
           git-merge [-n] [--stat] [--no-commit] [--squash] [-s ]...
                   [-m ]  ...
           git-merge  HEAD ...
--no-commit Perform the merge but pretend the merge failed and do not autocommit, to give the user a chance to inspect and further tweak the merge result before committing.

I truncted the entry so you could see the relevant info…

so I did

sgeorge@cactus:~/git/fishguts (combat)$ git merge --no-commit fuzion
Updating 52912c2..5445153
Fast forward
 docs/fuzion.png          |  Bin 0 -> 213272 bytes
 docs/monsters.yaml       |   12 ++
 gfx/fuzion_gp2x.pcx      |  Bin 0 -> 13029 bytes
 gfx/fuzion_gp32.pcx      |  Bin 0 -> 13029 bytes
 gfx/fuzion_pc.pcx        |  Bin 0 -> 32872 bytes
 gfx/fuzion_psp.pcx       |  Bin 0 -> 22711 bytes
 gfx/rantfile             |    4 +
 scripts/debug_cheat.lua  |    2 +
 scripts/load_items.lua   |    2 +-
 scripts/main.lua         |    4 +
 scripts/newgame.lua      |  298 +++++++++++++++++++++++++++++++++++++++------  
 scripts/skills_stats.lua |   10 +--
 scripts/stats.lua        |   15 +++
 src/combat.c             |   32 ++++-
 src/font.c               |   18 ++-
 src/fuzion.c             |   37 ++++++

OK, so our fake merge looks good.. Lets run the proper thing

sgeorge@cactus:~/git/fishguts (combat)$ git merge fuzion -m "Merge fuzion branch"
Already up-to-date.

err… WTF!!!!!!

The —no-commit didnt do squat!

Luckily for me its what I wanted but err… WTF?

So I googled… mmm here

From: Alex Riesen 
To: Michael Dressel 
Cc: 
Subject: Re: git merge --no-commit ; does commit
Date: Thursday, December 13, 2007 - 5:19 pm

  On 13/12/2007, Michael Dressel  wrote:
  quoted text
  > git merge --no-commit  does "create" a commit. At lesat the 
  > head and index are moved to the new commit fetched from . Maybe 
  > that is because git was able to do a fast forward?

Yes. Because fast-forward is what it called: fast-forward.
It does not do any commits at all.
-

So the whole do not auto commit and automatically fail doesn’t mean squat… oh and while we are at it, lets change what the meaning of the word ‘commit’ actually is. Maybe the word ‘commit’ is too ingrained into my head from our Oracle RAC’s set to require explicit commits. The whole “it doesnt _reaaallly commit it just um kinda sort does but we call it something else” is bogus.

There are two things confusing me overall here, does “—no-commit” mean that it will merge and leave the merged changes in the staging area or leave them as modified files? or does “—no-commit” mean that it wont change the content of ANY file and leave everything as it was before running the command?

Its probably another PEBKAC on my end, but I guess I’m too dumb to understand the obsfucated meaning of “—no-commit” and the whole

“Perform the merge but pretend the merge failed and do not autocommit, to give the user a chance to inspect and further tweak the merge result before committing”

thing

Posted by Stu on 11/25/2008 at 08:44 PM Permalink to this post.
Filed Under : ComputersDevelopmentFishguts
Comments are closed There are no comments on this entry.
Tags:

Wednesday, January 23, 2008

Git and Cracks and Crevices, 7 Day Roguelikes blah blah blah

I’m slowly migrating my development work from bazaar to git as my version control system of choice. The first time I tried git I did not like it, but the newer versions are much nicer and so far, I’m not looking back.

I had to muck with repository permissions to get gitweb working correctly. meh. http://bloodycactus.com/git gives you a web view of the repo/commit info etc.

Its very… disconcerting to do a commit AND push have it return instantly where bazaar would just… work its magic and come back after a minute or two. The speed difference is truly amazing, and for the most part I have kept the exact same work flow, all I needed to add was a push step after I commit. Obviously bazaar was pushing the entire file over sftp and git is only pushing the deltas but even for small files thats a huge difference.

It would be nice if when I did a commit, like bazaar, it auto gpg signed my commit.

Right now I have a public read-only git repository for one of my roguelikes and write permissions for me using gitosis, making Cracks and Crevices my test project, which you can pull from

git clone git://bloodycactus.com/cnc.git

On to other game development news, I’ve made my redmine install available publicly now too (here). This puts the bug and issue tracker, wiki, etc all open to the public in a read only mode.

Since I am keeping all the design notes in the wiki for Fishguts, I made its user status private (it has the walkthrough and all the other import bits in it, and I cant restrict what pages are public and non-public)... I think what I really need is just to have a secondary private project whereby the wiki is all I use in it so all the issues and other bits are public sans the wiki.

Hmm I need to think of an idea for this years 7 Day Roguelike (7DRL) competition. I can reuse the framework of CnC, just need to re-write it.

 

 

Posted by Stu on 01/23/2008 at 10:02 PM Permalink to this post.
Filed Under : ComputersDevelopmentCracks and CrevicesFishguts
Comments are closed There are no comments on this entry.
Tags: , ,

Sunday, October 21, 2007

Converting from Bazaar to GIT

I’ve been poking around with GIT and thought I would do a test and convert one of my repos over.

After a LOT of messing about and false starts I managed to figure out what Tailor was trying to do, I converted one of my bzr repors.

Yes its nice and fast. Some things are like huh?  If I want to revert my changes I have to check them out… revert does something else.

I want to like it.. it just doesnt fit to my needs. I cant bind to a master repository, I have to push.. and I’m forgetful, I remember to commit but doing a push is an extra step.

and the biggest downside, you need a ‘smart’ transport, aka git running as a server on the backend, which is useless to me since I cant run servers on my hosting account.

So for the meantime I’ll be sticking with bzr and sftp pushing…

Interesting but right now, not for me.

Posted by Stu on 10/21/2007 at 04:27 PM Permalink to this post.
Filed Under : ComputersDevelopment
Comments are closed There are no comments on this entry.
Tags: , ,
Page 1 of 1 pages