• Like
Kartik Necro-wars Project Report
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

Kartik Necro-wars Project Report

  • 314 views
Published

6-weeks project report …

6-weeks project report

  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to like this
No Downloads

Views

Total Views
314
On SlideShare
0
From Embeds
0
Number of Embeds
0

Actions

Shares
Downloads
1
Comments
1
Likes
0

Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide

Transcript

  • 1. Necro-Wars 1 | P a g e Submitted by: Kartik Arora PROJECT REPORT ( SIX WEEK TRAINING ) Necro-Wars (a social network game) Submitted by Kartik Arora Roll No 101103044 Trained at Keptbug Technologies, Noida Department Of Computer Science and Engineering THAPAR UNIVERSITY, PATIALA (Deemed University)
  • 2. Necro-Wars 2 | P a g e Submitted by: Kartik Arora DECLARATION I hereby declare that the project work entitled “Necro-wars” is an authentic record of my own work carried out at Keptbug Technologies, Noida as requirements of 6-week summer training for the award of degree of B.E. (Computer Science & Engineering), Thapar University, Patiala. (Signature of student) Kartik Arora 101103044 Date: ___________________
  • 3. Necro-Wars 3 | P a g e Submitted by: Kartik Arora ACKNOWLEDGEMENT I take this opportunity to express my profound gratitude and deep regards to my guide Dr. Maninder Singh for his exemplary guidance, monitoring and constant encouragement. The blessing, help and guidance given by him time to time shall carry me a long way in the journey of life on which I am about to embark. I also take this opportunity to express a deep sense of gratitude to Mr. Vivek, Java Developer, KeptBug Technologies, for his cordial support, valuable information and guidance, which helped me in completing this task through various stages. I am obliged to staff members of KeptBug Technologies, for the valuable information provided by them in their respective fields. I am grateful for their cooperation during the period of my assignment. Lastly, I thank almighty, my parents and my brother, sisters and friends for their constant encouragement without which this project would not be possible.
  • 4. Necro-Wars 4 | P a g e Submitted by: Kartik Arora Table of Contents INTRODUCTION .............................................................................................................6 INTRODUCTION TO PROGRAMMING ENVIRONMENT .....................................7 ORACLE 10G .................................................................................................................................................. 7 SERVLET ........................................................................................................................................................ 8 JSP ............................................................................................................................................................... 9 JDBC............................................................................................................................................................ 9 NET BEANS .................................................................................................................................................. 10 Net Beans Platform.............................................................................................................................. 10 SYSTEM REQUIREMENTS.........................................................................................11 HARDWARE REQUIREMENTS............................................................................................................................ 11 SOFTWARE REQUIREMENTS ............................................................................................................................ 11 OVERVIEW OF NECRO-WARS .................................................................................12 SOFTWARE GAME ENGINE................................................................................................................................ 12 GAME DESCRIPTION ....................................................................................................................................... 13 PLAYER BOOSTS ............................................................................................................................................. 13 ITEMS.......................................................................................................................................................... 14 USER MANUAL..............................................................................................................16 BATTLE BAR .................................................................................................................................................. 16 INVENTORY................................................................................................................................................... 16 LOGIN.......................................................................................................................................................... 17 REGISTER ..................................................................................................................................................... 18 THE BOARD................................................................................................................................................... 19 THE SHOP..................................................................................................................................................... 20 LEADER BOARD.............................................................................................................................................. 21 PROJECT DESIGN ........................................................................................................22 CONTEXT FLOW DIAGRAM .............................................................................................................................. 22 DFD LEVEL-1................................................................................................................................................ 22 SEQUENCE DIAGRAM ...................................................................................................................................... 23 ACTIVITY DIAGRAM......................................................................................................................................... 24 STATE DIAGRAM ............................................................................................................................................ 25 CLASS DIAGRAM ............................................................................................................................................ 26 ER DIAGRAM................................................................................................................................................. 27 USE-CASE DIAGRAM ....................................................................................................................................... 28 DECISION TREE .............................................................................................................................................. 29 WORK PROGRAM ........................................................................................................30 TEST CASES ...................................................................................................................31 LESSON LEARNT..........................................................................................................33 FUTURE SCOPE OF THE PROJECT.........................................................................34 REFERENCES ................................................................................................................35
  • 5. Necro-Wars 5 | P a g e Submitted by: Kartik Arora
  • 6. Necro-Wars 6 | P a g e Submitted by: Kartik Arora Introduction This report describes the process involved in making a simple social network game with Java. Using jsp pages, sql database along with Java, I created Web based game where the players fight other players to gain rewards and strength in the game. This report discusses the game overview, including the description and game mechanics, and then focuses on the game design, describing how the game is implemented and the programming functions and Technologies used in the design. The Necro-Wars is an online game implemented as a browser game. Some of the distinct features of this genre of games are: Asynchronous Gameplay This allows rules to be resolved without needing players to play at the same time. Community Some quests or goals may only be possible if player „shares‟ his game with friends as allies. No Victory Condition The game never ends and no one is ever declared "winner". Virtual Currency Social network games use "virtual currency", which players usually must purchase with real-world money. With the in-game currency players can buy upgrades that would otherwise take much longer to earn through in-game achievements.
  • 7. Necro-Wars 7 | P a g e Submitted by: Kartik Arora INTRODUCTION TO PROGRAMMING ENVIRONMENT Oracle 10g The Oracle Database (commonly referred to as Oracle RDBMS or simply as Oracle) is an object- relational database management system produced and marketed by Oracle Corporation. Oracle is a database Management system used to create and alter databases. A database defines a structure for storing information. In a database, there are tables. Just like Swings tables, database tables contain rows, columns, and cells. Databases are useful when storing information categorically. My application has database with the many tables like "Players", "Battle”, etc. One great thing about Oracle is that it can be used to support web based database applications.
  • 8. Necro-Wars 8 | P a g e Submitted by: Kartik Arora Java Servlet The servlet is a Java programming language class used to extend the capabilities of a server. Although servlets can respond to any types of requests, they are commonly used to extend the applications hosted by web servers, so they can be thought of as Java Applets that run on servers instead of in web browsers. These kinds of servlets are the Java counterpart to other dynamic web content technologies such as PHP and ASP.NET. Servlets are most often used to:  Process or store data that was submitted from an HTML form  Provide dynamic content such as the results of a database query  Manage state information that does not exist in the stateless HTTP protocol, such as filling the articles into the shopping cart of the appropriate customer Technically speaking, a "servlet" is a Java class in Java EE that conforms to the Java Servlet API, a protocol by which a Java class may respond to requests. Servlets could in principle communicate over any server protocol, but they are most often used with the HTTP protocol. Thus "servlet" is often used as shorthand for "HTTP servlet". Thus, a software developer may use a servlet to add dynamic content to a web server using the Java platform. The generated content is commonly HTML, but may be other data such as XML. Servlets can maintain state in session variables across many server transactions by using HTTP cookies, or URL rewriting.
  • 9. Necro-Wars 9 | P a g e Submitted by: Kartik Arora JavaServer Pages (JSP) JavaServer Pages (JSP) is a technology that helps software developers create dynamically generated Web pages based on HTML, XML, or other document types. Released in 1999 by Sun Microsystems, JSP is similar to PHP, but it uses the Java programming language. To deploy and run JavaServer Pages, a complete Web server with a servlet container, such as Apache Tomcat or Jetty, is required. Architecturally, JSP may be viewed as a high-level abstraction of Java servlets. JSPs are translated into servlets at runtime; each JSP's servlet is cached and re-used until the original JSP is modified. JSP can be used independently or as the view component of a server-side model–view– controller design, normally with JavaBeans as the model and Java servlets (or a framework such as Apache Struts) as the controller. This is a type of Model 2 architecture. JSP allows Java code and certain pre-defined actions to be interleaved with static we markup content, with the resulting page being compiled and executed on the server to deliver a document. The compiled pages, as Ill as any dependent Java libraries, use Java bytecode rather than a native software format. Like any other Java program, they must be executed within a Java virtual machine (JVM) that integrates with the server's host operating system to provide an abstract platform-neutral environment. JSPs are usually used to deliver HTML and XML documents, but through the use of OutputStream, they can deliver other types of data as Ill. The Web container creates JSP implicit objects like pageContext, servletContext, session, request & response. Java Database Connectivity (JDBC) JDBC stands for "Java Database Connectivity". It is an API (Application Programming Interface) which consists of a set of Java classes, interfaces and exceptions and a specification to which both JDBC driver vendors and JDBC developers adhere when developing applications. The JDBC API is a Java API that can access any kind of tabular data, especially data stored in a Relational Database.
  • 10. Necro-Wars 10 | P a g e Submitted by: Kartik Arora NETBEANS NetBeans is an integrated development environment (IDE) for developing primarily with Java, but also with other languages, in particular PHP, C/C++, and HTML5. It is also an application platform framework for Java desktop applications and others. The NetBeans IDE is written in Java and can run on Windows, OS X, Linux, Solaris and other platforms supporting a compatible JVM. The NetBeans Platform allows applications to be developed from a set of modular software components called modules. Applications based on the NetBeans Platform (including the NetBeans IDE itself) can be extended by third party developers. The NetBeans Platform is a reusable framework for simplifying the development of Java Swing desktop applications. The NetBeans IDE bundle for Java SE contains what is needed to start developing NetBeans plugins and NetBeans Platform based applications; no additional SDK is required. Applications can install modules dynamically. Any application can include the Update Center module to allow users of the application to download digitally signed upgrades and new features directly into the running application. Reinstalling an upgrade or a new release does not force users to download the entire application again. NET BEANS PLATFORM The platform offers reusable services common to desktop applications, allowing developers to focus on the logic specific to their application. Among the features of the platform are:  User interface management (e.g. menus and toolbars)  Storage management (saving and loading any kind of data)  Window management  Wizard framework (supports step-by-step dialogs) NetBeans IDE is a free, open-source, cross-platform IDE with built-in-support for Java Programming Language.
  • 11. Necro-Wars 11 | P a g e Submitted by: Kartik Arora System Requirements HARDWARE: Processor Pentium 4 and above Clock speed 800 MHz and above RAM 128mb and above Keyboard 104 keys Mouse SOFTWARE: Operating System Window 98 and higher version or linux or mac os Tools JDK Front end Java/Jsp Backend Oracle 10g Development S/W NetBeans
  • 12. Necro-Wars 12 | P a g e Submitted by: Kartik Arora Overview of Necro-Wars The Primary objective of the game is to beat other players in simulated battle. The player gains xp (experience points) and coins (as rewards) during the course of the game. The Player can use these coins to upgrade himself into a better gear for future battles. The game has Public Player Statistics i.e. Information regarding players‟ game instances are publicly available. Massively Single-Player Online Games Software/Game Engine: The Battle logic is coded in Java. When a battle starts, two instances of the class Player are initialized based on the preferences of the user and his enemy. Then these two instances run in a time-sharing environment and try defeating the other. The threads are at regular interval put to sleep for a small randomly generated time period so that both of the Player instances are equally win. There is also a feature of potion. The players fighting, at regular intervals inflicted with potion effects. The user can improve the odds of getting this potion effect by buying extra potions from the Shop.
  • 13. Necro-Wars 13 | P a g e Submitted by: Kartik Arora Game Description In the Game, the user creates a player and then chooses to battle with various other players registered on the server. Based on the battle, the winning Player is awarded some coins as a reward. These coins are the currency to buy various upgrades for the Player from the Shop. The Shop sells Armor, Weapons and Potions to the Player. These items increase the odds of the player winning in a battle. Player Boosts 1. XHEALTH Boosts the damage resistance of a Player. 2. XDAMAGE Boosts the amount of damage a Player can inflict in a single attack. 3. XPOTIONS Boots the frequency in which Player uses healing potions.
  • 14. Necro-Wars 14 | P a g e Submitted by: Kartik Arora Items 1. Iron Chestplate 2. Iron Helmet 3. Iron Boots 4. Leggings Effect :10 Extra Health Cost : 5 coins Effect :5 Extra Health Cost : 2 coins Effect :5 Extra Health Cost : 2 coins Effect :10 Extra Health Cost : 4 coins
  • 15. Necro-Wars 15 | P a g e Submitted by: Kartik Arora 5. Sword 6. Potion Bottle Effect :5 Extra Damage Cost : 10 coins Effect :5 Extra Potions Cost : 10 coins
  • 16. Necro-Wars 16 | P a g e Submitted by: Kartik Arora User Manual Battle Bar It is displays your player ID and the number of coins you have. And also here you select a player you want to fight and press the Battle button to begin the simulation. Inventory It displays you current armor and Weapons.
  • 17. Necro-Wars 17 | P a g e Submitted by: Kartik Arora Login Page
  • 18. Necro-Wars 18 | P a g e Submitted by: Kartik Arora Register Page
  • 19. Necro-Wars 19 | P a g e Submitted by: Kartik Arora Board Page
  • 20. Necro-Wars 20 | P a g e Submitted by: Kartik Arora The Shop The Shop also sells armor and weapons which are very useful for the Player. Extra armor increases the Base health at which the player spawns at and Weapon will increase the damage a player can deal in a single stroke. The players earn credits based on their performance in a battle. These credits are then used as currency in the Shop. The shop interface is implemented using jsp pages and the sale of a product are a result of few sql queries which update the player instance depending on the equipment bought.
  • 21. Necro-Wars 21 | P a g e Submitted by: Kartik Arora Leader Board
  • 22. Necro-Wars 22 | P a g e Submitted by: Kartik Arora Project Design DFD Level 0 (Context Flow Diagram) DFD Level 1
  • 23. Necro-Wars 23 | P a g e Submitted by: Kartik Arora Sequence Diagram
  • 24. Necro-Wars 24 | P a g e Submitted by: Kartik Arora Activity Diagram
  • 25. Necro-Wars 25 | P a g e Submitted by: Kartik Arora State Diagram
  • 26. Necro-Wars 26 | P a g e Submitted by: Kartik Arora Class Diagram
  • 27. Necro-Wars 27 | P a g e Submitted by: Kartik Arora ER Diagram
  • 28. Necro-Wars 28 | P a g e Submitted by: Kartik Arora Use-Case Diagram
  • 29. Necro-Wars 29 | P a g e Submitted by: Kartik Arora Decision Tree
  • 30. Necro-Wars 30 | P a g e Submitted by: Kartik Arora Details of work including work program Week 1: Revision of Object Oriented Programming technologies. Functions and constants of C++. Introduction to java Principles such as Abstraction, Encapsulation, Polymorphism Week 2: Keywords of java(Final,Static etc) Introduction to inheritance in Java. Week 3: Interfaces In java Concept of inner classes Packages MultiThreading in Java Week 4: Strings Servlets Week 5: I/O streams in Java Exception handling JDBC JSP
  • 31. Necro-Wars 31 | P a g e Submitted by: Kartik Arora Test Cases If login info incorrect/empty on the Login Page.
  • 32. Necro-Wars 32 | P a g e Submitted by: Kartik Arora If User does not have Sufficient Coins to complete the purchase. If user already has the item he has opted to purchase.
  • 33. Necro-Wars 33 | P a g e Submitted by: Kartik Arora Lessons Learned Written Portion/Design: I learned that it is best to start the proposal and design stages early on so as to hammer out a project design that would allow for completion before the deadline. Additionally, I have found that stating specific parameters during the design phase makes the actual development far more routine and mechanical. Certain areas of our project were ambiguously defined, thus I had to spend extra time during development to hammer out aspects that should‟ve been specified during the design phase. Programming Portion/Software: I learned that it is best to plan out sub-modular components of the game-engine in detail before actually beginning to code. Although these segments of code serve fairly trivial functions, such as score-keeping, they did take a disproportionate amount of time to implement due to insufficient prior planning. Although these small segments of code usually do not fall under the design document, I recommend that smaller non-critical features should nevertheless be thought out during the beginning of the implementation phase, prior to actual coding. User customization of game parameters, though not originally part of the design document, nevertheless proved extremely helpful in the testing stage. The user customization code, allows for a very quick and simple means of changing the parameters of the game without actually changing any of the game code.
  • 34. Necro-Wars 34 | P a g e Submitted by: Kartik Arora Future Scope of the Project Incorporating a clan/team battles. Many more weapons, armor and potion to be incorporated. Including chat facility within the game to increase interaction among players. Including random drop system during battle. Armor and weapons to have durability. Item in shop to have minimum level requirement along with coins. Adding Virtual currency.
  • 35. Necro-Wars 35 | P a g e Submitted by: Kartik Arora References The following resources have been used to fulfill the requirements of the proposed project and are helpful in the understanding, development and the maintenance of the project: google.com http://en.wikipedia.org/wiki/Social_network_game http://stackoverflow.com Websites Visited: www.javatpoint.com www.w3schools.com www.corejavaprogrammers.com www.javaguru.com www.javaexamples.com