Latest Entries »

JEE as I understand it

Servlets/JSP are just two ways to process data in your web application and return a response to the user. Servlets are java with HTML embedded in them. JSP are HTML pages with java code inside them. JSP are more flexible. You can map both to certain URLS in your web.xml file. So when a request comes in for a certain URL the web container will try to send the request to the correct Servlet/JSP. If its a servlet it can be initialized if it has not already been, and then the same Servlet can process many requests. A JSP has to be translated into bit code and then compiled into a java class before it can be run, then it too will be initialized. Each JSP instance is unique so there is no threading issues.

  • JSP is a webpage scripting language that can generate dynamic content while Servlets are Java programs that are already compiled which also creates dynamic web content
  • Servlets run faster compared to JSP
  • JSP can be compiled into Java Servlets
  • It’s easier to code in JSP than in Java Servlets
  • In MVC, jsp act as a view and servlet act as a controller.
  • JSP are generally preferred when there is not much processing of data required. But servlets are best for use when there is more processing and manipulation involved.
  • The advantage of JSP programming over servlets is that we can build custom tags which can directly call Java beans. There is no such facility in servlets.
  • We can achieve functionality of JSP at client side by running JavaScript at client side. There are no such methods for servlets.
  • You do not have member variables in servlets because every request goes to the same servlet object.

Struts 2 is an opensource framework which makes building web applications easier, based on java Servlets and JSP technologies. We need struts because Servlets do not output HTML easily and JSP are useful only for small applications. Struts uses the model 2 MVC architecture, (link here to description).

When using struts2 you do not have to worry about retrieving input parameters from the request object. This is because  of the value stack. In struts2 you have action classes instead of servlets. When a new request comes in, it goes to the web.xml file(or deployment descriptor) and will look for the servlet mapping, this is where you can add a struts2 filter. The filter will direct to the struts.xml file which contains the url mappings for the action classes.

When it finds the action class you are looking for it will add a new instance of that action class to the value stack. The input parameters are then mapped to the member variables in the objects on value stack. By default it will map to the first matching member variable it finds.   Then you can access your business service and perfrom the required processing. Store the new values in the action class or DTO. You will then return a string code, this code will then be mapped to a jsp inside the struts.xml.  Inside the jsp you can request values using the member variable name, this will then be looked up in the value stack.

Overview of Struts and web apps

Spring

Hibernate

This post is a work in progress

Advertisements

Scratch Comics

Scratch Comics was a business idea created by myself and two of my class mates.

We started this project by discussing possible business ideas over a coffee meeting. We first created a colaboration file to store all the analysis and research.[Link] We had a few other decent ideas like an educational game company with some decent game concepts but in the end we opted for the comic creator and publisher idea. I was skeptical at first because I was unsure of the feasibility of the idea. So we had a long discussion about the idea where Ian and Colin tried to convince me it was a good idea and I provided constructive criticism to ensure we explored the idea in-depth before committing to the project.

The Idea was to create a web-based business that would allow indie comic developers and writers to meet and collaborate. They can learn and enhance their skills with the online tutorials that we and other users will upload. Once they have finished works we would publish and sell the comic for them. We would sell the comics online from the website and on eReaders and Ipads.

We then did some market research into the feasibility of the business plan and found that since the emergence of all the comic book movies in the last few years the sales of comic books have gone through the roof and the market is wide open for indie developers and publishers.

Once we had a solid evidence that there was potential in the market we set about looking for possible competition on the net. As it turns out there is no website (that we found) that creates a community and has drawing tutorials and publishes your work. So We split up the sections of the project to work on.

We agreed I would work on the Financial and future prospects, Ian did the Customer Benefit and Product Description while Colin did the innovative characteristics and Description of the Customer.

I worked on the financial side of the business. I started by researching comic sales in north America. As it turns out some of DC’s top comics sell over 130,000 issues every month and the average sales for good quality indie comics is in the range of 20 – 50 thousand a week. In the last few years the number of these comics sold online is growing. Marvel now have hard and soft-copies of all its comics because the new customers coming into the market prefer digital versions, compare with the older generation who prefer the hard copies. This bodes well for us in the future since we are positioning ourselves in the forefront of this new generation.

