RnD to GitHub?

Discussion about Rocks'n'Diamonds, Boulder Dash, Supaplex, Emerald Mine and any other BD hybrid.

Moderators: Zomis, Flumminator

User avatar
Holger
Site Admin
Posts: 2977
Joined: Fri Jun 18, 2004 4:13 pm
Location: Germany
Contact:

Re: RnD to GitHub?

Post by Holger » Sun Oct 12, 2014 9:35 pm

If you've never seen the Mantis Bug Tracker, have a look at http://bugs.artsoft.org/ -- but please do not create bugs other than test bugs for now, as they would all be lost if I should decide to use Bugzilla instead. (Haven't had time to continue on this task so far, and it may still take some time before the R'n'D bug tracker will be officially released/announced.)

Regarding that forum bug: Yep, you're right. No idea what to do about it, but at least disabling smilies does work nevertheless...

filbo
Posts: 308
Joined: Fri Jun 20, 2014 10:06 am

Re: RnD to GitHub?

Post by filbo » Mon Oct 13, 2014 3:24 am

Ok, I checked that out, posted a useless "bug"...

It looks like a bug tracker. If you've already put significant effort into configuring it for RnD, you should probably go with it; if not, just from a quick glance I would guess that bugzilla is generally more capable. But then you should really base it on which one will be easier to get off the ground. This project clearly isn't going to strain the capacity or performance of any bug tracker package that isn't actually on fire at the moment... :)

User avatar
Holger
Site Admin
Posts: 2977
Joined: Fri Jun 18, 2004 4:13 pm
Location: Germany
Contact:

Re: RnD to GitHub?

Post by Holger » Fri Oct 17, 2014 5:37 pm

> It looks like a bug tracker. If you've already put significant effort into configuring it for RnD, you should probably go with it;

No, I haven't so far.

> if not, just from a quick glance I would guess that bugzilla is generally more capable.

Bugzilla is definitely more capable, but as the requirements for R'n'D bug tracking are probably very low, this is not necessarily an advantage, as it may be possible that filing and tracking bugs with Bugzilla is more complicated, so the simplicity of the probably feature-less Mantis may be an advantage. I really have no experience with both bug trackers (and not that much experience with bug trackers in general), so I can't say more at the moment. An important point may be which bug tracker is more end-user friendly (or which of them can be customized to make filing new and tracking existing bugs as easy as possible), but then, maybe most bugs are reported in the forum (or by mail) anyway, so finally it may be me myself in most cases who uses the bug tracker...

> But then you should really base it on which one will be easier to get off the ground. This project clearly isn't going to
> strain the capacity or performance of any bug tracker package that isn't actually on fire at the moment... :)

That's right, of course. :-)

User avatar
Holger
Site Admin
Posts: 2977
Joined: Fri Jun 18, 2004 4:13 pm
Location: Germany
Contact:

Re: RnD to GitHub?

Post by Holger » Fri Oct 17, 2014 5:42 pm

Some bugs are already fixed in the git repository now:

> 1. "quick doors" setting is broken. I have it turned on; in 3.3.1.2 this makes menu "door" operations instantaneous.
> 4.0, whether on or off, opens/closes menu doors at what looks like the same speed as 3.3.1.2 with "quick doors" off.

Fixed.

> 3. I noticed a bunch of ancient (but sensible looking) entries added to ChangeLog. Ok -- but perhaps there should be a
> modern entry like "Added some old lost items back into ChangeLog" :)

You're probably right... have to find out when I've added them, and then add an entry at that date accordingly. Well, this would then again be an entry added at an old date. O well... :-)

User avatar
Holger
Site Admin
Posts: 2977
Joined: Fri Jun 18, 2004 4:13 pm
Location: Germany
Contact:

Re: RnD to GitHub?

Post by Holger » Fri Oct 17, 2014 6:00 pm

Thanks a lot for the patch below -- it fixes a really nasty bug that I just haven't noticed by myself so far.

I have taken your patch with some minor modifications (to use a third parameter in HandleMainMenu_SelectLevel() for absolute level selection); it's checked in to the repository now.
filbo wrote:If I was more observant, I would have noticed the "wrong initial state" problem was because it wasn't loading the new level's tape! Easily visible in the tape controls, once you realize...

This fixes it. There's another `level_nr = atoi(level_number_current->identifier);' higher up in HandleChooseTree() -- I couldn't figure out how to get to that code, so I couldn't test if it had the same problem.

Code: Select all

$ diff --git a/src/screens.c b/src/screens.c
index 61cb710..49daf2e 100644
--- a/src/screens.c
+++ b/src/screens.c
@@ -1629,12 +1629,15 @@ void HandleTitleScreen(int mx, int my, int dx, int dy, int button)
   }
 }
 
