Monday, 17 February 2014

2.7 Version Released

Game updated to version 2.7. Detail information with screenshots are shown below.  The update log is also attached at the end of this post.

Backgrounds were added to the game.  New prop - clock is also added, which can reduce your stage time to achieve a better time record!  In addition, the game can be paused by double blink now!

 What's more, two danger objects comes - tubes and fires.  Tubes only appear at upper edge while fire only appear on the ground.

-- update 2.7 --
1. Bug fixed
a. bug: game-over status is able to display notes
2. Syntax optimization
a. much more simplified
b. better code format and comments
3. Function modified
a. use timer instead of datetime module
4. Function added
a. add pipe
b. add fire
c. add background
d. add other two backgrounds
e. pause (double blink for BCI ver)
e. add clock
f. add input data display at welcome page
5. Display optimization
a. new time format
b. add clock image in in-game display

Sunday, 16 February 2014

2.6 Version Released

Game updated to version 2.6. Detail information with screenshots are shown below.  The update log is also attached at the end of this post.

Original blocks are replaced with three kinds of monsters, two of which can move vertically. The role will also display a different image while in-air.


The purple prop is elixir (designed in ver2.4), which can make role be invincible for several seconds.
When the role catches a prop or collapse with monsters, corresponding label will display around the role.

-- update 2.6 --
1. Bug fixed
a. bug: probability of object generation was irrelevant with horizontal moving speed
b. bug: vertical speed of object was irrelevant with attention
2. Syntax optimization
a. optimize code via creating player class
b. re-arrange code and comment
3. Function added
a. add images' relatively directory support
b. add base speed to prevent absolutely stop at attention 100
c. add profile save and load !
d. add get-prop label
3. Function modified
a. abort gravity-attention dependency
b. adjust some parameters
c. remove time footnote
d. reduce life cap to 7
4. Display optimization
a. change block to three kind of monster
b. change picture of magnet
c. change picture of elixir
d. add in-air player image
e. horizontal filp monster image
f. remove 'max' life in-game display
g. include stage info in-game display
h. hide some test buttons
5. Package
a. launch from bat (no cmd)

Friday, 14 February 2014

Report Structure & BCI Version of The Game ------ Week 3 Team Meeting

In this meeting, we mainly discussed the structure of our report, and tested the BCI version of the game.
The contents listed below are the initial assumption of the structure of the report for our project.
  1. Title page: including the name of project, our group numbers, our names, the date...etc
  2. Content
  3. Abstract: Gives a summary of the whole project and report
  4. Introduction:
Ø  Background information: the development of Electroencephalogram (EEG) technique, NeuroSky company, fundamental of the Mindwave headset...etc
Ø  The application of EEG in the field of game control 
Ø  The introduction to the project
Ø  The purposes of the project
Ø  The introduction to the report, which includes the structure and the contents

5.  Materials: Mindwave headset produced by NeuroSky, computer, Python Programming  Language
6.   Procedure: the whole procedure of the project, which includes the idea for the game designed, how each part of the game was achieved, the record of our meetings, record of the updating of each version, the updating of the blog. This part will be divided into five sub-part according to the different arrangement of five weeks
7.   Results: presenting the game in detail, the detail of the code with comments, the testing for the game, presenting the blog… etc
8.   Discussion: comments on and explains results; the playability, operability, effects of the game; the advantage and disadvantage of the game; the comparison with some existing game; the bug of the code and the procedure of debugging; the limitation of the project; how far the result met its original prospection… etc
9.   Conclusion: the summary of this project
10.  Reference
11.  Appendix: the blog address; the background story of the game; the feeling of each members to this project and teamwork. 

Game version test:
Game updated to version 2.5 BCI ver.  The update log is attached at the end of this post.

-- update 2.5 BCI ver --
1. Function added
a. implement API
b. add in-game attention display
2. Function modified
a. set up gravity-attention dependency
b. change speed-attention dependency
3. Display optimization

a. optimize in-game distance display

Wednesday, 12 February 2014

2.4 Version Released

Game updated to version 2.4. This update mainly focus on some significant bugs.  The update log is attached at the end of this post.

-- update 2.4 --
1. Bug fixed
a. bug: abnormal magnet phenomenon under extreme speed
b. bug: out of range objects are not deleted
2. Syntax optimization
a. delete useless functions
3. Function added
a. add elixir
4. Function modified
a. optimize botton protection
b. optimize magnet algorithm

