Slightly nicer shopping screen

Threads of Fate

Richard's continuing to work on the Threads Of Fate game developed during the last PyWeek.

Awards

Give this entry an award

Scores

Ratings (show detail)

Overall: 2.8
Fun: 3
Production: 2.7
Innovation: 2.7

Respondents: 3

Files

File Uploader Date
threads-of-fate-2.3.zipfinal
Release 2.3 with more!
richard 2009/01/31 23:11
threads-of-fate-2.2.zip
Release 2.2 with more!
richard 2008/11/25 02:18
threads-of-fate-2.1.zip
First post-PyWeek release
richard 2008/11/17 02:40
shopping.png
Slightly nicer shopping screen
richard 2008/11/13 01:56
inventory.png
Slightly nicer inventory screen
richard 2008/11/13 01:55
lighting4.png
Bug-fixed nicer lighting
richard 2008/11/11 07:37
lighting3.png
Nicer lighting
richard 2008/11/11 05:16
lighting2.png
In-development shot showing the new lighting.
richard 2008/11/11 01:05

Diary Entries

Development continues (part 3)

Still hacking away. Took a bit of a break for a while there but am back into it now.
Stuff I've achieved:
  • Added a new nice font to the inventory/shopping screens.
  • Sped up NPC code considerably and made them plan a little.
  • Fixed some bugs in the Line Of Sight code (seeing through walls).
  • Return more information from Line Of Sight test (obscurity, distance).
  • Added some initial code to detect visible off-screen NPCs.
    • Some more UI code work:
    • Added text input widget, including concept of focus.
    • Pass all details of mouse click to on_click handlers.
    • Worked on styling, including fixing the rect rendering.
    • Added some more tests.
  • Added character abilities, including the first one "Super Strike".
  • Added light mapping (needs optimisation).

5 comments

Nicer lighting

Added some code to smooth out the lighting. Nicer now :)

3 comments

First post-PyWeek public release

Download here: threads-of-fate-2.1.zip. The complete list of changes follows. The big stuff is bolded.
Note: the game hasn't been tested beyond the first dungeon following all these changes :)
  • Add in light mapping - currently characters have the only light sources.
  • Use lighting in attack chance calculations.
  • Fix display sorting of player info background image.
  • Line Of Sight remembers an "obscurity" amount used in combat and lighting.
  • Fix Line Of Sight in certain cases (around corners, through walls).
  • Better feedback during battle displaying amount of damage dealt/received (or healed).
  • Scaling of interface fonts to fit smaller/larger screens.
  • Fixed the visual offset sometimes seen when rendering attack animations.
  • Add clicking of character in map to activate.
  • Add a simple first-run help message when entering the tactical game.
  • Fix blocking check for adjacent actions.
  • Allow diagonal movement and adjacent actions.
  • Add green box highlighting currently-active character.
  • Clean up the cobble tiles a little.
  • Lots of graphical glitches removed.
  • NPC turn feedback.
  • NPC brains sped up considerably.
  • Make NPCs remember what they were doing at a basic level (ie. who they were attacking and where the target was) so they don't get lost along the way.
  • Some game balancing with the NPCs so they're not such a walkover now.
  • Better NPC turn handling so their animations play completely, giving the player better feedback.
  • Added initial code to detect off-screen NPCs. Not used.
  • Grant all characters some basic level of brawling skill.
  • Add character abilities including the first one - Super Strike.
  • Added character traits - first one is LowLightVision (not actually granted yet).
  • Add a whole new (generic) user interface implementation:
    • Includes vertical / horizontal layouts
    • Labels and Buttons (both with text and/or image)
    • Text Input (including focusing)
    • Styling controls, including "skinning"
    • Drag-n-drop support
    • Has some tests
    • UI elements may be animated using Cocos actions (color, position, etc.)
    • Re-implemented all game user interfaces to use the new code.
  • New font for inventory and shopping screens.
  • New font for title menu.
  • Add in better command-line option handling.
  • Refactor out the music player to a single point to detect ability and also command-line --nomusic override.
  • Add command-line control over fullscreen / window sizing.
  • Fix resource snafu with finding save game files.
  • Allow immediate selection of arbitrary levels from command-line for testing.
  • Fixed a bunch of other bugs.
Lots more to do :)

2 comments

More improvements