+// `direction == 0' means jump to absolute level number `step'
 void HandleMainMenu_SelectLevel(int step, int direction)
 {
   int old_level_nr = level_nr;
   int new_level_nr;
 
   new_level_nr = old_level_nr + step * direction;
+  if (direction == 0)
+    new_level_nr = step;
   if (new_level_nr < leveldir_current->first_level)
     new_level_nr = leveldir_current->first_level;
   if (new_level_nr > leveldir_current->last_level)
@@ -1643,7 +1646,7 @@ void HandleMainMenu_SelectLevel(int step, int direction)
   if (setup.handicap && new_level_nr > leveldir_current->handicap_level)
   {
     /* skipping levels is only allowed when trying to skip single level */
-    if (setup.skip_levels && step == 1 &&
+    if (setup.skip_levels && new_level_nr == old_level_nr + 1 &&
        Request("Level still unsolved! Skip despite handicap?", REQ_ASK))
     {
       leveldir_current->handicap_level++;
@@ -3623,7 +3626,7 @@ static void HandleChooseTree(int mx, int my, int dx, int dy, int button,
        else
        {
          if (game_status == GAME_MODE_LEVELNR)
-           level_nr = atoi(level_number_current->identifier);
+           HandleMainMenu_SelectLevel(atoi(level_number_current->identifier), 0);
 
          game_status = GAME_MODE_MAIN;

User avatar
Holger
Site Admin
Posts: 2977
Joined: Fri Jun 18, 2004 4:13 pm
Location: Germany
Contact:

Re: RnD to GitHub?

Post by Holger » Fri Oct 17, 2014 6:11 pm

filbo wrote:Hmmm, trying to repost that with the diff as an attachment (to preserve TABs). No luck -- extension ".dif" not allowed. Ok, how about ".txt"? Nope. Nor ".diff" or ".patch" or even no-extension-at-all. I don't want to lie and claim it's a .png or whatever.

... ok, here is "foo.zip" which is an actual zip file of the 1.4K diff file...
Sorry, that was due to my forum configuration being too restrictive regarding attachments. I've allowed the usual file types now, including ".patch", ".diff", ".c", ".h" and so on.

filbo
Posts: 308
Joined: Fri Jun 20, 2014 10:06 am

Re: RnD to GitHub?

Post by filbo » Sat Oct 18, 2014 12:10 am

> it's checked in to the repository now

I know :) I pulled git last night and saw it in the logs, built, saw it in action...

User avatar
Zomis
Posts: 1501
Joined: Mon Jun 21, 2004 1:27 pm
Location: Sweden
Contact:

Re: RnD to GitHub?

Post by Zomis » Mon Oct 27, 2014 11:59 am

I am glad that you got a git repo up and running, Holger!

Now there are a few things I'd recommend:

Use branches!!! I'd recommend reading about the different common workflows that are used.

As for bugtrackers, I've had experience with primarily Mantis, and IMO it does it's job quite good. Although these days I use Github for all issues. It is possible to use github *only* for issues and not for the repository itself, but I would of course recommend using it also for the repository. Or, if you prefer, bitbucket. I have used both (but like github a bit more). The nice thing about github is that it is easy to integrate into Waffle, which gives a nice overview about the current project situation, what is currently being worked on, what things are planned for which release, and so on. Incredibly easy to use! Using github would also make it easier for other people to help you with the project, as it supports "pull requests", which means that after I fork your project and make some changes, then I create a pull request which basically gives you a notification saying "Zomis suggests that you change the code this way, which Zomis has said will fix this thing for you". Then by the click of a button you can merge that pull request or not.

User avatar
Holger
Site Admin
Posts: 2977
Joined: Fri Jun 18, 2004 4:13 pm
Location: Germany
Contact:

Re: RnD to GitHub?

Post by Holger » Fri Oct 31, 2014 10:33 am

> I am glad that you got a git repo up and running, Holger!

Me too! It really helps a *lot* when fixing bugs and creating new features to be able to quickly create new branches and merge them or delete them again. What a great, powerful tool! (So far I only used Subversion for managing code (but no for R'n'D).)

> Use branches!!!

Yes, I do -- I use a branching workflow somewhat similar to the one described here:
http://nvie.com/posts/a-successful-git-branching-model/

For R'n'D, my "master" branch is the "develop" branch in the model described there, which I use as an integration branch for stable code than should be in a state that could theoretically be released to the public. My "releases" branch is the "master" branch in the model above, which I use for code that really makes it to a public release of R'n'D.

Besides that, I use quite a lot of short-lived bug and feature branches that I do not push to the public repository, as they contain unstable code. Such new things are available in the "master" branch as soon as the code has stabilized and was tested at least enough to be ready for public review.

So far I did not have any "hotfix" branches to fix bugs in release versions, but they surely will come (but won't be pushed to the public repository either, but only as updates to the "master" and "releases" branches).

As soon as a new release version is coming nearer, I think I will also create temporary "pre-release" branches that will also be pushed to the public repository (and be deleted on release of the corresponding new version of the game). (This would be a "release" branch in the model linked above, but I don't like the name "release" for code that is intended for a release, but is not released yet.)

> I'd recommend reading about the different common workflows that are used.

Very interesting read! Only halfway through, though.

Regarding GitHub, it must be really great, but I prefer to have things hosted on my own infrastructure after some unpleasant experience with services that disappeared from one day to another (not that I expect this to happen with GitHub any time soon, but remember that R'n'D has a long-time focus ;-) ).

Forking the R'n'D repository to GitHub and use it to make pull requests should still be possible, although not being that comfortable compared to not leaving the GitHub system, of course. Regarding bug trackers, I have not spend time on that matter for far. Still have to do that...

filbo
Posts: 308
Joined: Fri Jun 20, 2014 10:06 am

Re: RnD to GitHub?

Post by filbo » Mon Nov 17, 2014 6:42 am

Hi Holger,

Please remove src/conftime.h from the repository and add it to .gitignore. Every time I do a pull I have to reconcile this since it's a build output file which has leaked into the repository.

User avatar
Holger
Site Admin
Posts: 2977
Joined: Fri Jun 18, 2004 4:13 pm
Location: Germany
Contact:

Re: RnD to GitHub?

Post by Holger » Tue Nov 25, 2014 9:35 am

You're right, filbo -- I've removed "src/conftime.h" from the repository now.

Thanks for noting this.

Post Reply