Sustainable Design & Version 2.3 Testing ------ Second Personal Team Meeting

This is the second personal meeting of our team, the contents are mainly include two aspects: discussion for the Sustainable Design report, testing of the first complete version of the game.

1. Sustainable Design:
Via discussion, we decided to analyse SD and Ethical Implication in terms of hardware and software respectively. The hardware is the mindwave headset, it must respect to the Restriction of the Use of Certain Hazardous Substance in Electrical and Electronic Equipment (RoHS) and the regulation of Waste Electrical and Electronic Equipment (WEEE), we will be a re-brander of this headset if commercialize our project. The software is the game coded by our team, it must respect to the Software Engineering Code of Ethics and Professional Practice.

The items listed below are some ideas which can be included into the SD report:

  • Laws (Commercialization, Programming)
  • Professional guide line
  • Life cycle evaluation 
  • People's health and security (body and psychology)
  • Privacy of customers
  • Copyright controlling
  • Design improvements 
  • Potential product
  • New market for the product that has not been considered so far (medical field)
New idea will be added while writing.

PS: the structure of the SD report:
  • Project title
  • Brief Description
  • Regulatory Considerations
  • SD/Ethical Implication of large scale manufacture and sale
  • SD/Ethical Implication of follow-on products/markets

2. Version 2.3 testing:

Game updated to version 2.3. Detail information with screenshots are shown below.  The update log is also attached at the end of this post.

Two props are designed in the new version game.  The first one is extra life heart, which can add life for the role.  The second one is magnet, which can grant role the power of attracting coins.


Version 2.3

-- update 2.3 --
1. Syntax Optimization
a. optimize moving object class

2. Function added
a. add SHM effect to moving object class
b. add heart
c. add 'Generate heart' button
d. add invincible indicator
e. add life cap
f. add magnet
g. add 'Generate magnet' button
h. add magnet time footnote
i. add magnet indicator

Tuesday, 11 February 2014

2.2 Version Released

Game updated to version 2.2. Detail information with screenshots are shown below.  The update log is also attached at the end of this post.

The game windows is much larger now.

The in-game display is also optimized.  In addition, objects now can automatically generate in a random manner without clicking the button.


-- update 2.2 --
1. Bug fixed
a. bug: collision with coins will reset invincible time
b. bug: stage clear prompt will let player stay still
c. bug: player has a little chance to get stuck at boundaries

3. Funcition added
a. Add subtitle at welcome page
b. Add margin
c. Add object delete algorithm
d. Add object generate algorithm

3. Display optimization
a. Bigger canvas!
b. Better in-game info display

2.1 Version Released

Game updated to version 2.1. Detail information with screenshots are shown below.  The update log is also attached at the end of this post.

Group member names are attached at welcome page.

In this version, once the player have finished a stage, pressing 'NEXT STAGE!' will start next stage.  

New profile menu is added, which displays total coins player has ever earned and each stage's highest records.

 New about menu is also added.

-- update 2.1 --
1. Function added
a. Add 'HOME' button
b. Add author name at welcome page
c. Add 'PROFILE' button/profile page
d. Add money
e. Add record
f. Add 'ABOUT' button/about page

Beta Version Released

The beta version of our game is just finished.  Detail information with screenshots are shown below.  The update log is also attached at the end of this post.  

As shown below, the game now has a welcome page.

Once 'GO FLAPPY!' buttion is pressed, a new game will start followed with a small rectangle popping up to show the stage information.  (This version has only 1 stage right now)

In game, pressing 'generate coin' button or 'generate block' button will produce a new coin or block with random height at the most right side.  The up right corner shows number of coins you have caught, number of life you remains, distance you have ran and time you have taken in this stage.  Player have to control the running speed of role by rising or reducing mind attention (speed is a constant in non-headset test version).  Also, an eye-blink can switch the gravity direction (or pressing 'reverse gravity' button in non-headset test version).  Once the role collapse with a block, the number of lives will reduced by one and the role will flashing for a few moment (invincible status).  

 If you survive to run over the target distance, a STAGE CLEAR window will pop up.

If you use up all your lives, a GAME OVER window will pop up.

-- update 2.0 beta --
1. BUG fixed
a. Change default gravity direction

2. Syntax Optimization
a. Unify data names
b. Unify function names
c. Classify font size
d. Classify radius
e. Delete redundant code