Download here: threads-of-fate-2.2.zip. The list of changes since 2.1 follows.
Note: the game still hasn't been tested beyond the first dungeon following all these changes :)
  • Add command-line ability to grant party XP and coin.
  • Add some testing of combat outcomes. This includes some balancing and tweaking of the combat algorithms.
  • Add zooming of display using scroll wheel.
  • Add drag-grabbing to scroll map around.
  • Add grab-hand feedback in generic UI.
  • Visually indicate when an attack misses.
  • Characters now informed when an attack on them misses.
  • Spells are able to alter difficulty based on circumstance.
  • NPCs now communicate and use their memory of PC locations.
  • Optimisations in NPC path generation.
  • Use GL_NEAREST when scaling up weapon sprites.
  • Fix menu styling across board, including scaling.
  • Fix bug introduced into assigning experience.
  • Fix broken bashing action.
  • Fix save/load of abilities.
  • Some additional code cleanup removing out-of-date dags.

2 comments

New release soon...

I've still been working on the game. I've added the much-requested simple command control. When you hover over an enemy a potential attack type is highlighted over them (eg. sword, bow or energy bolt). If you left-click at this point your character will attempt that attack. Speeds things up considerably.

1 comment

Small update

I've not forgotten about this project ;)

I've been hard at work cleaning up another project: Bruce, the Presentation Tool.

I am holding off releasing the final pyggy version of Threads because I really want to re-do all the tile art. I'm not sure I'll actually get that done, but I'm hopeful. We'll see...

Add a comment

I got a lot done, but it's not finished

Sadly I got sidetracked by other things and couldn't put the final polish on the game before the deadline. A lot of the user interface has seen significant improvements. The AI is much better. The code internally is much nicer in many places.

This final release moves forward in a few areas: the AI is again improved and there's the very nice new user action interface which mostly just uses left-mouse clicks (the action menu is only needed in rare situations).

Unfortunately I also changed the way the tile mapping is done in preparation of using a new tile set ... which didn't end up making it into the game. I'd still like to put a new tile-set in.

1 comment

Threads of Fate crashes..

I tried to attack an enemy and then the game crashed. The mage was dead - maybe that's related. ;)
Traceback (most recent call last):
  File "run_game.py", line 9, in 
    main.main()
  File "threads-of-fate-2.3/gamelib/main.py", line 66, in main
    director.run(cocos.scene.Scene(MainMenu("Threads of Fate")))
  File "threads-of-fate-2.3/cocos/director.py", line 296, in run
    event_loop.run()
  File "threads-of-fate-2.3/pyglet/app/xlib.py", line 94, in run
    sleep_time = self.idle()
  File "threads-of-fate-2.3/pyglet/app/__init__.py", line 187, in idle
    dt = clock.tick(True)
  File "threads-of-fate-2.3/pyglet/clock.py", line 698, in tick
    return _default.tick(poll)
  File "threads-of-fate-2.3/pyglet/clock.py", line 295, in tick
    item.func(delta_t, *item.args, **item.kwargs)
  File "threads-of-fate-2.3/cocos/cocosnode.py", line 688, in _step
    action.step(dt)
  File "threads-of-fate-2.3/cocos/actions/base_actions.py", line 101, in step
    self.update( min(1, self._elapsed/self.duration ) )
  File "threads-of-fate-2.3/cocos/actions/base_actions.py", line 346, in update
    self.actions[ found ].start()
  File "threads-of-fate-2.3/cocos/actions/instant_actions.py", line 134, in start
    self.func(*self.args, **self.kwargs)
  File "threads-of-fate-2.3/gamelib/actions.py", line 298, in done
    self.attack.level.scroller.remove(self)
  File "threads-of-fate-2.3/cocos/cocosnode.py", line 400, in remove
    self._remove(obj)
  File "threads-of-fate-2.3/cocos/cocosnode.py", line 410, in _remove
    child.on_exit()
  File "threads-of-fate-2.3/gamelib/actions.py", line 302, in on_exit
    self.result()
  File "threads-of-fate-2.3/gamelib/actions.py", line 187, in do_hit
    self.other.apply_damage(damage)
  File "threads-of-fate-2.3/gamelib/character.py", line 439, in apply_damage
    self.dispatch_event('on_character_death', self)
  File "threads-of-fate-2.3/pyglet/event.py", line 340, in dispatch_event
    if handler(*args):
  File "threads-of-fate-2.3/gamelib/level.py", line 198, in on_character_death
    director.replace(success.Success(level))
  File "threads-of-fate-2.3/gamelib/success.py", line 20, in __init__
    [self.party.items.append(i) for i in character.pack]
