Sunday, 9 June 2013

Overview of Sumobot Simulator 2013 v1.0!


Sumobot Simulator 2013

Main Screen of Sumobot Simulator 2013.

Once Sumobot Simulator 2013 is launched, the user is presented with the Main Screen, which allows for the user to select various options in designing their robot:
-The Menu Bar allows for the user to start a new sumobot design, open or save an existing sumobot configuration, as well as switch to the Mechanical, Electrical and Simulation windows. You can also do this through the Tab Panel, as seen in the image above.
-The Info Panel displays the current properties of the sumobot (such as its mass and the voltage of the motor), as set in the other Tabs.
-The Main Panel is the workspace where the user will be entering most of the values and specifications for their robot.

Mechanical Tab

The Mechanical Tab is where users can set some of the main physical properties of their robot, such as its mass, the diameter of its wheels and the coefficent of friction of the surface which the sumobot will be driven across. The corresponding changes will be visible in the Simulation Tab.

Electrical Tab

In the Electrical Tab, the user can set many of the internal specifications of the robot, such as the motor voltage, current, speed and diameter of the drive shaft. Furthermore, a power supply (voltage, current) can be selected, as well as the wire length, resistivity and area outlined.
The user can additionally switch between a series or parallel circuit configuration for the motors using the Circuit button found in the top-right corner of the screen.

Simulation Tab

The Simulation Tab is where the real fun begins! Here, the user can have their completed sumobot run across a virtual surface (which can be changed using the coefficent of friction), with the Distance, Velocity and Accleration graphs of the robot  displayed in real-time as the robot moves.
Once the user is satisfied with the properties of their sumobot, they can simply click the Simulation button to get their robot going!

Good luck in the ring!
 -The Codebusters Team

Thursday, 6 June 2013

And time!

We are finally officially done our project.  After several hundred (maybe even thousands) lines of code the Sumo Bot Simulator 2013 has reached 1.0 status.  To celebrate our wonderful achievement here is a link to our dropbox where you can download our program:

So long and thanks for all the sumo,
- code buster team

Monday, 3 June 2013

O_O.. Hold the Commentary!

Our client, as of today has been updated with an acceptable version of the sumobots client. In preparation for our presentation much of the code in our program lacks programmers comments. We will continue to add more information in the comments for interested onlookers to fully understand the code.

As for the issue of running the program on the school computers, we will no longer continue to make it accessible within the school as too much information regarding the school's network and why the application refuses to run on these computers is not available at this time. The application however is fully functional for home use and will be available to students via Mr. Song's Dropbox.

Another important topic that came up in today's group meeting was the idea that much of the lwjgl library and the other libraries used by our program are incorporated into the entire file itself when much of the functions are not being used and simply take up much more space. The file size can be reduced by removing the unnecessary components of these libraries just to improve efficency, the size of the download and download time.
Through expermentation and testing we have discovered that on standard computers the program tends to recieve a lag delay as the program itself runs by constantly updating. This real time element is noted to be extremely resource intensive and we feel the need to address the issue if there is still time available. The solution is simply to integrate event handling into our code and is assumed to require a bit of time to fully update the entirety of the project. Despite the issues with few seconds of delay it the program still runs and has entered a promising final stage. Updates in terms of the lag/delay fixes may or may not be implemented with the release of Sumo Bot Simulator Version but will be integrated in future releases if the group continues to procede with updating the project.

Thank You!
~ Code Busters Team!

Friday, 31 May 2013


The issue with the help file has been resolved. Despite the previous mention of attempts to open the help file or at least move the information with the jar file, the owness  will be left to that of the user ensuring that the ENTIRE folder (with all external docs, files, resources) is moved for the program to function. In order to properly convey the message to the user a file has been attached to inform the user about the specifics method of moving the files in order for the application/program to run properly.

On another note, the surfaces have been implemented however still require touch ups so that the tiled blocks for ice and concrete are aligned. Since the project deadline has been postponed to Friday June 7, 2013 we still have extra time to optimize the program.

In order to successfully use the time given we will enter a final debug test during the course of next week. Hopefully we can locate and correct bugs. We hope to make the program run smoothly on several different systems with little to know problems by making it less resource intensive and iron out the kinks in our application.