3. Function added
a. ### Add API
b. Add 'GO FLAPPY !' button
c. Add blocks
d. Add 'Generate block' test button
d. Add game time calculation
e. Add invincible time
f. Add invincible time footnote
g. Add invincible time reset by block collision
h. Add flashing effect while player is invincible
i. Add life
j. Add 'Suicide x1' test button
k. Add distance
l. Add 'Jump 100m' test button
m. Add game over prompt
n. Add stage clear prompt
o. Add stage target prompt
p. Add dynamic pop effect
q. Add 'NEXT STAGE !' button
r. Add button protection
s. Add welcome page
t. Add version at welcome page

4. Display Optimization
a. Change button name
b. Adjust coin size
c. Adjust text colour
d. Adjust image layer

Sunday, 9 February 2014

Alpha version of game

The code of alpha version of game is completed. The game contains gravity control, movement control and image loader. The final version should also include random coins and monsters occurrence with advanced props.



For now, the next step is to combine the game with the api. To be more specific, change the gravity with blink and control the speed with brainwave strength.

Friday, 7 February 2014

Flowchart & Version Determination ------ Week 2 Team Meeting

During this meeting, firstly, we discussed the basic construction of the game, and created a flowchart to explain how can we implement the game. The flowchart has been shown blew:



About the game, we decided to use the assumption of a horizontal version running game which introduced in the record of our first personal team meeting.
Furthermore, programming has begin, and the alpha version can be finished in this weekend.

Wednesday, 5 February 2014

Brainstorming and Time Arrangement------First Personal Team Meeting

This is the first personal meeting of our team, the contents are mainly about two aspect: brainstorming for designing the game, the arrangement of time for the rest of the days of this week.

1. Brainstorming for designing the game:
Firstly, about the type of the game, we decided to design an avoiding game, such as "Flappy Bird".

Flappy Bird

The first assumption is that user can use their attention to control the altitude of a ball, higher attention level can make the altitude of the ball rise higher; if the attention level decreased, the ball will also descended. Furthermore, some barriers may appear from the right side and moving to the left side, so user need to control the ball using their attention to avoid the barriers.

However, via discussing, this game does not have a high playability, we need make the game more interesting, and we also need to add more game factors and more interesting designs to increase the playability. Therefore, this assumption was abandoned.

Another assumption is a horizontal version flight shooting game. An aircraft moves from the left side to the right side, and the background will moves in the opposite direction. Higher attention level of the user can make the aircraft rise higher, while lower attention level will make the aircraft descended. Similarly, some barriers will appear, user can control the aircraft to avoid them, or they can blink to make the aircraft shoot and break the barriers.

An example of horizontal version flight shooting game


This version is seemed to be more interesting, but here we got a problem: if the user blink continually, they do not need to control the aircraft, because they can break every barriers. This can also make the game boring. For this problem, we decided to design some barriers that cannot be broke, so the user have to control the aircraft to avoid them.

Considering the operability, we decided to make the aircraft descend by itself when the attention level of the user reduce.

Also, considering the difficulty of the game, flight will continue while the aircraft descend to the bottom of the screen, which means the game will be ended only if the aircraft is broken by the barriers.

The basic type of the game had been determined, next, we discussed some modification about the details of the game.

Firstly, about how to control the altitude of the aircraft, and how to make the game more playable, we thought we can use the reversal of the gravity to replace the attention level to control the altitude, and the attention level can be used to reverse the gravity: if the attention value exceed a certain value, the gravity will be reversed, and the aircraft will rise; if the attention value lower than this certain value, the aircraft will descend.The aircraft will fly faster if user blink. The assumption of shooting of the aircraft was removed.

However, if we use attention level to reverse the gravity, this game will become very difficult, because it is very hard for people to control their attention precisely. Therefore, finally, we decided to use blink to control the gravity, and use attention level to control the speed of the aircraft.

Next, some game factors which can be added into the game was discussed, such as we can add a enemy plane to pursue and attack the aircraft of the gamer. These factors will be added as needed after the basic coding is completed.

At the end of the meeting, we decided to program two games simultaneously:

  • A horizontal version running game
  • A horizontal version flight shooting game
All of them are based on BCI control.

These assumption are just some preliminary plan, some new idea may appear in the next three weeks.



2. the arrangement of time for the rest of the days of this week:

  • Before Sunday, the testing of API with some exist game need to be completed
  • Writing some simple code to test if the headset can work normally
  • Continue to learn the Python Programming Language 
  • Continue to update the blog
  • The important achievement should be recorded into the blog
  • The detail of every work, every progress and our findings or idea should be recorded into the log-book
  • Finding some picture and music materials for game design


