Tag Archives: GUI

Object selection problems and selecting objects in FPS mode

Here is today’s update on Arcana Manor, in the form of a post I made to the ArcaneFX section of the Garagegames forum.  The only addendum I have is that after this post I managed to fix most of the object selection problems, thanks to the help of the user named Gibby.  They were in the playgui.gui file.  Next up is the more challenging problem of selecting objects in first-person shooter mode.

In the process of making many script and code changes to implement several different features, I seem to have interfered with the game’s ability to select objects with the mouse rollover raycast.  I can select the orc AI player, but only from certain angles (specifically from a slight angle while he is running toward the player, and sometimes from behind if the player is standing close to him).  I can’t select the orc corpse at all, even though “corpsehiddenfromraycast” is set to “0″ and “$TypeMasks::CorpseObjectType”  is enabled in “AFX::targetSelectionMask.”  If I run the AFXDemo from a fresh install of AFX 1.7.1, it is much easier to select the orc and the orc corpse from almost any angle and distance, which suggests to me that I’ve done something to mess up the rolloverraycast function or another piece of code or script related to object selection.

I’ve used WinDiff to check afxtsctrl.cp against the same file in the fresh install of AFXDemo, but restoring this file to its original state doesn’t solve the problem.  Could anybody suggest where else I might look for changes to try to fix this problem?  I also checked in GameConnection.cpp because I think some of the object selection code is in that file, but I’m wondering where else the problem might be coming from.

To provide a little context, I am working on a game in which the player can cast spells from first-person mode, like in Oblivion.  So, one of the ultimate goals here is to be able to select objects in first-person shooter mode by toggling the cursor or using the crosshairs.   Gibby’s AFXFps mod and tutorial has been extremely helpful with this, though his solution is to cast spells from a 3rd person “psionics” mode.  For some reason, I can select objects in Gibby’s 3rd-person mode but not in his first-person mode, even when I toggle the cursor on.  I’ve studied the commands.cs script that Gibby uses to switch modes (which involve showing the reticle and the shapenamehud in first-person mode), but I’m not sure which part of this script would be causing the conflict between first-person mode and object selection.

So, a second question once I fix the raycast problem would be: how can I select objects while staying in first-person mode?

Video: New Arcana Manor build

As promised, here is a short video of the newest build of Arcana Manor.

This build features some experiments with a new spell interface, including a rotating 3d tarot deck and a hexagram gui with jewel buttons that summon magical sigils with spellcasting powers. The player can also shift between first person shooter mode for melee and third-person mode for cursor-based spell-casting in the interfaces. I’m using Jeff Faust’s ArcaneFX in conjunction with these interfaces to implement spell-casting effects, including a custom attack spell with my own zodiacs and rune rings and a modified levitation spell using physical zones. The build also features some custom items representing the minor arcana of the tarot deck, including an ankh wand, a glowing black sword, a cup, and a pentacle.

today’s short-term goals for Arcana Manor

Model the demon using Ron’s orthogonals

Write and/or implement new AI scripts to spawn more monsters

Download and apply new textures from cg textures (wood especially)

Script a telekinesis spell (raise one platform using a transform and/or apply impulse function)

Make the hexagram gui connect its points through pressing buttons that switch out bitmaps, preferably with an outer glow applied to each line segment

Arcana Manor under construction . . .

Here are the beginnings of a level in Arcana Manor that I’ve been building in Torque Constructor.

Arcana Manor Screenshot

Arcana Manor Screenshot

This level contains, at the center, a medieval cathedral that I built in Constructor several weeks ago following a tutorial on garagegames.

cathedral made in Constructor

2) I’ve also made 22 cubes with textures from the major arcana of the Marseilles tarot deck and exported them from xsi into Torque.  This took a lot of effort because the XSI exporter is still a bit clunky and requires a lot of manual scene set-up involving dummy nodes, collision meshes, and naming conventions that have to be set exactly right in order to export.

3) I also set up a working inventory system that tracks when a player picks up minor arcana items (wands, swords, pentacles, and cups), then registers these items in an inventory graphical user interface that can be toggled on and off.

Inventory GUI

Inventory GUI

4) I set up a simple spell system using resources provided on the GarageGames site, which allows the player to throw a fireball.

5) Wrote scripts for each of the cubes and items so that players can pick them up and store them in an inventory.  Made a small, rough test level using early versions of the battlements described in the “5 minutes of gameplay” entry to demonstrate that players can pick up cubes and items.  Here is one sample cube, followed by a video of the player picking up many of them, picking up several cups, and toggling the inventory.

6) The goal now is to first make the four minor arcana mountable as weapons so that they can be held by players, so that players can wield a sword or a cup in order to trace sigils in the air, like a hexagram.

Then, I need to set up a melee system that allows the player to swipe with the sword and do damage.

However, for the purposes of this game the motions of the items will have to be more precise, i.e. they will need to follow the movements of the gamepad as a sort of cursor.  Attached to the end of the sword, wand, or cup there will need to be a particle emitter or other special effect producer that leaves a glowing colored trail and recognizes when certain patterns have been traced.

Question: How did the designers of Arx Fatalis (or Molyneux in Black and White) pull of a similar “tracing magic sigil with finger” mechanic?

7) While I’m providing screenshots, here is an arch with some custom alchemical planetary symbols applied to it as textures.

Arch with planetary textures

Interface Design

One of the issues not discussed in Quests is the design of a game interface, both for basic functions like saving games and for gameplay interactions like casting spells or equipping items. The reason for the deliberate omission of interface considerations is that the book primarily discusses modding toolsets, which typically do not allow for significant modification of an existing game’s interface and certainly not the creation of a new interface.

Interfaces are crucial, though, when designing one’s own quest-based game, because an interface shapes the way that players can interact with the system of rules that constitutes the game. Here are some thoughts on the interface for Arcana Manor, which I’ll be putting into practice in the Torque Game Engine Advanced.

Main GUI

Accesible at the game’s beginning

The game’s title written in an appropriately arcane font

A brightly lit color scheme that looks like a tarot card from the Marseilles deck, with sharply angular buttons and a background colored like a mosaic or stained glass window

card from Marseilles deck

card from Marseilles deck

Start game option

Resume game option

Save game option

Load game option

Quit game option

Arcana Manor Magic Interface

Gestural (with mouse, xbox 360 controller, or maybe even Wiimote, since the Torque Game Engine Advance is cross-platform)

Trace sigils/glyphs/runes in the air with the index finger of a hand as well as magical weapons/items based on the tarot suits (wand, sword, cup, and disk).  One model for this interface is the spell-casting system of Undying.

casting a spell in Undying

casting a spell in Undying

These sigils include geometrics sign (pentagrams and hexagrams)

The point of the sigil at which the player starts tracing it has an effect, because different points have varying elemental, planetary, and/or tarot correspondences.

hexagram attributions

hexagram attributions

Each sigil consists of particle effects and emitters, so they leave glowing trails of fire. The colors of these trails have varying magical effects.

Spells are powered-up via the number of wands, swords, cups, and disks collected by the player. These are displayed on the HUD interface as rows of each item, i.e. the standard mana-meter has four parts.

a tarot disk for the interface