Thank You for your time.
 ~ Code Busters Team.

Tuesday, 28 May 2013


The issues with the initialization of the default values using the xml file have been solved. Upon opening the application the input values use to default to 0. Reworking the pathways to presently allows for the default values for standard dimensions and values in regards to the mechanical, electrical items.

Whilst fixing the previous issues with the default values the help text file refuses to open up properly. Although it was fully functional before it currently refuses to open and is to be adressed.

1. Rework pathways to open the help text files.
2. Get the pixel art done for the other two surfaces:
               - ice
               - concrete

Thank You.

~ Code Busters Team

Thursday, 23 May 2013

CRUNCH time.

Many things have been accomplished since our last blog post with the progression of this project. The list includes the implementation of our splash screen, adusting the graphs, adding the tool tips, the help files, and ultimately just tweaking and adjusting the program to meet our needs. Also the file is noted to work on home computers with the latest updated version of java, whereas the school computers don't even allow the program to open (school computers do not but the school's is still on the version of java from last year). All in all, the program is working fine and we wish to talk to our client in terms of useage of the application primarily for home use rather than within the school due to lack of knowledge as to why the file refuses to execute on the school's systems.

We are nearing the completion of our project, as well as, the end of the year. So what's left? Just updating the sufaces to look like ice, and concrete when the coefficient of friction is between a certain range. And yeah. yeah. yeah. CRUNCH!

Essentially that's all. Thank Yous!

~ Code Busters Team

Tuesday, 14 May 2013

Make it, or BREAK IT!

Progress is moving along swimmingly we are continuously trying to integrate the code that acts for the simulation with the simulation code that graphs both the vector and acceleration graphs. Currently we are having a bit of trouble with finding the accleration of the sumbot however we are trying to use the same process to calculate the velocity and apply it to the accleration calculations and graph.

With this progress we will continue into the beta stages. We will be intensively testing for bugs, glitches, optimization options to make our program function as properly and efficiently as possible. Test subjects will be selected from our target audience of grade 12 students involved in the sumbot project will be asked at random to attempt to break the program (pssht not the computer its running on).

Executeable file of our program does not run on school computers.
- we need to get this work.

~ Code Busters Team
CHYEAAH! English is a muffin.

Friday, 10 May 2013

OH NO its struggling!

We have finally got part of simulation tab running! The moving robot segment of our program is working well. The speed of ones computer will dictate the quality of program. The robot tends to struggle due to lag and is to be optimized further.

Currently we have only the wooden surface updated with more to come (ice surface needs to be completed).

Since there are currently 2 different versions of the program with certain updates. We must add both the moving robot simulation and the graphs onto one program. And yeah.

Next up is attempting to do the simulation of the force that the robot exerts on other objects (in our program that will be a box).

Peace Out Girl Scouts.
~ Code Busters

Tuesday, 7 May 2013

Le Update.

The SumBots Project has been progressing very well. We are currently finalizing our report that is to be submitted regarding our clients response/recommendations to the program.

The graphs for both the velocity/accleration have been implemented. Applying physics and incoporating the calculations with the input values is the next top priority. We still have to review the science/calculations with our client in order to finalize the math.

That is all.
         ~ Code Busters Team.

Monday, 6 May 2013

Graphs, graphs, graphs!

This past week, the Codebusters Team have come down with graph fever! That is to say, after a couple days of hard work, our developers have managed to display a working graph natively within the Slick library without the use of any external plugins! Through the use of calculus, we will then be able to easily compute both of the velocity and acceleration graphs (derivatives!), given a set position graph.

On the optimization front, while half of our modest resources have been dedicated to the task of making the simulator running amicably on a budget-oriented computer, progress is still very much in its infancy. With that said, we have already managed to decrease CPU usage on a dual-core system by 10-15%, and thus, our goal of reducing peak usage to less than 50% overall still stands. While memory (RAM) usage is less of an issue, we are nonetheless dedicated to limiting resource utilization in that area as well. 

In terms of the "Simulation" tab, we are happy to report that the inputting of default values into each of the properties is well underway, and as always, our graphics team is hard at work creating the images and textures that will increase the overall visual appeal of the program. Furthermore, advancements have also been made in implementing the many physical laws that will govern the movement of the sumobot while it is in the "Simulation" state.