I then started created a list of all the potential expenses for the balance sheet. I then used the break even formula to work out the necessary amount of sales we would need to sell our comics online at to make money in three months. I then researched the average price of these items online to see if we would be meeting the market average. It turns out we would be slightly below the average. Which in the USA is $3:99 whereas we would be selling our work for €2 + vat.

Next I created the actual balance sheet. Link

I used the figures of an indie comic book start-up in the US as a reference for the gradual rise in comic book sales. I used the sales figures on comichron as a reference for the sales figures for the graphic novels.

I then did up some simple ideas for possible future extensions of the company. I investigated areas like more mobile apps, hard copies of the comics for the die-hard fans. This was our original workbench and collaboration file.

We then assembled all the different parts of the project into a presentation to give to the class. We then animated the slides and refined them to try to give the presentation a smooth flow. We then practiced giving the presentation a few times to try to get our timing right. Link

The final file we created was an executive summary that could be turned into an elevator pitch should we wish to pursue this venture further in the future. Link

I enjoyed doing the market research for this project and doing up the financial projects. I gave me a look into the world of an actual start-up business, it has shown me just how hard it must be for start-ups. However it has left me hopeful for the future that I may start my own business one day now that I know there is a lot of benefits and people and grants that will help.

Ethics

This week in written games analysis the class had a guest speaker James patton who spoke about gamification and a second lecture devoted to ethics in games.

James spoke about both the good and the bad points about gamification and went into detail on a few points. He talked about how some people want to try to gamifying our entire lives because they believe that will somehow make our lives better. The other side of the argument is that “gamification is bullshit” and should not be applied to everything we do. He touched on the adverse effects it can have, like the fuel efficiency game that made people drive more recklessly. The final point he talked about was the ethics involved in gamifying things.

In the thursday lecture we talked about ethics in-game development. The lecture started with a discussion on what ethics means to us. This proceeded onto the  whether ethics should be considered during the game design process. The next topic was about personal ethics in a professional environment and should we be allowed to express our personal ethics into games. Then we talked about how “design is power” and how we have the moral obligation to consider ethics. We also talked about research into the coloration between kids and violent video games. Finally we talked about GTA and how it treats ethics.

Morals

In this article about ethics in games the author (who is unnamed) talks about the importance of ethics in-game development, it is based on a talk given at the GDC by Miguel Sicart. The author starts by talking about how he agrees with the concept of data mining in respect to a distributer providing game ideas for you to choose from, but he asks the question of what happens to your data? do these developers and distributors pass on your data to other sources? is this morally wrong?

 He then moves onto the topic of how a developer should see a customer. The author believes that the developer has an obligation to view them as humans rather than customers, and should strive to give them a game that encourages them to do the right thing. This in turn will help them to be the best person they can be, instead of rewarding violence and evil acts.

The final point the author touches on is crunch time, which seems as though it’s becoming a part of the industry standard. The author says that it is now basically expected for someone to work overtime in-game development whether they want to or not. The author believes that this has serious moral implications. When a person is expected to work overtime on a regular basis it can have very negative effects on their social life and physical and mental well-being.

“It harms people and therefore it harms the profession. Crunch may or may not have a negative impact on the quality of a game, but it affects developers’ mental health, family life and social relations. You have a burn rate in-game development, and that’s a long-term issue.”

A believer of ethical Values

I also came across an interesting article on gamasutra about a game developer who refused to join Zynga when they bought out his company. The author Shay Pierce was a member of omgpop games when the company was bought out by Zynga this year. Shay was offered a standard game development contract with a good salary and very good benefits. He turned down the job because he was worried that the company would take away a game that he created in his spare time. He offered the company an amended contract but they flat refused and he walked away.

Shay says in the article how would have walked away anyway because he did not agree with the way the company does things. He did not call Zynga evil directly, however he described what he thought was an evil entity and said that’s what Zynga was. He would not take a job at a large company because of his moral and ethical values.

In the end of the article Shay talks about why a person should choose a company that they would feel comfortable working for. He believes that it is very important to work for a company that is trying to provide enjoyment and not just trying to get rich fast. He believes in ethical values and choices.

My own Ethical views, Dont make me laugh

