Java-Gaming.org Hi !
Featured games (90)
games approved by the League of Dukes
Games in Showcase (741)
Games in Android Showcase (225)
games submitted by our members
Games in WIP (823)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  Project Freeman: a remake of Risk  (Read 3703 times)
0 Members and 1 Guest are viewing this topic.
Offline wreed12345

JGO Knight


Medals: 28
Projects: 3
Exp: 5 years


https://github.com/wreed12345


« Posted 2016-05-24 21:18:14 »

Project Freeman

Overview
Project Freeman began as a game meant to be a spin off of the board game Risk. The name Project Freeman was meant to be a code name before an actual name existed. I was the sole developer for the game writing all code involved, while my friend James wrote much of the plans, and my friend Dylan did the artwork. Basically each player would join a game and start with ownership of a single country, and their objective would be to become more powerful than the other empires and overthrow them. This could be done through different attacking methods, boosting your own economy and through other methods all with the purpose of obtaining supreme power. Players have the option of joining many games that are in progress where they can send messages to each other in game, and interact by the actual game play. I made this game a few years back but never completed it as the actual planning of the gameplay just seemed to be a mess and I never got back into it with my friends. I used libgdx for the game as well for both the launcher and the game. Scene2D was used for the UI in both launcher and game. Since it is not truly finished I offer no download links but feel free to download and compile the source code from the link below.
Source Code: https://goo.gl/NqBHQb

<a href="http://www.youtube.com/v/AW9YG33X6Qs?version=3&amp;hl=en_US&amp;start=" target="_blank">http://www.youtube.com/v/AW9YG33X6Qs?version=3&amp;hl=en_US&amp;start=</a>

Backend
The powerful software allowing the whole game to operate was the server. It operated with the help of the Java networking library KryoNet which allowed data to be sent to and from the client and server. The server served as an account validator / creator, the central point hosting all games and transmitting new events from each game, and to autosave players accounts and game data. Per client request it could transmit game information, list games that are available to join, and broadcast chat messages. It was the linking point for all clients that would play the game. The server could even send out text messages if an error occurred notifying me or my friends to fix it. (Example console log shown later in this portfolio)
Commands
Within the server console, there were a variety of commands that allowed server usage to be more functional. These included: ‘get password <username>’, ‘game id <game name>’, game stop <game id>’, ‘server info’, ‘stop’, ‘delete account <username>’, ‘ban username <username> <reason>’, ‘ban ip <ip address> <reason>’, ‘save’, ‘help’, and ‘create account <username> <password>’. These simple commands increased the functionality of the server and allowed it to edit account or game data without having to create an entire new game or player account. The effect of each command should be generally self explanatory.
Saving
Periodically the server was setup to automatically save all game data, and update all user files. This was done on a separate thread rather than the main server thread as to not disrupt transmission of crucial game data. This was done through Java Serialization. It allowed for an easy data saving format which could be saved and opened very simply through native Java features. Although this is a very simple way to save data, the files that are created cannot be edited by opening them through a text editor which makes the commands that were implemented very practical in editing saved data.

Possible commands as they appear in the code


Networking
The most important aspect of the server was its ability to transmit data. Through the help of the lightweight Java networking library called KryoNet this task was accomplished. KryoNet allows for a simple way to send TCP / UDP data to a multitude of clients. It could update clients as a new game event occurred such as a new weapon in game being bought or a new in game chat message being transmitted. Sensitive information such as account passwords were sent encrypted with the help of a Blowfish Cipher.
Error Notifications
If an exception was thrown on the server or some other error occurred, it had the ability to send out a text message to myself and my friends telling us that something was wrong along with a simplified version of the error.

Launcher
The Launcher for Project Freeman was a piece of software that allowed users to create accounts, view the change log for the most recent update, automatically download the most recent game version, view the twitter feed from the Project Freeman twitter, and log in to play the game. (Pictured later in this portfolio)
Account Management
The launcher allows users to log in and create an account. All account usernames and passwords were limited to containing certain characters. Upon logging in or creating an account, all data was encrypted before being sent.
Information Display
In addition to displaying the account management portion, other information is also present. On the right side of the launcher, you can see both a twitter feed from the Project Freeman twitter account and the change log for the most recent version which is accessed from some files stored on Github used as a file server.
Auto updater
As the launcher is opened it checks to ensure that the user has the most recent version of the game. It does this by accessing some files hosted on a Github server. If the user does not have the most recent version, it downloads the most recent version from this server and replaces the older version with the updated one. It shows a status of the download percentage as the download occurs. After downloading the new updated game can be played without any messy user dependant updating.



The Game
Project Freeman was created with the huge help of the multi platform Java based gaming engine, LibGDX. LibGDX allowed me as a developer to focus more on the user side of the game rather than handling graphics and interacting with the graphics card at a lower level. After logging in through the launcher another .JAR file was opened which contained the game. It began with a loading screen which loaded all necessary assets followed by a menu screen where players could join a game. They were then brought into the magic that was Project Freeman. (Pictured later)
Loading Screen
Instead of loading assets on the fly, for the most part assets are loaded upon initial deployment of the game. This allows for uninterrupted transitions between screens upon beginning actual gameplay.
In Game Screen
The in game screen was the most important aspect of Project Freeman. It allowed users to become immersed in the actual game. On this screen was a chat box for talking to other players in game, a list of players in your current game, and an event box which would display updates such as when another country purchased weapons or when an empire was gaining strength. Everything occurred in real time, as one person somewhere else in the world placed a new weapons system on their empire, you would see it as soon as it was placed, on your own screen. This is what allowed the idea of the game of Risk to be brought to a computer.
Menu Screen
The menu screen allowed users to join a game. On the menu screen was a list of games that were available to join along with the options of joining a random game or creating their own game.