Thus, while the team have encountered our fair share of challenges and obstacles over these past few weeks, we are nonetheless still running full steam ahead towards a final release, and we hope to return with more good news in the days ahead. =)

-The Codebusters Team


Wednesday, 1 May 2013

“Good progress so far”

It’s May Day! In other news, the Codebusters team has had their weekly meeting with our client, and we are happy to report that our progress on Sumobot Simulator 2013 has been extremely well received so far. At this point, we estimate that we have completed approximately 75% of the core programming, with completion of the “Simulation” tab and optimization being our immediate priorities. Here’s a list that we believe provides a good summation of the state of the program up to this point:


-The program state is currently nearing the “pre-alpha” stage, with stable daily builds being committed to Dropbox.
-Proper program versioning conventions are being/in the process of being adhered to!
-Various graphical improvements that increase the overall user-friendliness of the program has been made and approved by the client.


-While the current builds of the simulator are utilizing up to 75% of the available CPU cycles (on a 1.0 GHz dual core AMD C-50 CPU) during idle, we are aiming to reduce that usage down to less than 50% through various code optimizations.
- Furthermore, our R&D team is currently researching optimization methods through the use of multi-threading, which would assign specific tasks to each available core on a system and potentially free up system resources.
-In addition, multithreading would allow for the efficient utilization of hardware technologies such as asymmetric “Dual-channel” and “Quad-Channel” memory (RAM), which would enable each CPU core access to their own independent 64-bit memory controller (and again, reducing resource competition and the amount of memory faults to the page file)


-The client has suggested that default values for each of the sumobot’s properties are to be present into the corresponding input boxes at program start up, in order to increase user convenience.
-Moving graphs displaying the properties of the robot while it is in motion (such as its acceleration and velocity from moment to moment), will be implemented on the side panel with accompanying value readouts for each.
-A button or switch will allow for the user to specify the robot’s current state (whether it is in the simulation mode or not)
- Another series of switches will control the independent movement of each wheel (either in the ON or OFF state)
- Thus far, the simulation will consist of a side view of the sumobot as it traverses down a 10 meter path (which will loop), although this is subject to change. 
-The user will further be able to specify the mass of a block that the robot will push along a variety of surfaces (each with varying coefficients of friction). The default mass will be set to 2 kg.
-Lastly, our graphics team is hard at work with the visual aspect of the simulator, creating the many textures and images that will be required to implement all the features of the "Simulation" tab. 

Overall, these have been a very productive couple weeks for the Codebusters Team, and while we have undoubtedly encountered a few roadblocks during this time (as common with any project of this size), good progress is nonetheless being made towards achieving a complete build of the simulator. Kudos to the team!

The next progress meeting with our client is scheduled for a week from Friday, and we hope to return with more good news then!

-The Codebusters Team

Tuesday, 30 April 2013


The project thus far has been moving along smoothly, however, we have encountered lag issues through our quality control department (Joey). The application itself is relatively stable but due to the numerous variables that must be held accountable the program should be optimized in order to reduce lag.

Before we can move onto the task of developing the simulation aspect of the application, we must address rework our code using the resource manager. Our next task is to test different build versions on different computers with varying specs to test the stability of our program for school use (as mentioned before is relatively slow) and for personal computers.

Other ideas to rework the application include allowing for a button that updates everything after event changes (text change, buttons click, i.e.).

At least we are making progress!

// CodeBusters! (╯°□°)╯︵ ┻━┻

P.S. Lag sucks.

Monday, 29 April 2013


Mechanical Panel Stuffs:
- Coding the interface and positioning the text boxes.

Electrical Panel Stuffs:
- Rework the colour codes in terms of blue wires as the black/grey is to similar.
- Positioning interface and text boxes.


Simulation Panel Stuffs // more information to be added later
Physics Calculations

Edit Electrical Panel Stuffs
- Add motor to series circuit, change stroke colour to blue, export as png with background as transparent
- Fix Up parallel circuit, change stroke colour to blue, export as png with transparent background

Create Simulation Panel Stuffs:
- Use profile view of robot
- Create 3d Version of robot + top down view
- Red Vector arrow kit (Tip, Tail and Tile-able Middle)