I kid, I take ethics very seriously. To date I have only made puzzles and children’s games because I prefer to stay away from games of questionable nature.That being said, I still like games where I am given the choice of being evil or not simply because of the story line. It’s not that I enjoy seeing people die or people in pain, but I like seeing a story from different angles. A game that does this very well is the Mass Effect Series. In those games you are given countless options that all have an impact on the story. So the first time I played the game as good Shepard and then I went back and played the game as bad Shepard to see the different story options.

I don’t agree with games like GTA where you have to do bad things to play the game. It’s just a personal thing, I have done a lot of research into addiction and how games can affect people and I just don’t agree with the game. I still play it and I think that as a recreational game that its great, but I could work for a company that makes games like that. Games and movies like this are just desensitizing us more and more everyday. If the sight or blood and violence doesn’t bother us anymore, when the day comes that you have a split second choice to make I worry that some people may choose the wrong option. 

Personally I prefered games like Zelda the ocarina of time. This is a game without blood and extreme violence, but it is a fantastic game that helps to develop our problem solving skills and teach us to fight for evil and respect for wemon. At least that’s what it taught me.

Some more examples include Sonic, Harvest moon, Pokemon, Mario. I could work for Nintendo.

I worked with James, Ian and Gerry on a few projects for the Nexus project manager Andrea Deverell.

The Nexus Innovation Center works with startups and entrepreneurs and tries to both challenge them and encourage growth. The center offers office space for companies to be part of an entrepreneur community which allows all the companies to learn from each other and possibly collaborate. The Nexus also offers a host of other benefits, like advice and help in securing grants from enterprise ireland.The center is run by Andrea Deverell and Gráinne Carey.

On the first day of the project we met with Andrea and Gráinne. We talked about possible projects, the things we would like to do, and the needs of the Nexus. We came up with a few ideas for projects that would allow us to utilize our skills to the maximum and help the Nexus improve their online/offline presence.

The first project we worked on was new logos for a new initiative they are doing called ‘studio to street’ and advertising campaigns. The project is about helping potential entrepreneurs to develop their product or service for a specific audience to maximise exposure and success of the product before deploying it on the market. The icons were created in Inkscape using some photos of the building for refere

We also created a link back button for the Nexus, that can be put on any of the Nexus companies’ websites. It has the Nexus logo and on click leads the user back to the Nexus website.

The third project we worked on was a landing page for the Nexus. We started this project by drawing out the layout and design for three HTML pages. The idea behind the landing page was to allow the Nexus to concisely inform visitors to the site on the work  they do. At the time the site was just a jumble of information, with no tabs for potential entrepreneurs or students.

We began by on coding up functional prototypes of the landing pages. new logo’s and designs were creating for the new pages.The webpages were made with basic HTML and we used CSS to style the layout.

 
The group met up again for a few more hours and worked on the fourth year presentation questions. We also worked up a few more prospective media campaigns for new year or the coming semester, e.g., a new entrepreneur competition. We created new logos and templates for the Nexus to use when publicising themselves or their events. We created four distinct designs.
 
 
We also got the Nexus team started on using their Twitter and Facebook accounts.
 

I learned quite a bit about teamwork and the importance of client input during this project.

  • As we team we delegated roles and responsibilities according to skill level allowing the maximum amount of work to be done.
  • Client content is very important. I think we should have gotten more content for things like the landing page before we started, because it was difficult to alter the page the content rather than design around the content. We shall not make that mistake in the future.
  • I learned loads about development tools like Inkscape for SVG manipulation.
  • I also learned quite a bit about CSS around page layout and button functionality.

All in all this project was a great experience in teamwork developing media for advertising for a professional company.

FYP: update AJAX and Website

I have decided to leave my website in its current template form and focus on implementation for the moment as I can make it look pretty when I have the project working. So the page functionality is there, I am now working on how the database will store the relevant data.

id for the primary key and username. 15 char
Password for the password. 20 char
Email for the users email address. 20 char
Game for the game number. I haven’t decided how to set what world a player is in yet, template for the moment.

I now have the login form in the webpage working. So a user enters in their login, this calls a javascript function that takes the form input text and checks to ensure it has no empty feilds. Username and Password fields. Then the function creates a HTTP connection with the server(currently my local host) and opens the login.php file, I pass the parameters in the url call because I am only sending two text values.