AttributeError: 'PC' object has no attribute 'pack'

1 comment

Threads of Fate: some bugs or anomalies

Some can be real bugs, other not implemented code. Anyway:

after clicking a character to select it, the green frame dont show till you move the mouse.
sometimes the 'next character' will skip one or two characters in the party.
sometimes clicking over a character dont select him, but clicking in the hud element for the character does it.
party pawns can move over a position where an enemy stands.
sometimes party pawns can move to a position where another party pawn stands.
dotie with bow, having APs can not fire.
lodo cast energy bolt: bolt apear over lodo position, not over enemy.

Two tracebacks: one the known
[...]
File "D:\pygame\threads-of-fate-2.3\gamelib\success.py", line 20, in __init__
[self.party.items.append(i) for i in character.pack]
AttributeError: 'PC' object has no attribute 'pack'

The other:
EnergyBolt: 4 damage to PC Lodo health=-10
PC Lodo health=-10 damaged 4
Traceback (most recent call last):
  File "run_game.py", line 9, in 
    main.main()
  File "D:\pygame\threads-of-fate-2.3\gamelib\main.py", line 66, in main
    director.run(cocos.scene.Scene(MainMenu("Threads of Fate")))
  File "D:\pygame\threads-of-fate-2.3\cocos\director.py", line 296, in run
    event_loop.run()
  File "D:\pygame\threads-of-fate-2.3\pyglet\app\win32.py", line 63, in run
    self._timer_func(0, 0, timer, 0)
  File "D:\pygame\threads-of-fate-2.3\pyglet\app\win32.py", line 84, in _timer_f
unc
    sleep_time = self.idle()
  File "D:\pygame\threads-of-fate-2.3\pyglet\app\__init__.py", line 193, in idle

    window.dispatch_event('on_draw')
  File "D:\pygame\threads-of-fate-2.3\pyglet\window\__init__.py", line 1217, in
dispatch_event
    EventDispatcher.dispatch_event(self, *args)
  File "D:\pygame\threads-of-fate-2.3\pyglet\event.py", line 340, in dispatch_ev
ent
    if handler(*args):
  File "D:\pygame\threads-of-fate-2.3\cocos\director.py", line 306, in on_draw
    self._set_scene( self.next_scene )
  File "D:\pygame\threads-of-fate-2.3\cocos\director.py", line 362, in _set_scen
e
    self.scene.on_exit()
  File "D:\pygame\threads-of-fate-2.3\gamelib\level.py", line 654, in on_exit
    super(Level, self).on_exit()
  File "D:\pygame\threads-of-fate-2.3\cocos\cocosnode.py", line 459, in on_exit
    c.on_exit()
  File "D:\pygame\threads-of-fate-2.3\cocos\layer\base_layers.py", line 90, in o
n_exit
    super(Layer, self).on_exit()
  File "D:\pygame\threads-of-fate-2.3\cocos\cocosnode.py", line 459, in on_exit
    c.on_exit()
  File "D:\pygame\threads-of-fate-2.3\gamelib\actions.py", line 302, in on_exit
    self.result()
  File "D:\pygame\threads-of-fate-2.3\gamelib\actions.py", line 415, in do_hit
    self.spell.do(self.level, self.character, self.cell, self.other)
  File "D:\pygame\threads-of-fate-2.3\gamelib\magic.py", line 88, in do
    other.apply_damage(damage)
  File "D:\pygame\threads-of-fate-2.3\gamelib\character.py", line 439, in apply_
damage
    self.dispatch_event('on_character_damage', self, old_health, damage)
  File "D:\pygame\threads-of-fate-2.3\pyglet\event.py", line 340, in dispatch_ev
ent
    if handler(*args):
  File "D:\pygame\threads-of-fate-2.3\gamelib\level.py", line 135, in on_charact
er_damage
    sprite = self.get_sprite(character)
  File "D:\pygame\threads-of-fate-2.3\gamelib\level.py", line 113, in get_sprite

    return self.character_sprites[character.name]
KeyError: 'Lodo'

1 comment