Wednesday Discussion
- Remember to discuss what exactly do you wish to have displayed through the simulation pane.
    - Display the maximum velocity?
    - Does this have the capabilities to move a 1kg block and speed while moving it?
    - How do we display the movement in terms of the top down view. IF wheels or force is different it will
    spin.IF the wheels where identically moving at sme speed
    - Any other ideas of what to be displayed?

- Check the physics with Mr. Song.

// Code Busters OUT

Tuesday, 23 April 2013

Meetings and milestones

         We are pleased to announce this week that we have reached a very important milestone on the long and sometimes arduous path of software development. As mentioned in the last post, a scheduled meeting was held with our client this morning, where our team was able to demonstrate a fully-functional build of the simulator, thus far. While we are pleased to report that our progress up to this point was received warmly by Mr. Song, there is still a lot of work to be done before we will arrive at any kind of final product.

             With that said, this week, the Codebusters Team are hunkered down (as always), putting the final touches on the graphical component of the simulator. Furthermore, a few members of the development team have been tasked with beginning the design of the simulation portion of the application—specifically the implementation of the many physics concepts and equations that will be used to model the properties and motion of the sumobot. As this software will be targeted towards an academic audience, we are striving to represent as accurately as possible all the physical forces that will have an impact on the performance of the robot, and while there are undoubtedly many technical and time-related obstacles to achieving this goal, our modestly-sized team are continuously striking a balance between efficiency and precision.

            Lastly, as we enter this critical stage of the development process, we have committed to increase the frequency of communications with the client in order to ensure that a quality product is delivered. Specifically, a weekly progress meeting has been established at the convenience of our client, and thus, we hope to accelerate the pace at which the project marches towards completion.

-The Codebusters Team

Thursday, 18 April 2013

That GUI and some complications

The project is progressing well in fact we have finished the graphical user interface.  That is all the buttons are very pretty and click-able and the info pane has stuff on it.  All that is left to do is add the tab buttons (easy) and draw the electrical and simulation screens (a bit more involved but still relatively simple).

Now to problems at hand: unfortunately, as it turns out we structured the program in the wrong way.  The good news about this is that it was not a show-stopping error and will require only a quick bug-fix and a few man-hours of work to remedy.

The problem lies a couple of variable declarations at the beginning of the driver class.  What they do is allow us to access and modify all the declared variables relatively easily.  An error was made here because it was decided that the program would be designed such that it would be simple to commit changes to the code.

After careful consideration by our programming team, it was decided for the sake of optimization and reducing redundancies, that the program would be  restructured into a series of classes, each of which would represent a single attribute of the robot, and that the variables will be accessed from that .  This also means we will also need to slightly modify the XML read/write class in order to accommodate the new structure.

- The Codebusters Team  

Wednesday, 17 April 2013

Everything is coming along swimmingly!

It seems that spring has finally come upon us here at our head office in Toronto. Now that the weather is particularly nice outside, the project is coming along swimmingly!  From the last post we have started to make the info box which will display all the robot's information.  We have also started making the program do stuff.  That is, the user can input values into text fields and modify the mechanical components of the robot.  Presently the user input is not yet being processed. However, we anticipate that this will change by the end of the day.

The deadline for the rough version of the application is next Monday and the following Tuesday we have a meeting with the client.  The way things are going right now guarantee that the deadlines will be met and our application will go over and beyond our client's expectations.

It's an exciting time here at Codebusters.

-The Codebusters Team

Thursday, 11 April 2013

XML reader/write success

The XML reader/writer is complete!  This means that we will be able to load and save the users information.  Here is some of the code:

