Thank you for taking the time to check out my progress thus far.
Zero One Backend 28/11/14 - 18:00 Regular Expressions - Practical Examples
To demonstrate a practical example of how you can apply what you have learned about Regular Expressions. Consider the following real case scenario.
When re-implenting Diggsey's TopGUI program in my 3D user interface system, I needed to override a number of default colour-schemes on a frequent basis. A colour scheme is supplied by a user defined function which TopGUI uses to assign you required colour palette to its system. Here is what I started out with in the function:
THEME_ACTIVE_LIGHT = 0xFFFFFF80
THEME_ACTIVE_DARK = 0xFFFFC040
THEME_INACTIVE_LIGHT = 0xFFC0C0C0
THEME_INACTIVE_DARK = 0xFF808080
THEME_SHADOW_START = 0xC0000000
THEME_SHADOW_END = 0x00000000
THEME_TICK_COLOR = 0xFF000000
THEME_RADIO_COLOR = 0xFF000000
THEME_ARROW_COLOR = 0xFF000000
THEME_SPLITTER_COLOR = 0x80000000
THEME_OUTLINE_DARK = 0xFF000000
THEME_TEXT_SHADOW = 0x80FFFFFF
THEME_TEXT_LIGHT = 0xFFFFFFFF
THEME_TEXT_DARK = 0xFF000000
THEME_FOCUS_LIGHT = 0x80FFFFFF
THEME_FOCUS_DARK = 0xFF000000
THEME_BACKGROUND_MENU = 0xFFC0C0C0
THEME_BACKGROUND_LIGHT = 0x80FFFFFF
THEME_BACKGROUND_LIGHTER = 0xC0FFFFFF
THEME_BACKGROUND_DARK = 0x80000000
THEME_CURSOR_COLOR = 0xFF000000
THEME_SELECTION_COLOR = 0xFFFFC040
THEME_GRIP_LIGHT = 0x80FFFFFF
THEME_GRIP_DARK = 0x80000000
I wanted to extract my colour profile from the user's settings file; I will want people to be able to change the colours when modding the Sports Fiction game, or when making dynamic content with the X-Producer. So, having literal values set in stone would not fulfil my user's needs. To rectify this, I created a function for loading colour values from an INI file.
To make use of the function, all I needed to do is write the following, using the first line as the subject for the example:
THEME_ACTIVE_LIGHT = UISetting( group, entry, defaultColour )
All well and good, but what about all of the other lines? Do I really want to go in there and write out each and refactor each and every line when ever I need to do so on this occasion and in the future? Nope; because with Regex we can write a small series of patterns which can do the job for me.
The following video demonstrates how I got it done; using the X-Producer's Regex window currently under development.
The types of regular expressions used are capturing groups, non-capturing groups, word character classes and backreferences; all explained further up this webpage.
An additional video has been shown below which demonstrates changing undefined variables to locally defined variables
Zero One Backend 23/11/14 - 11:00 Regular Expressions - Lookarounds
Lookarounds are assertions which look either ahead of a match for a certain suffix, or behind for a certain prefix. Because the lookaround functions are assertions, they return a boolean value; true or false, rather than returning a string. If the result is true, the match is successful, if they return false, the match will not be success. The overal search operation will return an empty result.
Lookaheads
Lookaheads ensure that a search matches something which contains a certain suffix. Suffixes are characters which follows a character or a series of characters. Lookaheads can also ensure that a search matches something which is not followed by something.
In the text: Wood.jpg
.jpg could be considered as the suffix used to determine the file format specified by a filename.
Positive Lookaheads
Positive lookahead assets that matched text is followed by a required pattern.
Positive lookaheads are defined using ?= character combination within a set of parenthesis. The search pattern within the parenthesis after the equals sign must exist in the text being searched, after the position of the lookahead assertion.
The following positive lookahread assertion will find the text which is followed by my surname: .*(?=Tate). The pattern starts off with a dot which indicates any character, an asterisk which indicates any amount of characters, then the lookahead assertion indicating that the match is only valid if my surname follows it. Note that this match will not return my surname,
only the matches of Regex patterns outside of assertions are returned.
In the text: The last word of first sentence is cheese. The last word of the second sentence is ham.
The Regex pattern:
\w+(?=.)
Returns: cheese ( and then ham)
Reason: This regular expression finds the last word of each sentence using a positive lookahead assertion that a word is followed by a full-stop; a period. The \w class searches for word characters; the + sign indicates that at least one or more should be found. The period character is enclosed in a positive lookahead assertion.
Sports Fiction 28/11/14 - 22:00 2D and 3D UI - Early Development
In the latest update I will be showing some of the progress of Sports Fiction's user interface. In this update I will be taking you through my design concepts so far, which will lead to a more well arranged system in the more exciting development phases to come.
This
humble beginnings of the game's user interface development will be of interest to people who may be interested in developing or modding the sports and who are professional gamers interested in the future of configurable user interfaces and how it can improve your successes in the future game. For everyone else things may seem a little confusing at first, but will make more sense when the user interface is put to real use.
Sports Fiction is a game under development which is based on sports in the future. Within the game you can take control over a character's sporting career in a campaign, take part in online tournaments, or have fun playing all of the available sports in the game, inviting along your friends if you want to have fun together.
Before developing the bulk of the 3D game content including the sports, the development thus far has been focused on implementing user interface systems capable of making the game a reality.
The
user interface is a central part of any software such as a video game which represents all the ways in which you the user can interact with your computer or mobile device and the components of the software.
The user experience is a major concern for the usability, pleasure and satisfaction you gain from your interactions with the game. For professional gaming it also means designing an experience as best as I can, which maximizes your potential to win.
In the early stages of interactive development we will look at the UI (user interface). As the interface matures and functions improve, we will focus more on UX (user experience) design.
User Interface Progress
Designing a user interface system for a video game differs from work related software in the fact that games tend to feature a storytelling, providing user interaction with diegetic controls within the game world, as well as the non-diegetic controls which live on windows and panels on screen space. The diegesis is where all of the elements and events occur which affect or can be manipulated by characters within the game; these elements can also include sound and 3D props.
Some video games feature many diegetic user interface elements such as hand drawn maps and computer control panels which can immerse the player into the game world. MMORPGs tend to feature a lot of non-diegetic controls because such games require rapid interaction, micro-management and analysis of distant surroundings, often all occurring without delay on screen.
Sports Fiction presents an interesting game model which is required to both immerse the player into the game world, and offer the ability to control and monitor detailed gaming elements with little delay.
Configurability
No two players will have the exact same strategies when advancing through their campaign careers or through online tournaments. For this reason it is likely that these players will have configured their user interface for completely different needs and for their screen resolutions. A player riding a hover-board across a country landscape is going to require a much more screen efficient user interface than a player who is designing a team formation for an up and coming game of soccer on an advanced obstacle field.
The user interface system has been designed to be highly customizable. At this early phase in development, the user interface is so customizable, it could pass as the user interface for a computer operating system. You can change the size, design and colour of the user interface, the shortcut keys and gamepad buttons, so on and so forth.
With such a vast level of customizability, comes complexity of development; which is why it has taken such a long long time to get to where we are today; and there is a long way to go. But this complexity brings game capabilities which are worth the wait.
3rd Dimension
It is understood that the human brain's memory is composed of experiences connected from other experiences within a neural network. This web-like network of memories resemble elements on a map. The more significant memories could be compared to outstanding landmarks, while the insignificant memories could be compared to common locations on the map. As humans we find it easy to remember journeys from one place to another, and we experience these journeys in 3D.
To make good use of your minds ability to remember journeys in 3D space, to make it easier for you to remember how to access parts of the user interface which is significant to you; Sports Fiction will provide 3D user interface functionality as a complement for the 2D user interface, making for a complete system; great for putting more of the content into the game world, and for giving you more options for your personal user interface configurations. You will be able to put your frequently used 3D windows where ever you want to put them; so as long as they are the 3D windows! 2D windows can also be rotated, but do not exist in 3D space.
Guiding the player
It is also important to present the gaming experience with as little difficulty as possible; it is not desired to make it more difficult for the player to get started than it needs to be. This is related to user experience (UX) which is covered in more detail in part two.
For a moment let us consider a few illustrations of the user experience of learning how to play. Consider for a moment how
ridiculous it would be to have to create a tutorial on how to play Super Mario Bros
In reality the level design and interactivity tells the story which even a child can understand.
On the other hand, it would not feel like much of a game if you had to lead a civilization and control its government, military and culture without being presented with some kind of tutorial or guide.
In reality a set of tutorials and hints are provided in all of the Civilization games to
make the learning process a pleasure rather than a pain.
Attention to detail
It is said that a good user interface will help you get the task done effectively; without distracting you from the important details; while bombarding you with unimportant information. Whilst the user interface system will not always be able to judge what is most crucial for your competitive needs at every given moment; it will supply customizable controls and filters to ensure that what is important for you, can be given more prominence.
Much of the final user interface will feature transitional animation and aesthetic design elements set in place to decorate the screens; these kind of unnecessary UI features can be switched off if required.
Some animated features will be used to build tension, others are to represent cool downs or action delays. When designing one of the text controls transitional animations; I implemented various options for how such text is displayed, be it instant or progressive.
Each transition builds up a different kind of dramatic tension as you wait to see what text is going to appear.
This functionality will be supplied in some of the list boxes, which will either delay the view of a climatic text event, or will reveal the important text first before showing the less important text.
In this early working, three different list boxes contain different versions of the same transition. You will interpret certain options before others.
In some of the list boxes developed so far, the selected element is the most animated; in other cases the unselected elements are more animated; it is all about elements are significant in the given context.
Types of controls
There are a number of different types of controls in Sports Fiction, and the X-Producer. We will introduce some of the general controls and the variety of forms they come in; but there are many more under development and yet to be implemented.
It will be useful to understand how they work if you are planning to configure your interface for competitive play, or for developing your own sports.
Windows
A window is the main container for most of the non-diegetic user controls in Sports Fiction, and contains most of the X-Producer's floating controls. As is the case on the Windows operating system; most windows can be dragged around, resized, minimized and maximized. Sports Fiction's 3D windows can currently be moved around along a flat plane; but in future there may be a need to be able to freely drag the 3D window around where ever you need it to go within a game level.
Windows tend to feature a heading at the top of a client area. The client area contains the content of the window, which moves around with it as you drag the heading. This is nothing new to most people, but it is not always available in video games, but is available in Sports Fiction.
Sports Fiction currently features the following window classes.
Fixed Windows
Fixed windows cannot be moved around by the user, and cannot be resized. These contain a size and location arranged by the system; and are useful for constructing parts of the interface which need to be consistent. Sometimes these windows can be hidden, minimized and restored to their usual size.
Draggable Windows
Draggable windows, as their name implies, can be dragged around. In the case of Sports Fiction, they can be dragged in 3D when they are 3D in form.
Resizable Windows
Resizable windows, as their name implies, can be resized by the user. In the case of Sports Fiction, they can be resized in 3D when they are 3D in form.
Diegetic 3D Windows
Diegetic windows represent the user interfaces which exist in the game universe. They may or may not resemble the usual Sports Fiction themed interface design; and will sometimes be operated by characters in the game universe.
Panels
Panels are containers for controls which need to move around with the panel or be arranged by the panel. Panels are quite simple in design, but are very useful. There are a number of different types of panels used in the game; each implementing an arrangement system taken from Microsoft dotNet, my user interface system or Diggsey's TopGUI system for DarkBASIC.
Base Panels
Base panels tend to simply be called panels; their purpose of containing other panels and controls is inherited by more complex panel classes to be shown. In some platforms there will exist a Canvas control, which is similar in that it does not arrange its content, its content has a set coordinate within the panel.
Diegetic 3D panels
3D panels will likely represent interactive features of digital props in the sports fiction universe. In some cases you can use your mouse, keyboard or gamepad to interact with the controls on these controls.
Grids
Grids are a common panel class which contain a number of rows and columns, and in some cases levels. Each element inside of a grid is set at a specific row and column, and can span multiple rows and columns. This panel will be useful for inventories and micromanagement controls.
StackPanels
StackPanels are one of the most common panel classes which arrange their content in some way. Stackpanels will stack their content from top to bottom or bottom to top in vertical orientation, or from left to right or right to left in horizontal orientation. These work similar to TopGUI flow layout controls
DockPanels
DockPanels are a panel class which docks their content either to the left, top, right or bottom of the dockpanel, or on the left, top, right or bottom edge of each other.
WrapPanels
WrapPanels will arrange their content much like the text on a document. Starting from left to right, or from right to left, each element is to be arranged in sequential order until the end of the line, and then a new line is produced.
Views
Views are a controls which contain data, and displays the data using some kind of data template and display filtering.
TreeViews
Treeviews arrange their content according to their relationships. Parents contain children, and children can contain siblings, or additional children.
ListViews
ListViews (or listboxes) reveal their data as a list. These views may or may not feature icons attached to the data. Some of Sports Fiction's listviews feature scrolling, and some do not.
Combo Boxes
Combo boxes combine the features of lists and text boxes. The text usually filters, searches for and represents the selected item in the list.
TabViews
TabViews reveal their content one at a time, and can be configured to behave like step by step configuration controls or slideshows. One of the most major implementations of this control is the X-Producer's editor tab view.
GridViews
Gridviews work much like spreadsheets; the rows within a spreadsheet tend represent a record, and each column usually represents an attribute or metric assigned to the record. Gridviews arrange data into tabular layouts.
Buttons
Buttons behave as they do in the real world, when pressed they trigger an action. There are different kinds of buttons, and in Sports Fiction, there will be many of them. Buttons tend to be mouse controlled, but can be controlled using a keyboard or gamepad. The spacekey, return key or confirm-button on a gamepad or touchscreen can also activate a button. Pressing left or right, or tab or shift-tab allows you to select different buttons.
Some of Sports Fiction's buttons feature quite a large design, making them easy to spot and click; representing a central or important action.
Others are quite small, and are designed to be screenspace efficient, out of the way but very much visible. In some cases the small buttons have been rendered a bit too small to read, but this is temporary.
Some of Sports Fiction's buttons will have aesthetic properties, such as the glass screen button which has the option to show or hide its glass screen.
BaseButton
All buttons tend to inherit the properties of the base button class which performs an action when pressed.
ToggleButton
Toggle buttons behave like switches; they turn something on or off.
CheckButton
Check buttons are similar to toggle buttons; they enable or disable something; the difference is that checkboxes tend to form a part of a series of related multiple choice options.
RadioButton
Radio buttons behave like single choice option buttons. Much like a radio, you can only select one band at a time, and each radio button belongs to a single group of radio buttons.
Graphs
Graphs are the analytical controls used to represent data which is of interest to the player, tournament organiser or developer. These come in a variety of forms, and we will have more graphs available in the final game. Most of the graphs so far inherit from a base graph class which provides the functionality of containing a list of values.
Line Graph
The line graphs consist of data points which tend to reveal the behaviour or metrics of something in the game or its configuration and modding tools. The line graphs will come in all shapes and sizes for each of the sports which require them for revealing information such as player progress or team scores.
Each line graph has an X axis in horizontal direction, and Y axis in the vertical direction. Colour controls have been constructed so that the colour of the lines can reveal an important message regarding the data being represented; it is good it will tend to go green, if is bad it will tend to go red.
Bar Graph
Bar graphs uses the size of vertical or horizontal bars to represent the scale of something within the data being represented by the graph. In one direction, the position of the bars represent a category or time of occurrence; the length of the bars in the other direction represent the scale of the value.
Like line graphs, each bar can be colour coded to represent the scale of the values and their message. Here oranges and reds are used to represent the bad, and the greens and blues are used to represent the good.
Adjustment Controls
Dials
Dials work like sliders, they contain adjustment mechanisms which have a minimum and maximum value. Dials are best used to preserve screen space without being too difficult to see; but can also come in large forms used for configuration of technical game elements.
Dials can also be non-interactive, these simple reveal the scale of something such as the speed of a vehicle.
Sliders
Sliders are ranged adjustment devices used to adjust a value between its minimum and maximum value. Sliders will come in many forms and sizes for use in configuring and engineering equipment for use in the sports. Sliders tend to be either horizontal or vertical.
Value Bars
Value bars tend to be used to reflect the current progress of an operation; when they are used in this context they tend to be called progress bars. Value bars can also represent the scale of an attribute such as energy or fuel in the same manner in which the bars on a bar graph represent such scales.
Summary
So we have covered the basic controls which you can use to provide interaction with your sport; these are also controls which you will be able to configure for your competitive needs, making victories more attainable. In future updates on the user interface system, it will have matured and will contain additional benefits, more fonts and a more attractive design.
Development of 3D lists and combo boxes
Sports Fiction 23/11/14 - 15:00 Modelling of weapon for shooting sports
I spent a few days coming up with weopon concepts for the shooting sports. I have a number of sports ideas which will feature automatic rifles such as this. I will be making further progress with this and not too many weapons because for at least the sports I am going to create, I want strategy and skill to determine the winner, rather than the weapon.
Sports Fiction 23/11/14 - 15:00 Universe Instances - World Generator Phase 1 Part 1
So, it is time to get started with this universe instance game component I've had planned for the advanced game modes in Sports Fiction. This is going to take a while!
Each universe will spawn with a certain course of history leading up to the moment where your set of characters start their sports careers in the story campaign or PvP campaign.
Each instance will have its own set of game sessions stored on one of the instance servers I have configured.
First Step
The first step for generating worlds is to spawn a number of 2D terrain tiles for use in the overview screen, and for preparing what is required to generate the 3D content. So far each path of terrain is one tile thick and is yet to prevent overwrites.
I have purposefully slowed down the spawn rate so that I can keep track of how things are working. As always, I have started off with lots of debugging displays so that I can keep track of all the minute details.
Adjacent terrain tiles will have an impact on what kind of terrain is spawned each step of the way.
Each instance is to be set to include one or more accessible planets where sports cultures, cities and landmarks can spawn. The map will use the hexpanel control I constructed last week. It will break the world down into a number of hexagon grids; each grid is to be joined together into a shape of a globe mesh; or sub-section of a space-station.
Terrain Classes
There are four terrain classes so far, each represented by a rough place-holder image.

Grassland

Plains

Flood Plains

Desert Plains
Each of the current and future terrain classes will come with a number of attributes which will affect local sports cultures and your experiences in the localities. The arrangement, proximity and character of the terrain are determined by a number of metrics according to the user specified planet settings, any active MOD or instance server overrides.
Second Step
In an attempt to adjust the spawn thickness setting, I have seen an increase in land scale; but not as much of an increases as expected...