The PHP then removes any slashes to prevent SQL injection into the database. (Bit early for security I know but why not). It then connects to the database and checks for the username and Password. I then check the output and see if its equal to 1, if it is I know I have found the username and the password worked so I then return a welcome message. Else I return a you need to re-enter your username message. I also start a new session on the server and save the Username and set a new variable “loggedIn” to “YES” for future operations.

Back on the Javascript side I check the return text for the word “Welcome” if it contains it I remove the form and replace the login text with a welcome message. If it doesnt I know the user didnt login so I use an alert box to inform him to try again.

All this is done in the background asynchronously. (Love you AJAX)

I Think I will now add a cookie to store the users Username.

//#############################// edit

I have added cookies to the website login.

Now when you open the website it checks for a cookie, if it doesnt find one it prompts you to login(I may remove the prompt). Then when you login it creates a new cookie and reruns the check for cookie script. When this comes back as true it removes the form all in one method, so when the user logs in again if a cookie exists it removes the form and updates the screen to welcome the player.

I may a log in under another account button to the form page to reopen the form. if  I do that I will have to add a remove current “playerCookie” method so you dont have a few logins.

Cookies are set to remove when the browser closes, by default.

This week in Written games analysis we talked about Art in Games.

The first topic was about the classes personal definitions of art. Next was a comparison of common art and potential game art. Then we talked about Marcel Duchamp’s Fountain and why it is considered to be a masterpiece. The next topic was the Preliminary issues of game art such as large teams of artists. Then we talked about how art has expanded in the last few years, almost anything done well can now be considered art. The final topic was the cluster theory of art where you select a few properties inherent to a range of art works to build a rough requirements list.

On Thursday the class was enlightened by our guest speaker Silvia Benini. The lecture was a detailed account of art in general and art as form and content. Followed by the 5 purposes and the effect art has on people.

Games, Art or not?

Aaron Smuts talks about why some games should be considered art in this article. He begins by giving a brief into what he’s talking about, followed by an introduction to the games he uses as examples. Aaron talks about Max Payne, Halo and Splinter Cell and how they may not be the best looking games ever, but they achieve the goal they set out to.

“I do not claim that any of these games are great art, but they are all adept at achieving the goals they set for themselves, goals of provoking specific emotions that are typical of similar genres in other art forms.”

Next he talks about how games are sport and sport is competition so they cannot be considered art. However he argues that a poem when written is considered a work of art before it is entered into a competition (and after). Games are competitive by nature because player should side with the entity its controlling this again is supposed to disqualify games as an art form, but in Hamlet the audience is encouraged to side with Hamlet and not the killer, is Hamlet a work of art?

He then talks about chess and how it is widely regarded as an art form, but its puzzle counterparts are not because chess has a lot of ways to win and because it has two prizes. One for the winner and one for the best game.

Aaron then argues how games should at least be considered a Narrative art form since they comply with almost every major art theory.

“The art status of video games has much stronger support from representational theories of art than do other disputed art forms”

I read an article on computerandvideogames.com by Michael Gapper on how games are not art based on Roger Ebert’s articles. Roger believes that games can never be art because of quality and authorship. He argues that games require player input taking direct control away from the author, which is the opposite of the strategy of literature. The Author theory allows film makers to be considered authors allowing films to be considered as works of art.

This is why games can never be considered art, because hundreds of people contribute to a project and have created input. Also games go through extensive testing and refinement further contaminating the author pool.

What do I think?

I believe that art is not something that can be defined in any respect, art is like beauty, it is in the eye of the beholder. There are pieces of art that are worth millions like Marcel Duchamp’s Fountain that would not give ten euro for. It’s a urinal that he found on the street, he didn’t even make it. I believe that anything a person creates that requires great skill is a work of art, whether collaborative or solo. That’s my option and I’m entitled to it.

Now on the cluster theory. I think the cluster theory is a good idea, have a set of properties will allow for easier clarification of what constitutive art. I also believe that game developers should have final say on these properties because they know what makes a good game, unlike a film critic for instance.

Gaut,