public class XMLRead {
     static double PSVolt, PSAmp = 0;                                    // Variables for the power supply
     static double MVolt, MAmp, MSpeed, MTorque, MDriveShaft = 0;        // Variables for the motor
     static double WiLen, WiOhm, WiArea, WiRes = 0;                        // Variables for the wire
     static double WhDiam, WhMu = 0;                                    // Variables for the wheel
     static double RWeight =  0;                                        // General variables for the robot
     static String WiCircuit = " ";                                        // Type of circuit
        public static void write(String name) {
                      DocumentBuilderFactory documentBuilderFactory =       DocumentBuilderFactory.newInstance();   
             DocumentBuilder documentBuilder = documentBuilderFactory.newDocumentBuilder();
             // Makes the root element robot
             Document doc = documentBuilder.newDocument();
             Element rootElement = doc.createElement("robot");
             // The next blocks of code are all children to the root element "robot".
             Element PSvoltage = doc.createElement("PSvoltage");

 // Creates an instance of TransformerFactory so that a "real" XML file can be created
             TransformerFactory transformerFactory = TransformerFactory.newInstance();
             Transformer transformer = transformerFactory.newTransformer();
             DOMSource source = new DOMSource(doc);
             StreamResult result = new StreamResult(new File(name));
             // Exports the XML
             // To clarify:  this is when the XML file is made on the local hard drive. 
             transformer.transform(source, result);
    public static void read(String doc) throws IOException, SAXException, ParserConfigurationException{
         File file = new File(doc);                                                             
         DocumentBuilderFactory documentBuilderFactory = DocumentBuilderFactory.newInstance();   
         DocumentBuilder documentBuilder = documentBuilderFactory.newDocumentBuilder();
         Document document = documentBuilder.parse(file);                                       
         // Gets the info and makes it an double
         PSVolt = Double.parseDouble(document.getElementsByTagName("PSvoltage").item(0).getTextContent());   
    public static void main (String args []) throws IOException, SAXException,   ParserConfigurationException, DOMException, TransformerException {
         }catch (FileNotFoundException e){
             System.err.println("file not found");
         }catch (NullPointerException e){

The complete code can be found in the drop box folder.  In fact, the code is already in a folder that can be downloaded and imported into eclipse to work on.

Tuesday, 9 April 2013

Buttons, XMLs and Due Dates

Now that all the planning is done we need to set some deadlines.  Actually, to be more specific it is not us who necessarily set the deadlines but the class (this is project we are doing for a class).  So, Monday, April 22, we will have a working program.  Obviously, the application will not be fully functional but the plan is to be able to open and close projects.  That means we need to finish the GUI and the outline of the other classes including the XML reader/writer.

Right now we are working on getting the GUI working.  The idea right now is to make a button class.  All the other GUI objects will just be derivatives of that.  Since we are using slick2d to make our program we don't have to make these buttons from scratch.  Slick has some interfaces for graphical user interfaces.  Also, slick provides a textfiled class with will be useful to allow the user to input values.

At the same time we are working on XML reading and writing.  That's not too bad as we are using DOM. 

Saturday, 6 April 2013

G and G: The two tales of Git and GUI

While playing with the git repository for the project I broke it (kind of).  In any case, it became kind of useless so I made a new one.  You can find it here:

On to more exciting news: we have a GUI design!  Here is one of our images.

As you can tell, the GUI we have in mind is very minimalistic.  This is because the application has to be able to run on our school computers which as a matter of fact are not very good.  Also, because we want to keep the application very simple and elegant.

In terms of making the image, we used MS paint, however, we will build the application using nifty and slick2d.  This means the details will change but we aim to keep the general "feel" the same.

All the images we made can be found in our drop box folder and we also provided a neat little document about the design.  As always, there are two versions of the document, one  is .doc and the other is .odt. 

Thursday, 4 April 2013

SRS and Feasibility

This post is much over due and it contains our feasibility study and software requirement specification.  The feasibility study just outlines if the application is possible to complete - it is.  The software requirement specification outline the requirements needed in out application.
In the near future there will most probably many more documents so we have a new drop box folder.  Here it is:

Tuesday, 2 April 2013

First Post

As the title of the blog implies, we will be developing a sumo bot simulator.  To clarify, a sumo bot is a robot that you use to push another robot out of an arena.  If you want a much better definition and more information on sumo bots you can check this website.

The goal of our sumo bot simulator is to allow people to virtually build a sumo bot.  Why?  Because, as part of our school's grade 12 physics course you need to make a sumo bot.  So, as a computer science project and as dedicated nerds we decided to make an application to virtually build a that glorious machine.

If you want to see our code as we develop the application, we have a GitHub repository at:

More information will be coming soon.

                                                                                    Courtesy of Parallax Inc

-The Codebusters Team