Conclusion
This game served as a coding project unlike any other. It allowed me to collaborate with some friends on a common goal and still be the sole coder of the project, which was something that I enjoyed. I came out of this coding project knowing way more than I began with which made the project as a whole successful in my eyes. It also gave me a taste of what a career in this field would be like and I think that this game, along with many other projects I have worked on, are the reason I want to major in Computer Science so strongly. This project specifically combined almost all the aspects of my knowledge in Java and programming as a whole. The biggest part of the project for me was not what I knew but what I did not know. It became a constant quest of learning about new aspects of computer science - it was a quest of understanding rather than copying and pasting. New topics learned through this project included multi threading, networking, interacting and hosting with a server, managing a larger coding project, sockets, encryption, and serialization. All these topics were taught to myself through online videos, websites, and books. No formal courses helped me with the knowledge needed to create this game. Despite this hard work the game fluttered off after most of the support structure of it was developed, largely due to poor game design that created flaws in the actual fun in the game. All in all it was an experience I will never forget and I believe it will greatly aid me moving forward. Be sure to check out the source code for the full effect of everything described: https://goo.gl/NqBHQb !

Offline Gornova
« Reply #1 - Posted 2016-05-26 09:28:21 »

Hi!
I'm interested in your project because I've always thinking about a risk or tabletop games, so I have few questions:

1) I see a nice map, there is an editor / tutorial to change it ? And also there is a way to define nations borders ? If I understand correctly you are simple using colors, right ?
2) did you tried to add some sort of AI ?
3) what kind of license for code and art have this project ? It's free software?
4) do you have an UML diagram or some sort of scheme for projects dependencies and "main loop" otherwise is hard to understand well what's happening and where Cheesy
5) about the map, there is a data structure behind it ? For example in first screenshoot "Agricia" have border only with Anglum, do you have planned unit movements using also this information ?

thanks!

Blog | Last game A droid story
Offline wreed12345

JGO Knight


Medals: 28
Projects: 3
Exp: 5 years


https://github.com/wreed12345


« Reply #2 - Posted 2016-05-26 14:45:39 »

Hi!
I'm interested in your project because I've always thinking about a risk or tabletop games, so I have few questions:

1) I see a nice map, there is an editor / tutorial to change it ? And also there is a way to define nations borders ? If I understand correctly you are simple using colors, right ?
2) did you tried to add some sort of AI ?
3) what kind of license for code and art have this project ? It's free software?
4) do you have an UML diagram or some sort of scheme for projects dependencies and "main loop" otherwise is hard to understand well what's happening and where Cheesy
5) about the map, there is a data structure behind it ? For example in first screenshoot "Agricia" have border only with Anglum, do you have planned unit movements using also this information ?

thanks!

It has been a few years since I worked on this project but I will answer these questions to the best of my knowledge.
1. The map was made entirely in photoshop so no map editor exists to change it, it is actually a large image that is loaded which may not have been the best idea but that is how it turned out. I am not sure that a tile system would have been applicable here. You are correct in understanding that nation borders are defined by colors (which is in another image the same size as the map.).
2. If I went further with the game I may have eventually implemented some type of AI but as is there is not currently any AI in place.
3. I have not yet determined what license that I want to release the game under
4. I do not have any UML diagrams for the game. I would be glad to explain anything however
5. I never got to the point in the game where I would implement unit movements based off of that type of information so the answer is no. If I returned to development of this game I may have added those things but as it stands right now, no

I think this game had a lot of potential but I never really did anything with it in terms of game play. Please feel free to contribute to the game and continue to ask for help if anything is vague about the project.

Pages: [1]
  ignore  |  Print  
 
 

 
xxMrPHDxx (12 views)
2017-11-21 16:21:00

xxMrPHDxx (10 views)
2017-11-21 16:14:31

xxMrPHDxx (10 views)
2017-11-21 16:10:57

Ecumene (113 views)
2017-09-30 02:57:34

theagentd (148 views)
2017-09-26 18:23:31

cybrmynd (246 views)
2017-08-02 12:28:51

cybrmynd (242 views)
2017-08-02 12:19:43

cybrmynd (242 views)
2017-08-02 12:18:09

Sralse (257 views)
2017-07-25 17:13:48

Archive (875 views)
2017-04-27 17:45:51
List of Learning Resources
by elect
2017-03-13 14:05:44

List of Learning Resources
by elect
2017-03-13 14:04:45

SF/X Libraries
by philfrei
2017-03-02 08:45:19

SF/X Libraries
by philfrei
2017-03-02 08:44:05

SF/X Libraries
by SkyAphid
2017-03-02 06:38:56

SF/X Libraries
by SkyAphid
2017-03-02 06:38:32

SF/X Libraries
by SkyAphid
2017-03-02 06:38:05

SF/X Libraries
by SkyAphid
2017-03-02 06:37:51
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!