Tuesday, 4 February 2014

API for python tested

The Neurosky corporation offers three methods by which developers' software can connect to their headsets.  See at: http://developer.neurosky.com/docs/doku.php?id=which_api_is_right_for_me

Our project chooses the simplest way -- use an official background program called 'ThinkGear Connector' to get headset data from a standard TCP/IP socket.  With the support of TGC, a connection between headset and COM port is established.

In order to transfer data to our python script, an API is also needed.  We have found an existing API on the Internet and test it.  The progress didn't go well at first.  After a lot of failed attempts, the API finally works well.  Cheers!  

Saturday, 1 February 2014

Testing for the NeuroSky Mindwave Headset

Kai

Yunchuan

Silei

Wei




Brief Introduction of the Python Programming Language

Python is a widely used general-purpose, high-level programming language. Its design philosophy emphasizes code readability, and its syntax allows programmers to express concepts in fewer lines of code than would be possible in languages such as C. The language provides constructs intended to enable clear programs on both a small and large scale.
Python supports multiple programming paradigms, including object-oriented, imperative and functional programming or procedural styles. It features a dynamic type system and automatic memory management and has a large and comprehensive standard library.
Like other dynamic languages, Python is often used as a scripting language, but is also used in a wide range of non-scripting contexts. Using third-party tools, Python code can be packaged into standalone executable programs (such asPy2exe, or Pyinstaller). Python interpreters are available for many operating systems.
CPython, the reference implementation of Python, is free and open source software and has a community-based development model, as do nearly all of its alternative implementations. CPython is managed by the non-profit Python Software Foundation.
From Wikipedia

Some of its key  features:
  •  very clear, readable syntax
  •  strong introspection capabilities
  •  intuitive object orientation
  •  natural expression of procedural code
  •  full modularity, supporting hierarchical packages
  •  exception-based error handling
  •  very high level dynamic data types
  •  extensive standard libraries and third party modules for virtually every task
  •  extensions and modules easily written in C, C++ (or Java for Jython, or .NET languages for    IronPython)
  •  embeddable within applications as a scripting interface

From the Official Website 

More information about Python: 

Website to learn the fundamentals of programming using Python:

Friday, 31 January 2014

Introduction & General Plan ------ Week 1 Team Meeting

This is the first meeting for our year 2 project, all of the members of our team attended。

Firstly, the items listed below are our team members and their corresponding responsbilities:

1. Kai Xu: the Project Manager who is responsible for managing and lead the project team, and managing the coordination of the partners and the working groups.
2. Wei Xiao: the Designer whose work is creating the required block diagrams, circuit diagrams, flow charts...etc.
3. Yunchuan Xu: the Implementer/Developer whose works are connecting systems/circuit and writing the code.
4. Silei Wang: the Technical writer who is responsible for recording and maintaining all meeting logs, updating the log book, creating the project blog, creating project post and writing project report.

However, due to the huge workload, we cannot complete each part without teamwork. Therefore, although we have a specific division of labor, we still need to help each other so that the project can be completed successfully and perfectly.

At the beginning of today's meeting, our supervisor roughly introduced some information about this project. Additionally, we confirmed the roles of ourselves , and we also planed what we will do in the next four weeks via created a timeline which have shown below.

(Initial timeline, created by Google doc prototype.)

The supervisor then provided the necessary component, which is a Mindwave headset produced by NeuroSky (look the picture below), to us. This headset is based on the Electroencephalogram (EEG) technique, and can digitizes analog electrical brainwaves to power the user-interface of games.  

NeuroSky Mindwave Headset

The company provides several games for user to test the performance of the headset. After getting the headset, we used some of the games to test it so that we can ensure that the headset can work normally.Furthermore, we searched more information about this headset to be familiar with its operating principle, and how we can design the game or what kind of language we can use to write the code of the game.

Via discussion, we decided to use Python Programming Language to program the game. The reason is that this language is simple, readable and extensible.

We also planned to meeting at least one time before the next Friday to discuss some detail about the game and coding.

Anyway, our work has started. 

Google documents created

Create some Google documents for communicating with group members conveniently. New ideas and documents which should be shared will be on this place.

Monday, 27 January 2014

New Semester!

New semester starts! Hope we can do a good job in year 2 project.