1. I don’t see how anyone could disagree with his first property.
2. This is also a property I believe to be a necessity.
3. For masterpieces I would agree, but this far too ambitious to be a property for common art work(e.g achieves 1 + 2).
4. I agree that work needs to be skilful.
5. Same as 3.
6. This can only be applied to drawing and paintings, most books are not from one point of view. Watchmen is in the top ten novels ever and it is written from multiple views.
7. There is no such thing as original anymore.
8.Skill, I agree 100%.
9. I think this point more than sums up the narrow-minded view of Gaut. I believe anything can be a work of art to say otherwise is beyond foolish since 600 years ago only painting was considered art, to try and define a list now of art forms when the definition of art forms has changed so much in recent years is foolish.
10.This is also very arguable, something that might start out as an activity to pass time can turn into a masterpiece. Does Gaut really think that Shakespeare wrote his masterpieces in one go?

Side note

I found this quote and thought it was brilliant.

“Was playin Mario Galaxy 2 yesterday, then Dark Souls last night. Can’t think of 2 games which purely embrace the video game medium more. Neither makes concessions to another medium, like films or TV. They take everything unique about video games and run with it. Neither could ever be a film and retain their unique qualities, they are video gaming in its purest form and for this reason they are their own art form and so utterly briliant”

 

FYP: update Website and game design

Last week I created my game design doc.

I have decided on all of the game fundamentals. I have finalised a design for a grid based game over an open map because I plan to add in a map editor, so having the map in a grid format will make both the game implementation and map editing easier.

I have written up a design doc for all of the games map icons and units that will be in the game. I have decided to have ground, air and sea units. Players will battle for resource points around the map, and attacks on bases will be kept rare by giving them a huge defence from the beginning of the game to keep players who have been in the game a while from killing them early on.

I still have to decide on database elements and the class structure.

Website

This week  I created a draft for my website design and layout. I built the basic frame with html. I then created the main menu using the table element. I also created a simple div for the main body of the content for the site. I then customised these element with my external css file. I am following the basics of UI design. Nothing will be more than 2 clicks away and the layout will flow from top to bottom, with colours that are easy on the eyes.

I positioned all my elements with the % rather than xp or absolute positions so the page can resize nicely and keep scale when someone  makes their browser smaller or larger.

I got an Icon for my game from the Icon archive, the licence for the icon is free so no copyright problems.

End Product, not bad for my first attempt I think.

 

Addiction: South Korea

It is estimated that at least 8% of the population of south Korea is addicted to gaming. Now you might say to yourself are they not just exaggerating things a bit. That was my first reaction aswell but after doing some digging what I found is rather disturbing.

One example is in march 2010 a couple let their baby starve to death because they were so immersed in an online virtual world. Some people feel like they are trapped in the games they play. “I feel sad all the time, I think about killing myself” this is a statement made by one addict in this CNN report on games.

Another addition to the problem is that in south Korea people can become famous by playing games and make six figure salaries, this effect on the society makes playing games an integral part of daily life and is not seen as a waste of time as it is in the western world. Some young adults play games for 18 – 19 hours a day training for the world series in Starcraft and this is considered a good use of your time in Korea. This lead the relaxed view on social gaming, that is now a very big problem. One young adult who is not even considered as one of the world’s top players still makes over $100K a year.

Korean doctors believe the symptoms of gaming addiction they see on a daily basis is very similar to that of alcohol and drug addiction. They use 3D virtual reality to treat the addiction, they also use it in treating alcohol addiction. The treatment is very simple. first the addict plays the game, they are given time to hear the music and get immersed in the game, then they are presented with uncomfortable situations that will then be associated with the game, so they wont want to play it anymore.

They believe this is only happening in Korea for a few reasons. One is because Korea has the fastest high-speed internet access in the world. Two is because of the class society Korea has, if you do bad in school or have a bad job then you are looked down on in society, so many children try to escape into a virtual world where their choices or circumstances in the real worlds have no effect.

Some people believe that this phenomenon will soon start spreading to the rest of the world as our technology catches up to that of Korea. One example is of a man in the USA who played Diablo 3 for the three days straight and died of dehydration.

Here are Han’s top 5 warning signs of gaming or Internet addiction:

1. Disrupted regular life pattern. If a person plays games all night long and sleeps in the daytime, that can be a warning he or she should seek professional help.

2. If the potential gaming or Internet addict loses his or her job, or stops going to school in order to be online or to play a digital game.

3. Need for a bigger fix. Does the gamer have to play for longer and longer periods in order to get the same level of enjoyment from the game?

4. Withdrawal. Some Internet and gaming addicts become irritable or anxious when they disconnect, or when they are forced to do so.

5. Cravings. Some Internet and gaming addicts experience cravings, or the need to play the game or be online when they are away from the digital world.

I read the Post by Erin Hoffman on gamasutra and found it very engaging and interesting.

She starts by talking about how addiction is not addresses in the game development world like it should be, game developers try to create addictive gameplay do not consider the effect the game can have on a person. Bejeweled Blitz, is a game she goes into detail about. She believes that the game swept through Facebook because of the simplistic gameplay which had only three elements.

 “1. The game is simple to understand; two clicks and you’re in.
2. The game presents a clear problem with a clear solution (make rows of 3+ jewels).
3. The results of action frequently create cascading consequences.
3a. These cascading consequences have an element of randomness / unpredictability / intermittent reward.”
.

She believe that it is because of these simple elements that make the game so addictive. Not addictive in the way playing a MMO where you are the leader of a guild but addictive in the sense that the game is easy to play and easy to get a sense of achievement from. It does this by having little consequence for failures and the gameplay requires only cognitive thinking, leaving out judgement, social or ethics allowing the play to be easily emerged.   Which leads onto the different types of addictions.

The Author then says how she felt the drive to keep playing the game but she was pulled away because she wanted to continue her work. So addiction is specific to the individual. She believe that any activity can become addictive biased on your situation. Some people play the game to hide from anxiety or stress because a game like bejeweled is easy to play and there is no stress involved. Others play simply to avoid a task they are putting off, something they are “supposed to be doing”.

She then goes into detail about “supposed to” in our society, if someone is happier playing at alliance commander in LON over watching security screens all day, then who in society has the right to judge them? Why is this considered a waste of time? Most would argue because the world would not be productive and we would all be lazy. Well maybe lazy and happy is better than working and depressed and stressed.

This is why merely resisting addiction of any kind is not enough. This is why — although some activities are more broadly compelling than others — virtually any activity can become an addiction. What addictive behaviour does is reveal underlying anxiety (and often depression, which itself is nebulous) and lack of desire to perform the things we’re “supposed to” be doing.

The final topic touched upon is how real addiction should be addressed. Experienced counsellors believe that in order for a person to change their behaviour they must want to change, then by discovering the underlining problem in someone’s life and addressing this problem the addiction can be replaced with a healthier long-term solution than the addiction provides, as opposed to just curing the addiction but going cold turkey.

Finally she adds in a personal note about how she avoided going to school you play a game in the past. She feels games are not a waste of time for her but a comfort not a danger. This is something I can relate too, I grew up on a farm I played a lot of games. I would venture to say I have spent more time playing and making games than I have working either on the farm or at school. I always fought education, all I could ever think about in school or on the farm was a game I would play later and that always sustained me.

So I decided that taking a career path that involved games was probably a good idea.

 

Why I love books

I love books because I believe that books are more than just a story. A few hundreds years from now any trace of us will be gone and all that will remain is stories and history, words on paper or a computer screen. So how is a fantasy book written about another world any less real that the history of our ancestors. Books give life to thinks that may never be but in doing so have made them possible.

I imagine you know more about the life of Harry Potter that you do Henry the eighth. Does it matter if Harry Potter never really existed, this fictional character has an impact in peoples lives, invoked emotions other people invoke you.

When some characters die in A song for fire and Ice It felt like someone I knew had died. That’s the power of a good book.

Tadhg O'Flaherty

Games Developer

You can always count on a murderer...

for a fancy prose style - H.H.

Some general vizardry

A novice programmer's musings

Leah Barbour

Student by day, superhero by night! Minus the spandex of course...

LukesDevBlog

Gravity-It's not just a good idea, it's the LAW!

Player Two

Ludology from a developer

wi11iamcb

The quite mutterings of a madman

A penny for your thoughts, is quite expensive.

Humming fridges are people too.

James Heslin: A Lot On My Mind

Here I am, in various contexts

Not Your Blog

Let's go in there and take out that dragon!