Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gamebox CLI made a bit more friendly #81

Merged
merged 8 commits into from
Jan 17, 2013
Merged

Conversation

tanema
Copy link

@tanema tanema commented Jan 16, 2013

Hey I am not sure how much of this you will like or not so I will explain my reasoning for everything

I have updated the gamebox cli so it has more function and could be easier for beginners here is the interface so far

  gamebox d                                # starts the application in debug
  gamebox debug                            # starts the application in debug
  gamebox dist [mac|linux|win|all]         # Build an executable for your app
  gamebox g [actor|behavior|stage]         # Gamebox generator, this will generate templated files for you for quicker development
  gamebox generate [actor|behavior|stage]  # Gamebox generator, this will generate templated files for you for quicker development
  gamebox help [TASK]                      # Describe available tasks or one specific task
  gamebox n PATH                           # Generates a new gamebox game at PATH.
  gamebox new PATH                         # Generates a new gamebox game at PATH.
  gamebox s                                # starts the application
  gamebox start                            # starts the application

What was done

  • aliased the gamebox script as gb for less typing
  • added gamebox start and gamebox debug so that it can be controlled how the users start the app and there can be one uniform way of doing so. This command (as well as all of the others I implemented) refer to the associated rake tasks
  • added gamebox dist, this will do the dist rake tasks and has a nice feature to do all 3
  • added aliases for most methods for less typing like gamebox start can be written as gb s
  • added generators and templates for actors, stages, and behaviours these can be better extended in the future, like automatically adding the stage to the config
  • reorganized the app template so the src file looks like this
src
  |__app.rb
  |__actors
  |    |__player_actor.rb
  |__behaviors
  |    |__.gitkeep
  |__stages
       |__demo_stage.rb

this allows for cleaner organization

  • Added absolute paths to the gamebox rake file so that generators and starting the game can be invoked anywhere in the project tree of a game

All tests pass, although I don't see any tests for the CLI so I might have to implement them.

Hope you like it, cheers!

shawn42 added a commit that referenced this pull request Jan 17, 2013
gamebox CLI made a bit more friendly
@shawn42 shawn42 merged commit 499a3b0 into shawn42:master Jan 17, 2013
@shawn42
Copy link
Owner

shawn42 commented Jan 17, 2013

I tried this out in your branch, and it looks great. I'm not sure that I like all the actor files called blah_actor; other than that, thanks for the nice additions to gamebox.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants