Saturday, February 26, 2011

RoughBall; League & ScreenManager

As announced in the previous episode I did work on the "campaign" mode, which is in fact League play.

You start with a bad team on the lowest league level. Then its pretty standard sport league stuff. You play home and away games against AI controlled teams. Finishing first gets you promoted to the upper league, finishing last means you loose the game. The objective is to win the top league and then a match against an all-star team to get the title of "super mega winner pro elite turbo" or something like that.

The player will be able to build and improve his own team. I'm not decided on how to do that yet, either a transfert system like in real sports, or a skill points system where you gain points to improve your players. I'd favor the transert system, as it means the player will never be able to mold his team exactly like he wants it, which means more challenge and more variety between games. Funnily enough, this is what I aim for. All teams and players are generated for each new game... like in a roguelike :D

Anyway here's how the league screen curently looks like, not sexy at all and stuff missing but functionnal.
The numbers on the right are Team Levels (Team Value in Blood Bowl terms), displayed for dev.
everyone sucks and has zero points. losers.
It doesn't show here but the ranking and the matches actually work. AI vs AI matches are simply simulated with a probabilistic formula based on respective TLs. The player plays his match against the AIs... which are not done yet... as promised :X
I improved the match interface a bit, here's how it looks like.
"Winged Terrorists" AI... 9/11 anyone?
So err basically the team names and a glow on the scoreboard digits. Wow.
Also, stupid team names and stupid player faces = FUN.

To handle game screens transitions and popups dialogs/messages I wrote Screen and ScreenManager classes.
A Screen is basically a container for a sprite (composition) and is not necessary an entire screen, could be a dialog.
The ScreenManager (singleton) manage screens. Duh. You can push a screen on top of others (popup); or you can transition the focused screen to another with animation effects. Only one screen has the focus at anytime. By default un-focused screens are darkened.
Its simple but makes game screen/popups management easier and you can do some effects, which is almost a requierement for flash games.

Here's an example of a popup in the main menu:
Loading popup on top of main screen.
"Loading" is just a small screen and was pushed on the main screen when I clicked  the "new game" button, the main screen has lost focus and is darkened.

Here's an example of transition in the code, here from the league screen to the play screen, using a fade in/out effect:
Disregard the new PlayScreen() oddity, its supposed to be a singleton but its not coded cleanly yet.

I have the basic game structure there and functional. So... I am now allowed to start


End of post.


  1. Being an avid Blood Bowl player (old school method when I was a kid and now using the video game), I find your not-yet-a-game intriguing. A post elaborating on the game's rules would be nice :)

  2. Its like a *greatly* simplified version of Blood Bowl:
    - no skills.
    - no go-for-it.
    - no turn-over.
    - no passing LoS.
    - no blitz.
    - grabbing the ball = end of pawn move.
    I might add TO if the gameplay is too static/predictible.

    Peculiar stuff:
    - passing/grabbing are always succesful, but passing out of the passer range is inaccurate.
    - whoever score 3 TDs first wins, which is an advantage for the home side who always start first.
    - kickoff : ball in the circle cell (no kick), defender must deploy behind defensive line.

    The goal is fast paced games, rules AI-friendly, basic tactics and some luck.
    Some rules points are not definitive I am playtesting the first draft and see if I can write an ok AI.

  3. Oki, it could be fun as a coffee-break kind of game. And if successful it could be expended quite easily (leagues, online PvP and such).

    As a side note, I've never been a big fan of the TO mechanism in BB anyway. I understand the goal gameplay wise even if it doesn't scale to real time (that's why the real time mode in BB is a mess). Still, preventing my whole team from moving because one of my player missed his "catch ball" action always seemed weird to me.

  4. I'm not a fan of TO too but I understand why they added it. Real-time BB sounds insane.

    If you are interested in playing online old-school BB check this:
    Last time I checked its free and you just have to download a java client.