Jump to content
  • Advertisement

Search the Community

Showing results for tags 'Java'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Categories

  • Audio
    • Music and Sound FX
  • Business
    • Business and Law
    • Career Development
    • Production and Management
  • Game Design
    • Game Design and Theory
    • Writing for Games
    • UX for Games
  • Industry
    • Interviews
    • Event Coverage
  • Programming
    • Artificial Intelligence
    • General and Gameplay Programming
    • Graphics and GPU Programming
    • Engines and Middleware
    • Math and Physics
    • Networking and Multiplayer
  • Visual Arts
  • Archive

Categories

  • Audio
  • Visual Arts
  • Programming
  • Writing

Categories

  • Game Dev Loadout
  • Game Dev Unchained

Categories

  • Game Developers Conference
    • GDC 2017
    • GDC 2018
  • Power-Up Digital Games Conference
    • PDGC I: Words of Wisdom
    • PDGC II: The Devs Strike Back
    • PDGC III: Syntax Error

Forums

  • Audio
    • Music and Sound FX
  • Business
    • Games Career Development
    • Production and Management
    • Games Business and Law
  • Game Design
    • Game Design and Theory
    • Writing for Games
  • Programming
    • Artificial Intelligence
    • Engines and Middleware
    • General and Gameplay Programming
    • Graphics and GPU Programming
    • Math and Physics
    • Networking and Multiplayer
  • Visual Arts
    • 2D and 3D Art
    • Critique and Feedback
  • Community
    • GameDev Challenges
    • GDNet+ Member Forum
    • GDNet Lounge
    • GDNet Comments, Suggestions, and Ideas
    • Coding Horrors
    • Your Announcements
    • Hobby Project Classifieds
    • Indie Showcase
    • Article Writing
  • Affiliates
    • NeHe Productions
    • AngelCode
  • Topical
    • Virtual and Augmented Reality
    • News
  • Workshops
    • C# Workshop
    • CPP Workshop
    • Freehand Drawing Workshop
    • Hands-On Interactive Game Development
    • SICP Workshop
    • XNA 4.0 Workshop
  • Archive
    • Topical
    • Affiliates
    • Contests
    • Technical
  • GameDev Challenges's Topics
  • For Beginners's Forum

Calendars

  • Community Calendar
  • Games Industry Events
  • Game Jams
  • GameDev Challenges's Schedule

Blogs

There are no results to display.

There are no results to display.

Product Groups

  • Advertisements
  • GameDev Gear

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


About Me


Website


Role


Twitter


Github


Twitch


Steam

Found 121 results

  1. I need some advice on how to display moving animations with a tiled based RPG. I'm using libGDX as the UI frame work. So for the animations do I draw the actor of the solider enemy or other moving thing image once per draw call in th render method and change frames each draw call and slowly move it from tile tile to tile? or slowly move it from tile to tile during a single draw call and render loop pass and change frames in a single for loop? Using the former I can see problems with 2 objects trying occupying the same tile and the latter doesn't make much sense. I want some actors to be faster than others so they can out run them, would not using tile based movement be better and just forget on / off tiles for the living actors that move?
  2. jakethesnake

    Songs of Syx

    Hello. This is what I've been working on the past 5 years, using java and opengl. It's what I call a city-state simulator, where you build a city and conquer others. Its like Caesar II with a touch of Rome Total war. I've got a trailer here: youtube I've got me some social promotion: twitter And a webpage I'd love to hear what someone else thinks. Would you want to play this? Be harsh!
  3. I have a project with a bunch of different .java files. Is there a way for me to organize them in eclipse while still allowing them to access each other? If I split the project in different folders, Eclipse can't find the different files when they're called in a different file.
  4. Context I recently started reading the book Artificial Intelligence for Humans, Volume 1: Fundamental Algorithms by Jeff Heaton. Upon finishing reading the chapter Normalizing Data, I decided to practice what I had just learnt to hopefully finally understand 100 % of a special algorithm : equilateral encoding. Equilateral Encoding The purpose of this algorithm is to normalize N categories by creating an equilateral triangle of N - 1 dimensions. Each vertex in that triangle is a category and so, because of the properties of the equilateral triangle, it's easy to construct this structure with medians of 1 unit. For selecting a category, all you need is a location vector of N - 1 dimensions that's ideally inside the equilateral triangle. For example, consider the vertex C and point c. The vertex C is 100% of a specified category, whilst the point c is 0% of that category. The vertices A and B are also 0% of C's category. In other words, the further away a location vector is from a vertex along its median axis, the less it belongs to the vertex`s category. Also, if the mentioned axis distance is greater than the length of a median (all medians have the same length in an equilateral triangle, which is the range of values in this context), then the location vector absolutely does not belong to the specified category. The reason why we just don't select directly a category is because this algorithm is originally for machine learning. It quantifies qualitative data, shares the blame better and uses less memory than simpler algorithms, as it uses N - 1 dimensions. The Application First of, here's the link to my application : https://github.com/thecheeselover/image-recognition-by-equilateral-encoding How It Works To be able to know the similarities between two images, a comparison must be done. Using the equilateral encoding algorithm, a pixel versus pixel comparison is the only way to do so and thus shapes do not count towards the similarities between the two images. What category should we use to compare images? Well, colors of course! Here are the colors I specified as categories : Red Green Blue White Black The algorithm will select the closest category for each pixel according to the differences between both colors and save it's location vector in an array. Then, when both images are loaded, compare each image pixels against each other by computing the median distance, as mentioned before, between both of them. Simply project the first pixel's vector onto the other one and compute the Euclidean distance to get the median distance. Sum all computed median distances This way, it would also works if there were location vectors not totally on a vertex, even though it doesn't happen for the just described comparison algorithm. Preliminaries Of course, this can be really slow for immense images. Downscale the images to have a maximum width and height, 32 pixels in my case. Also, remove the transparency as it is not a color component in itself. If both images do not have the same aspect ratio and so not the same downscaled dimensions, then consider using extremely different location vectors and so just different categories for "empty" pixels against non-empty pixels. The Code The equilateral encoding table : package org.benoitdubreuil.iree.model; import org.benoitdubreuil.iree.utils.MathUtils; /** * The image data for the image recognition by equilateral encoding. * <p> * See the author Jeff Heaton of this algorithm and his book that contains everything about it : * <a href="https://www.heatonresearch.com/book/aifh-vol1-fundamental.html">Artificial Intelligence for Humans, Vol 1: Fundamental Algorithms</a> * <p> * The base source code for the equilateral encoding algorithm : * <a href="https://github.com/jeffheaton/aifh/blob/master/vol1/java-examples/src/main/java/com/heatonresearch/aifh/normalize/Equilateral.java">Equilateral.java</a> */ public class EquilateralEncodingTable { // The algorithm with only one category does not make sense private static final int MIN_CATEGORIES_FOR_ENCODING = 2; private int m_categoryCount; private int m_dimensionCount; private double m_lowestValue; private double m_highestValue; private double m_valueRange; private double[][] m_categoriesCoordinates; public EquilateralEncodingTable(int categoryCount, double lowestValue, double highestValue) { if (categoryCount < MIN_CATEGORIES_FOR_ENCODING) { throw new ArrayIndexOutOfBoundsException("Not enough categories for equilateral encoding"); } this.m_categoryCount = categoryCount; this.m_dimensionCount = computeDimensionCount(categoryCount); this.m_lowestValue = lowestValue; this.m_highestValue = highestValue; this.m_valueRange = highestValue - lowestValue; this.m_categoriesCoordinates = computeEquilateralEncodingTable(); } /** * Encodes a supplied index and gets the equilaterally encoded coordinates at that index. * * @param equilateralCoordsIndex The index at which the equilaterally encoded coordinates are. * * @return The equilaterally encoded coordinates. */ public double[] encode(int equilateralCoordsIndex) { return m_categoriesCoordinates[equilateralCoordsIndex]; } /** * Decodes the supplied coordinates by finding its closest equilaterally encoded coordinates. * * @param coordinates The coordinates that need to be decoded. It should not be equilateral it doesn't matter, as the goal is simply to find the closest equilaterally encoded * coordinates. * * @return The index at which the closest equilaterally encoded coordinates are. */ public int decode(double[] coordinates) { double closestDistance = Double.POSITIVE_INFINITY; int closestEquilateralCoordsIndex = -1; for (int i = 0; i < m_categoriesCoordinates.length; ++i) { double dist = computeDistance(coordinates, i); if (dist < closestDistance) { closestDistance = dist; closestEquilateralCoordsIndex = i; } } return closestEquilateralCoordsIndex; } /** * Computes the Euclidean distance between the supplied coordinates and the equilaterally encoded coordinates at the supplied index. * * @param coordinates Coordinates of the first n-dimensional vector. * @param equilateralCoordsIndex Index for the equilaterally encoded coordinates. * * @return The Euclidean distance between the two vectors. */ public double computeDistance(double[] coordinates, int equilateralCoordsIndex) { return MathUtils.computeDistance(coordinates, m_categoriesCoordinates[equilateralCoordsIndex]); } /** * Computes the equilateral encoding table, which is used as a look up for table for the data. * * @return The equilateral encoding table. */ private double[][] computeEquilateralEncodingTable() { double negativeReciprocalOfN; double scalingFactor; final double[][] matrix = new double[m_categoryCount][m_dimensionCount]; matrix[0][0] = -1; matrix[1][0] = 1.0; if (m_categoryCount > 2) { for (int dimension = 2; dimension < m_categoryCount; ++dimension) { // scale the matrix so far scalingFactor = dimension; negativeReciprocalOfN = Math.sqrt(scalingFactor * scalingFactor - 1.0) / scalingFactor; for (int coordinate = 0; coordinate < dimension; ++coordinate) { for (int oldDimension = 0; oldDimension < dimension - 1; ++oldDimension) { matrix[coordinate][oldDimension] *= negativeReciprocalOfN; } } scalingFactor = -1.0 / scalingFactor; for (int coordinate = 0; coordinate < dimension; ++coordinate) { matrix[coordinate][dimension - 1] = scalingFactor; } for (int coordinate = 0; coordinate < dimension - 1; ++coordinate) { matrix[dimension][coordinate] = 0.0; } matrix[dimension][dimension - 1] = 1.0; // Scale the matrix for (int row = 0; row < matrix.length; ++row) { for (int col = 0; col < matrix[0].length; ++col) { double min = -1; double max = 1; matrix[row][col] = ((matrix[row][col] - min) / (max - min)) * m_valueRange + m_lowestValue; } } } } return matrix; } public static int computeDimensionCount(int categoryCount) { return categoryCount - 1; } public int getCategoryCount() { return m_categoryCount; } public int getDimensionCount() { return m_dimensionCount; } public double getLowestValue() { return m_lowestValue; } public double getHighestValue() { return m_highestValue; } public double getValueRange() { return m_valueRange; } public double[][] getCategoriesCoordinates() { return m_categoriesCoordinates; } } The mathematics utilities : package org.benoitdubreuil.iree.utils; public final class MathUtils { /** * Computes the Euclidean distance between the supplied vectors. * * @param lhsCoordinates Coordinates of the first n-dimensional vector. * @param rhsCoordinates Coordinates of the second n-dimensional vector. * * @return The Euclidean distance between the two vectors. */ public static double computeDistance(double[] lhsCoordinates, double[] rhsCoordinates) { double result = 0; for (int i = 0; i < rhsCoordinates.length; ++i) { result += Math.pow(lhsCoordinates[i] - rhsCoordinates[i], 2); } return Math.sqrt(result); } /** * Normalizes the supplied vector. * * @param vector The vector to normalize. * * @return The same array, but normalized. */ public static double[] normalizeVector(double[] vector) { double squaredLength = 0; for (int dimension = 0; dimension < vector.length; ++dimension) { squaredLength += vector[dimension] * vector[dimension]; } if (squaredLength != 1.0 && squaredLength != 0.0) { double reciprocalLength = 1.0 / Math.sqrt(squaredLength); for (int dimension = 0; dimension < vector.length; ++dimension) { vector[dimension] *= reciprocalLength; } } return vector; } /** * Negates the vector. * * @param vector The vector to negate. * * @return The same array, but each coordinate negated. */ public static double[] negateVector(double[] vector) { for (int dimension = 0; dimension < vector.length; ++dimension) { vector[dimension] = -vector[dimension]; } return vector; } /** * Multiplies the vector by a scalar. * * @param vector The vector to multiply. * @param scalar The scalar by which to multiply the vector. * * @return The same array, but each coordinate multiplied by the scalar. */ public static double[] multVector(double[] vector, double scalar) { for (int dimension = 0; dimension < vector.length; ++dimension) { vector[dimension] *= scalar; } return vector; } /** * Computes the dot product of the two supplied points. * * @param lhsVector The first point. * @param rhsVector The second point. * * @return The dot product of the two points. */ public static double dotProductVector(double[] lhsVector, double[] rhsVector) { double dotResult = 0; for (int dimension = 0; dimension < lhsVector.length; ++dimension) { dotResult += lhsVector[dimension] * rhsVector[dimension]; } return dotResult; } private MathUtils() { } } The image data that shows how to encode pixels : package org.benoitdubreuil.iree.model; import org.benoitdubreuil.iree.controller.ControllerIREE; import org.benoitdubreuil.iree.gui.ImageGUIData; import org.benoitdubreuil.iree.pattern.observer.IObserver; import org.benoitdubreuil.iree.pattern.observer.Observable; import java.awt.*; import java.awt.image.BufferedImage; public class ImageData extends Observable<ImageData> implements IObserver<ImageGUIData> { private double[][] m_encodedPixelData; /** * Encodes the pixel data of the supplied image data. * * @param newValue The new value of the observed. */ @Override public void observableChanged(ImageGUIData newValue) { if (newValue.getDownScaled() != null) { encodePixelData(newValue); modelChanged(this); } } private void encodePixelData(ImageGUIData imageGUIData) { EquilateralEncodingTable encodingTable = ControllerIREE.getInstance().getEncodingTable(); EquilateralEncodingCategory[] categories = EquilateralEncodingCategory.values(); BufferedImage image = imageGUIData.getDownScaled(); int width = image.getWidth(); int height = image.getHeight(); m_encodedPixelData = new double[width * height][]; for (int x = 0; x < width; ++x) { for (int y = 0; y < height; ++y) { int orignalPixel = image.getRGB(x, height - 1 - y); int r = (orignalPixel >> 16) & 0xff; int g = (orignalPixel >> 8) & 0xff; int b = orignalPixel & 0xff; int minColorDistance = 255 * 3; int minColorDistanceCategory = 0; for (int category = 0; category < encodingTable.getCategoryCount(); ++category) { Color categoryColor = categories[category].getColor(); int colorDistance = Math.abs(r - categoryColor.getRed()) + Math.abs(g - categoryColor.getGreen()) + Math.abs(b - categoryColor.getBlue()); if (colorDistance < minColorDistance) { minColorDistance = colorDistance; minColorDistanceCategory = category; } } m_encodedPixelData[x * height + y] = encodingTable.encode(minColorDistanceCategory).clone(); } } } public int getPixelCount() { return m_encodedPixelData.length; } double[][] getEncodedPixelData() { return m_encodedPixelData; } } The actual image data recognition algorithm : package org.benoitdubreuil.iree.model; import org.benoitdubreuil.iree.controller.ControllerIREE; import org.benoitdubreuil.iree.utils.MathUtils; public final class ImageDataRecognition { /** * Compares two images and return how similar they are. * * @param lhs The first image to compare. * @param rhs The second image to compare. * * @return Inclusively from 0, totally different, to 1, the same. */ public static double compareImages(ImageData lhs, ImageData rhs) { double meanDistance = 0; double[][] lhsEncodedPixelData = lhs.getEncodedPixelData(); double[][] rhsEncodedPixelData = rhs.getEncodedPixelData(); if (lhsEncodedPixelData != null && rhsEncodedPixelData != null) { EquilateralEncodingTable table = ControllerIREE.getInstance().getEncodingTable(); int maxPixelCount = Math.max(lhs.getPixelCount(), rhs.getPixelCount()); double emptyPixelMeanValue = 1.0; for (int pixel = 0; pixel < maxPixelCount; ++pixel) { double[] lhsVector; double[] rhsVector; if (pixel < lhs.getPixelCount()) { lhsVector = lhsEncodedPixelData[pixel]; } else { meanDistance += emptyPixelMeanValue; continue; } if (pixel < rhs.getPixelCount()) { rhsVector = rhsEncodedPixelData[pixel]; } else { meanDistance += emptyPixelMeanValue; continue; } double rhsDotLhs = MathUtils.dotProductVector(rhsVector, lhsVector); double[] rhsProjectedOntoLhs = MathUtils.multVector(lhsVector.clone(), rhsDotLhs); meanDistance += MathUtils.computeDistance(lhsVector, rhsProjectedOntoLhs) / table.getValueRange() / maxPixelCount; } } return meanDistance; } private ImageDataRecognition() { } }
  5. Hi, I have a problem with my programm and i cant find any solution... I wrote a simple 2D game. The background is moving and accelerating slowly. On the right side there is the player, he is fixed and not movable. Now I want carrots moving with the same speed as the background towards the player. So i used the exact same speed like the background, but i set them as an Array List. Now the carrots spawn, they start with the same speed like the background, but then they get slower and slower instead of faster and faster. If i dont declare them as an ArrayList it works, but i want multiple carrots on the screen. Would be really nice if someone has an idea, Thank You!!!
  6. I want to be able to display an amount of gold at the top of the screen that changes based on how much the player buys. I can just remove and reload the Pane object in my screen controller class, but it seems like there must be a way for me to only update one part of a Pane without needing to reload the entire thing. How can I modify a variable and change it's displayed value in a window, while not reloading the entire Pane object? Main Class package application; import java.io.File; import java.io.FileInputStream; import java.io.FileNotFoundException; import javafx.application.Application; import javafx.scene.Scene; import javafx.scene.image.Image; import javafx.scene.image.ImageView; import javafx.scene.layout.Pane; import javafx.scene.text.Font; import javafx.scene.text.Text; import javafx.stage.Stage; public class Main extends Application { // Fonts public static final String IMPER_FONT = "./res/fonts/imperator.ttf"; // Global Images // used for screen titles public static final ImageView TITLE_IMG = makeImage("./res/images/title.png"); public static final ImageView HIDEOUT_IMG = makeImage("./res/images/hideout.png"); public static final ImageView TREASURY_IMG = makeImage("./res/images/treasury.png"); // Global Game Stats public static int Gold = 1250; public static LinkList<Object> Equipment = new LinkList<>(); // Panes private static Pane mainMenu = MainMenu.getPane(); private static Pane hideout = Hideout.getPane(); private static Pane treasury = Treasury.getPane(); // Screen Controller private static Scene scene = new Scene(mainMenu, 1600, 900); private static ScreenController control = new ScreenController(scene); /** * Creates an ImageView object * * @param path A String that represents the filepath to the image * @return ImageView An Imageview object with the appropriate image */ private static ImageView makeImage(String path) { FileInputStream input; try { input = new FileInputStream(path); ImageView title = new ImageView(new Image(input)); return title; } catch (FileNotFoundException e) { e.printStackTrace(); } return null; } /** * Creates a Text object with specified font file-path, message, and size. * * @param String path the file path of the font file * @param String message the text of the Text Object * @param double size the size of the font * @return Text The appropriate Text object. */ public static Text makeText(String path, String message, double size) { FileInputStream input; try { input = new FileInputStream(new File(path)); Font font = Font.loadFont(input, size); Text msg = new Text(message); msg.setFont(font); return msg; } catch (FileNotFoundException e) { e.printStackTrace(); } return null; } @Override public void start (Stage stage) { // Add panes to ScreenController object control.addScreen("main menu", mainMenu); control.addScreen("hideout", hideout); control.addScreen("treasury", treasury); // create the scene and display it stage.setScene(scene); stage.show(); } /** * Allows other classes to use the same ScreenController object. * * @return ScreenController The object used to switch screens */ public static ScreenController getControl() { return control; } public static void main(String[] args) { launch(args); } } ScreenController class package application; import java.util.HashMap; import javafx.scene.Scene; import javafx.scene.layout.Pane; public class ScreenController { private HashMap<String, Pane> screenMap = new HashMap<>(); private Scene main; public ScreenController(Scene main) { this.main = main; } protected void addScreen(String name, Pane pane) { screenMap.put(name, pane); } protected void removeScreen(String name) { screenMap.remove(name); } protected void activate(String name) { main.setRoot(screenMap.get(name)); } }
  7. For my assignment my professor has given me the option of either accessing the private attributes of an inner class directly, or making my own "set" methods for those attributes. I am not sure what is generally considered best in this case. I am not used to accessing private attributes directly, but I'm new to Java, and haven't used inner classes much before either. She's not going to take off points no matter what I do, so I hope this isn't considered, "homework help". Anyway, which do you feel would be best and/or most elegant?
  8. Forgive me for the somewhat inappropriate title for my question. I can't seem to keep my game objects in sync with a box2d body. I understand these much: 1. When you get a body position, you need to subtract half the size of your sprite to get the exact location 2. box2d uses radians for angles, so you need to convert to degrees. Everything was going well when I used CircleShape and PolygonShape's setAsBox() method to create my shapes, but when I created a triangle using my own vertices, the shape was drawn correctly but now my sprite is no longer following the body correctly. Please what am I doing wrong or what am I not doing?
  9. Zemlaynin

    The Great Tribes Devblog #1

    Concept Document Game project, a global strategy simulator of civilization development - The Great Tribes 1. Classification Genre: global strategy, simulator. Time of one walkthrough: 10 + hours. Platform: PC. 2. Main Features The Great Tribes is a global strategy simulator of civilization development, the action of which takes place in the historical period from 3000 BC to the beginning of 3000 AD. During the game the player will have to create their own unique civilization and try their hand at its development in a nonlinear, constantly changing world. Conceptually, the game is a cross between a turn-based strategy Sid Meier’s Civilization VI and strategies of Paradox Interactive (Crusaders, Europe and Victoria). Similarity with these games is limited to the time period covered in the game and some game mechanics. In our project we want to reflect the role of a personality in history, but instead of personalities history is influenced by different factions. We focus on working out in detail of various historical phenomena. We are planning to create an advanced economic system that will make it possible to simulate economic processes with a high degree of realism. The simulation of interaction between different countries includes: diplomatic relations, economic, technological, cultural and social influence. The conduct of military actions between the countries in our project will be realized in a wide range, from single collisions to waging a trench warfare at a vast front. Realistic simulation of the historical process The game model is based on the results of the latest research in various scientific fields: from history and political science to geology and agricultural sciences. Simulation allows to simulate all the significant historical phenomena and processes. Flexible Turn-based Gameplay System The calculation of the game turn is divided into a turn and a tick. The turn calculates global parameters: population and economy growth, migration of strata and changes in their characteristics, etc. During the game it is possible to change the time step depending on the player's preferences. Ticks only occur in combat. There are 4 ticks in the course of the turn: spring, summer, autumn and winter. Thus, the army that committed a long march-throw and entered the battle running out of action points will fight in the winter tick with the corresponding consequences. Advanced Technology System Technological discoveries occur randomly, and the probability depends on the accumulation of a corresponding number of technological points: agricultural, industrial, military or social. After the discovery, the technology is embedded into one or another technology package, which has an impact on a particular game system. Mechanics of technological packages allows to make development in the game realistic and not always predictable. Two-dimensional Social System The population in the game is grouped into strata and factions. Strata determines the place of the household in the labour division while the factions are responsible for the redistribution of power in the game. For example, the insufficient number of strata workers could hamper industrialization of the country and the trade union faction can fight for the rights of this small strata. Flexible Coalition System The coalition system allows to create various forms of relations between administrative units: an administrative zone and a region, a region and a country, between several countries (confederations, vassal relations, unions, etc.), between a region and an army (government armies, feudal armies, etc.). Realistic Economic System Economy in the game is a system based on the dynamic cost of resources, goods and services. This makes it possible to simulate a variety of regional specializations, economic imbalances, etc. Unique Political System The main elements of the political system in the game are the form of government, political values, laws and corruption. The form of government is based on the ratio of five elements: barbarism, community, democracy, oligarchy and monarchy. Changing the ratio of these elements, it is possible to simulate any existing or even a non-existent form of government. Political values reflect the position of the elite on each of the political or parapolitical issues. During the game the elite (of its own free will or under the pressure of the player) can change their values, but, as a rule, it is painful and not fast. Laws allow to carry out quite a fine adjustment of the country, and corruption can help to restrain the player from excessive expansion of their power. Diversity of Cultural and Civilization Forms Unlike other games, civilizations in the game are formed on the basis of 4 pairs of framework principles, which can form up to 16 unique civilizations, and their combination allows to generate up to 3520 unique cultures. Conduct of Military Operations The military aspect of the game focuses on the strategic management of armies: formation of military doctrines, establishment of the conduct strategy of armies, determination of the optimum correlation of branches of armed forces for this or that army, etc. The player will be able to concentrate on planning the strategy of the military campaign. 3. Gameplay The main task of the player is to develop their country in conditions of external threat and/or internal instability. By controlling a multitude of mechanisms, the player can implement any of the goals offered in the game: creation of the richest trading empire, holding power in the role of one ruling dynasty as long as possible, being the first to implement the industrial revolution, etc. 4. Game Map The game map is divided into tiles and subtiles. But this division is valid for the technical side of the game. In terms of gameplay, the map is divided into tiles only. Each tile occupies an area of 1369 sq. km (this value may change during balancing). Within this area on a tile there can be located districts (in the cities), buildings (outside the settlements), the tile can be divided into different types of biomes, etc. Depending on the biome, a certain amount of resources may be situated on the tile. So, it is advantageous to place fields on meadow plains, the area of which depends on the area of agricultural lands of the tile. In addition, each tile has a certain level of transport infrastructure, which defines the movement speed of armies and the capacity of trade caravans. However, unlike armies, caravans can move only along the main routes which are indicated on the map. This path can change its trajectory, depending on the quality of transport infrastructure of neighboring tiles, crime rates and other factors. The closer is the tile to the crime center (the settlement of the player or another country or a bandit/pirate settlement), the higher is its crime rate. On the map there constantly appear bandit armies, so they are exactly simulated by this parameter, only without the need to constantly drive armies across the country to destroy them. Rebel armies will be represented in the form of full armies. In addition to the transport infrastructure, there is a parameter of urban infrastructure. The urban infrastructure represents the level of development of various services and engineering networks of the settlement (accessibility and quality of utilities, communication facilities, urban transport, catering, retail, emergency services, etc.). Urban infrastructure is available not only in cities but also in villages. To create favorable conditions in the settlements the player will have to balance between the development of transport and urban infrastructure. 5. Administrative division and types of settlements The game has three levels of control: a country, region and administrative zone. An administrative zone is a territory with dynamic boundaries, being controlled by the settlement. Within this territory, residents of the settlement can build anything within the framework of the ongoing development programme. All types of settlements without exception have this zone, from villages to cities. If a city in the region forms a new region, all the tiles in its administrative zone also become part of the new region. Administrative zones are grouped into a larger formation – a region. A region is a territory with dynamic boundaries, consisting of a certain number of administrative zones. It necessarily includes the capital city of the region. Unlike the administrative zone, a region can simultaneously be a country (consisting of one region). In addition, the player can directly manage it (whereas administrative zones can be managed only through legislation). A country is the highest level of control in the game (not counting international coalitions), representing one region or a coalition of regions. A coalition means not the country's federal structure, but the system which defines relations between different administrative units in the game. Each country has a capital, and as a consequence - the capital region. The region of this type has the same functionality as a usual region, but in addition it hosts the highest state bodies: ministeries and the advisory board. Each level of management has its own central settlement. It can be a village (only for the administrative zone), city or encampment. A village is a type of settlement focused on food production or resource extraction. Over time a village can be upgraded into a city. The game presents 3 basic types of villages: agricultural, resource-extracting and military. An agricultural village is oriented to the processing of farmland. A resource-extracting village is focused on the extraction of minerals. The type of resources that are extracted depends on the demand for the resource. A military village generalizes a variety of villages, the inhabitants of which are hostile to the player. A rebel village: village troops will defend their village and their independence. A village becomes rebellious if the population's loyalty to power is too low. A bandit (pirates) village: village troops will attack the settlements and trade routes located nearby. A village prefers to move into this state due to absence of legal means to maintain an acceptable standard of living. The given types of villages are conventional. All villages have the same characteristics, but their chosen vector of development depends on the demand for a particular resource, or on the level of loyalty to power. New villages in the game can be formed either automatically or due to a certain decision. The place of automatic appearance of villages is determined on the basis of attractiveness of adjoining territories for processing, and also is located at a certain distance from other settlements and processed tiles. As the population of old settlements rises to some level, the chance of a new village emerging at some distance increases. Its population will not appear out of nowhere, but it migrates from the settlement. New villages can occur both inside and outside the region. Encampment is a type of settlement of nomadic cultures, able to move to other tiles. Settling, nomads form a village or city (depending on the size of the nomadic group). Unlike a city, playing for encampment is concentrated not so much on the management of the population, but on the management of tribal clans (factions). Each clan has its own encampment. The elite of each nomadic group includes every member of the clan. However, the encampment can include residents who are not part of the clan (slaves, mercenaries, etc.). The more solid (controlled) the clans are, the stronger the tribe is in clashes with other nations. This clan structure of the society is typical of all countries with barbaric elements of government. However, in settled states clans do not always act as the elite of the settlement. In addition, unlike cities, change of dominant elites in the tribe occurs not gradually through transfer of population from one faction to another, but via change of the fraction status. In game mechanics it is represented in the form of change of the capital nomads and status of the elite. Another distinguishing feature of nomads is their ability to move around the map. This is possible in two ways: moving the nomadic population of the ruling clan, while the rest of the nomads are moved in automatic mode (due to an insufficient level of control or by the decision of the player); moving all the nomads manually with a sufficient level of control. Poorly controlled nomads are moved in automatic mode. A city is a type of settlement with multiple forms of activity, but with a certain specialization. A city is not necessarily a result of the village development, but it can be built from scratch, or formed from the outpost (see Regional buildings). Unlike a village or encampment, a city that is the capital of a region or country can have up to three Wonders of the world (one of each level: regional, national and international). In the game there are many specializations of cities: Administrative center Science center Trade center Cultural center Religious center Industrial city The higher the city is placed in the hierarchy (a provincial city - the capital of the region - the capital of the country), the greater effect its specialization produces. So, if the player decided to build a huge empire, it is better to establish an administrative center as the capital (for the control of large territories), for a trading empire it should be a trade center, and for theocracy it is more preferable to assign a religious center of a state religion, etc. The difference between a city and a village: a city has a more developed social infrastructure; it occupies a certain area of the tile and when it is exceeded, it expands to a neighboring tile; a city creates an administrative load; it is possible to construct wonders of the world (in capitals); it has diverse stratification and division into districts. 6. Urban districts In the city, a player can build up to seven districts that can be expanded to accommodate various infrastructures: An administrative district performs functions of control and development of the administrative resource; An industrial district produces practically all types of goods (except luxury); A cultural district produces luxury goods, prestige, and also creates some modifiers for the city; A scientific district is responsible for increasing literacy of the population and accelerating the development of technologies; A religious district - the development of the district contributes to increasing the influence of state religion; A commercial district – transport and financial infrastructure is created here; A social district provides the population with housing and urban infrastructure. Six of the listed districts can be built in the city center and determine its specifics. In addition, the effect of all districts depends on the location of the city – it can be situated near the shore or in the depths of the continent. Characteristics of districts Cost includes resources needed for the region expansion. Content includes resources necessary for supply of the district during each turn. Workforce is the number of working hands required for the efficient operation of the district. Area is the area given and available for expansion. Effect stands for the bonus-malus payments, received in the course of functioning of the district. Wonders of the World Instead of usual constructions three types of wonders of the world are built in cities: regional, national and global. The effect of every kind of wonders is spread according to their scale. The list of wonders available for construction in the city depends on the central district of the city. And the effect produced by the district will be determined by the chosen wonder. In addition, the district can include up to three wonders, one of each level.However, construction of a higher-level wonder reduces the effect of wonders of a lower level. The wonder effect can also be reduced by the presence of a similar wonder in the zone of influence and visibility. The scale of the wonder influences its price and effect. In addition, the effect of a small wonder can easily disappear if certain conditions are not fulfilled, whereas the effect of a world wonder never disappears. 7. Regional buildings In addition to the wonders of the world and urban districts, the player can also build constructions outside the city - in regional and extraregional tiles. Characteristics of regional buildings: Cost stands for resources necessary for construction. Supply includes resources necessary for ensuring the construction during each turn. Workforce is the number of working hands required for an efficient operation of a building. Location defines whether it is possible to build a construction only within the district or everywhere. Improvement - some buildings can be rebuilt into other more significant constructions. For example, a wooden advance outpost can be upgraded into a stone one. Accommodation conditions - most buildings can be built only in tiles with certain conditions. Effect - buildings can produce a variety of effects: from ordinary bonuses to the ability to extract resources and supply armies. List of buildings Agricultural: gardens, a pasture, a field, a camp; Mining: a quarry, a sawmill, a mine, a drilling rig; Military: an outpost, a military base. Unlike other buildings, outposts can be installed outside the district. The outpost has its own control zone, which complicates the speed of enemy forces passing through it, and decreases the level of crime in the district. In addition, outposts with a sufficiently high level of development of urban infrastructure can be converted into a city or village. 8. Domestic Policy The key indicators of domestic policy are the administrative burden and the administrative resource. The administrative burden is the level of constant administrative spendings on the management of the country, as well as various actions of the player. The administrative burden of the country is the burden of the regions and the highest governmental structures. The administrative resource is the management resource which represents the number of civil cervants and their management efficiency. If the administrative load exceeds the administrative resource, the player begins to lose control over the regions. In addition, the administrative resource can be spent on corrupt practices. Corruption in the game is trade in administrative resource, carried out by the management apparatus. Like for any resource, the laws of supply and demand apply to the administrative resource. Strata that captured part of the administrative resource of the city, region or country get the opportunity to determine the actions of a chosen government institution. In addition to trade in the administrative resource, corruption is expressed in the form of an indicator of the region or government structures which determines the efficiency of budget spendings on their needs. Forms of Government Another important element of domestic policy is the form of government. It is a mixture of five elements: barbarism, community, democracy, oligarchy and monarchy. Each element can take a value from 0 to 10, where 0 is the absence of characteristics and 10 is its pure, pronounced characteristics. For example, a country may have the following form of government: barbarism (5), community (3) and oligarchy (2). Total expressiveness of all forms of government should be equal to 10, so to increase an element, for example, democracy one must reduce the strength of one of the remaining elements. Each of the elements of the form of government gives its own unique effect and when changing the form of rule the gameplay changes accordingly. Forms of government also give access to 1) certain social technologies. Some of the technologies are closed from some forms of government. For example, rooted barbarism closes access to tax collection and trade technologies. 2) to the laws For example, a strong monarchy gives an opportunity to pass a law on inheritance of power. Political values Political values reflect the standpoint of the strata and factions on each of the political or parapolitical issues. In the course of the game they (of their own will or under the player’s pressure) can change their values, but, as a rule, it is painful and not fast. The game has the following groups of values: Economy: a hard plan \ a soft plan \ pragmatism \ a regulated market \ a free market Openness of the society: closed \ moderately closed \ semi \ moderately open \ open Social Policy: state / state-society / society / society - individual \ individual Foreign Policy: isolationism \ non-interference\ realism \ interventionism \ expansionism Religious Policy: theocracy \ clericalism \ secularism \ anticlericalism \ militant atheism National Policy: nazism \ nationalism \ multiculturalism \ internationalism \ cospomolitism Post-values: denied \ invalid \ neutral \ minor \ important Post-values in the game reflect the attitude of people to the values of new, upcoming phases of development. For example, in the course of society's transition to the industrial phase of development, issues of emancipation of women, ecology and others became significant. The more loyal the society is to post-values, the more inclined it is to revise its other values, which can lead to social instability. The forms of government along with the political values of the elite allow to simulate all the basic forms of political formations. Laws If the forms of government tell us who rules the country, then the laws show how the country is ruled. Laws can be adopted both for the whole country and for each region separately. The adoption of any law entails a temporary decrease in the loyalty of regions. Besides, the laws are not just effects, but also constant expenses on their maintenance. The lack of resources for the maintenance of laws leads to the fact that laws cease to operate, starting from the recently introduced and ending with the most entrenched. Forms of struggle for power Finally, the domestic policy is expressed in the struggle for power. Depending on the prevailing contradictions between the authorities and the opposition, the latter may make various steps to change the current power: Change of the party of power (occurs in the form of cabinet struggle within the established norms) Civil disobedience Insurrection / Coup d'état Terrorism Civil war Guerrilla war Participants of the guerilla movement are the strata with the state religion and culture Peasant War The lower the position on the list is, the higher is the massiveness, the number of victims and the cruelty of speeches; the current rules and regulations are followed less and the speed of the process is higher, but, in case of success of the action, reforms conducted by the new power are more radical. 9. Foreign Policy Diplomacy and Prestige The basis of diplomatic relations in the game is the system of coalitions. Coalition agreements can be concluded between countries, between regions and even between the capital of the region and the settlements belonging to it. In fact, it is a universal pattern of establishing communication between administrative entities. The main resource of diplomacy is prestige. Prestige is a generalized measure of grandeur of an international organization, country, region or settlement. This parameter affects both the other administrative entities and the perception of any entity by the population. So, a city, producing a lot of prestige, can get a good income from tourism. And a country with high prestige can tempt other countries and regions over to its side. Espionage Espionage in the game is an agent network that is introduced into a particular region. The more developed the agent network is, the higher the chance of success of espionage actions or counteraction of foreign secret services is. 10. Demographics The population in the game is divided into strata and factions. Strata reflect the professional role of the population in the game, whereas the role of factions is to fight for power in any of its manifestations. Strata The game presents the following strata: Peasants Workers Slaves Specialists Merchants Clergy Aristocracy Civil servants Soldiers From the very beginning the game presents only part of the strata. The rest get available as technology evolves. Strata parameters Values are the views of a strata on the best government policy. Openness is the level of difficulty in entering and leaving the strata. The degree of attractiveness is an indicator that reflects the extent to which people seek to change their social and professional status and become part of this strata. In working strata (peasants, workers, specialists) attractiveness depends on the level of their income and unemployment in the industry where they work. The attractiveness of civil servants depends on the state demand for them. The attraction of slaves always equals 25%. The attractiveness of the other strata depends only on income. The minimum attractiveness is 10%, the maximum is 500%. In addition, the attractiveness of a strata is influenced by its rights, consumption level, entry into the elite and dominant values in the society. Size - the growth of the size of a strata depends on natural population growth and the entry/leaving of people to other strata. In addition, the size of a strata can change the losses in the war and during repressions. Fertility falls with the increase of consciousness of the population and when achieving a high standard of living. It is growing with the development of healthcare. Mortality falls when the population's living standards rise, as well as with the development of healthcare. Consumption level reflects the categories of goods that strata needs. These products are divided into three categories: necessities, everyday and luxury items. If a resident has no money for essential goods, or if these goods are not on the market, he is threatened with death.The level of happiness depends on the satisfaction of everyday needs, as well as on the consumption of luxury goods. The ability to buy luxury items is a factor of transition to more attractive strata, while lack of access to essential goods and luxuries contributes to the transition to less prestigious strata. Income depends on the wage rate, or on income from enterprises. Expenditure is expenditure on consumption, as well as contributions to the funds of the factions. Wealth is all the accumulated property of a strata. Wealth increases due to the fact that strata keep part of their income. Wealth decreases with high crime level in the settlement or its looting, growing in the course of accumulation and investment activity. Unemployment exists only in working strata. Crime is the proportion of strata involved into criminal activity. Consciousness is the level of political culture and simply civic consciousness of the population. The loyalty to the authorities reflects the level of support or opposition to the ruling regime. It can take values from -5 to + 5. Civil, political and social rights are set by political decisions. Literacy reflects the level of theoretical knowledge of strata in its professional sphere and the degree of its qualification. Culture stands for belonging of a strata to a certain culture. Religion is belonging of a strata to a certain religion. Migration of the population Migration occurs between settlements if they are connected by roads. People will migrate between the settlements of the region, from one region to another, if there is a shortage of working force, the prestige of the settlement and the living standards of the population are higher etc. The quality of the road network determines the volumes of migratory flows. Factions In addition to strata, the game includes factions (groups of interests) that represent the force that can influence the political situation in the country. Examples of factions: Ruling Dynasty/Royal Court/Government Aristocratic/Oligarchic/Mafia clans Parties/Revolutionary groups/Separatists/Terrorists/Ideological groups Religious orders/Sects/Schools of Great people Metropolitan and Regional Elite Faction parameters Size stands for the number of supporters of the faction. Goals/values are goals and/or values that determine the direction and nature of the faction's activities. Openness is the level of difficulty of entering the faction. Prestige reflects the attractiveness of the faction among the other factions, as well as the degree of influence. Wealth is a foundation which deductions are made into by members of the faction and other factions/organizations. Income/Expenses Radicalism is readiness of the faction to illegal actions. Rights stand for the level of political rights of the faction. Cohesion is the level of strength of the faction and the ability of its members to act as a whole. Breadth of views consists in the hope of increasing the number of its supporters. The faction can expand the scope of its value views, but this makes it lose cohesion and weight of each faction member in its cumulative effect. 11. Culture and religion Culture is ethnic affiliation of the peoples inhabiting the country. It is based on a combination of 4 pairs of framework principles: Time-Space Individual-Mass Rational-Transcendental Spiritual – Material The combination of these principles allows to create 16 unique civilizations. Civilizations are not a homogeneous mass, but a collection of many heterogeneous cultures whose values are conditioned by civilizational principles. Cultural values, in fact, represent the imposition of civilization principles on each other. All in all in this way each civilization can form up to 220 unique cultures (i.e. in total in the game there can be up to 3520 unique cultures and 16 civilizations). The civilizational principles also define the peculiarities of religions of certain civilizations. Cultural assimilation The player is allowed to carry out cultural assimilation of villages and cities into the state culture at the cost of reducing control over them. The process of cultural assimilation takes dozens of turns. Players can also change their state culture. This process takes several turns. In the course of changing the state culture, control over those villages and cities that have a former state culture falls sharply. Religion If the value aspect of religions depends on the place of their origin, their organizational type is determined by the player. Religions have three parameters: 1. Type of religion: Polytheism Henotheism Dualism Monotheism Ethical system Secular philosophy Animism 2. Organizational structure: Lack of structure Decentralization Centralization 3. Type of organization: Cult Church Each of the religions has a certain level of influence, which depends on the development of religious areas where this religion prevails. 12. Economy Types of economic processes include hunting, fishing, cattle breeding, agriculture, extraction of raw materials, commodity production, slavery. Hunting - with the help of hunting the tile gets a certain amount of vegetables, fruits, meat and cattle from all the unprocessed subtiles. Fishing is carried out in river locations, as well as in water coastal locations. Similarly, the hunting region gets some amount of fish and pearls. Cattle breeding is a more productive type of activity. The area of pasture lands is important for cattle breeding. It depends on the type of landscape, the type of buildings and the level of woodiness of the tile. Pastures as source of improvement of locations increase the effective area of pasture lands. The lack of grazing lands leads to a decrease in the number of cattle in the region. Agriculture is the most massive type of economic activity in the game. It includes the largest number of working hands. Grain is both a product of agriculture and a necessary condition for its maintenance. Grain is distributed to locations from the region's reserves. The amount of grain that will be used for sowing depends on two things: Arable land area; Number of working hands and intensification of agriculture. Livestock, as well as improved instruments of labour, can increase productivity. Types of property: Property of a strata Property of a faction Communal property Regional property (owned by the regional elite) State Property Among the strata and factions holders can be small, medium or large. Each of the types of property has a certain entrepreneurial potential. So, the entrepreneurial potential of the community is lower than that of small holders. On the other hand, the community is extremely effective in difficult conditions of management. Dividing the economy into white and shadow Goods have a certain level of utility for the population Inflation = money supply * speed of money circulation = level of prices * production volume Trade Trade in the game is divided into internal, external and distant. Internal trade is carried out in the territory of one country between all the settlements having trade routes with each other. External trade is carried out between all the regions of one trade center. Long-distance trade is carried out between two connected trade routes by trade centers. A trade route is a regular land and/or sea path connecting two settlements with each other and the regional capital with the army it supplies. If a trade route is overloaded, first of all it is used for delivery of the most profitable goods. To plunder the trade route one only needs to put an army on it, whereas two mechanics are provided for protection: Allocate funds for the protection of trade lines (then in case the allocated funds surpass the force of bandits, the attacks are considered to be beaten and the squad of bandits bears losses); Place armies at unprotected areas (the area of protection can be selected by moving the slider in the army menu. The larger the area is, the more dispersed the army is along the route and the weaker it is in protection). Pricing The price of the goods is determined basing on the cost of production + costs of implementation + mark-up. The mark-up is determined automatically based on the maximization of profit, competition and price constraints. Resources Resources include raw materials or goods necessary for the production of another resource or satisfaction of the needs of the population or the army, maintenance of buildings or spending on certain actions. Types of resources 1. Food: Meat, fish, grain, vegetables, fruits, canned food, alcohol 2. Agricultural: Agricultural resources, cattle (cattle, pack animals), technical crops 3. Industrial: Construction materials, wood, leather, fibre, fabrics, paper, tools, weapons, luxury, consumer goods, machinery, electronics, prom goods, energy, ships, cars, airplanes, trains, fuel, consumer products, medicines, chemicals, plastics, local products 4. Strategic: Metals (copper, tin, iron, aluminum), energy (coal, oil, gas, uranium), sulfur, gold, silver, precious stones 5. Services, Slaves Resource characteristics Quality is the quality of the resource, depending on the technologies used for its production. It affects the cost and mark-up. Price is the amount of gold per unit of the resource. It depends on the value of demand and the value of the supply of the resource, as well as its production cost. Production is the number of units of the resource produced. Consumption is the number of consumed units of the resource. The principle of movement of resources in the course of trading can be given on the example of grain: - Peasants produce a certain amount of grain and then either pay a natural tax, or sell it in the local market, and then pay the tax in monetary terms. The remaining volume of grain is used as food, for new sowing and, if there are surpluses, for sale in the local market. - The tax paid by the peasants passes to the ownership of the country or regional elite. - Regional elites either pass a part of the received tax to the state, or leave all to themselves, depending on the established order. Available resources can be both sold and spent on their own regional needs. - Finally, merchants who buy a resource in the local market sell it at a shopping centre which the region belongs to, or in the capital of a region of one state at a more attractive price. 13. Science The technologies in the game have three levels: The first level of technology represents the general level of development of one or another sphere: agricultural, industrial, military or social. The second level of technology includes specific technologies, the condition for the invention of which is, among other, a certain level of technologies of the first type. The third level of technology is technological packages that group second-level technologies. It is technological packages that set the effect for different systems in the game. Technology implementation Implementation of technologies is carried out by means of investment by the state or population of money resources and administrative resource into introduction of a technology. The bigger an industry in which a certain technology is implemented is and the less well-known countries and regions of the country with this implemented technology exist, the more expensive the implementation is. Technology Exchange Countries active in trade are increasing the chance of implementing the technologies that had been introduced by the trading partner. 14. Military action The main resource of the army are recruits. The number of recruits reflects the number of people who the authorities are able to transfer to military service. The number of recruits is slowly increasing over time, but is quickly exhausted in intense military conflicts. Officers Officers are a separate category in the army. They are recruited as part of recruiting, but the ability to occupy this position can be closed for some of the countries. Army and control zones Army is a group of troops under a single command with its control zone. A control zone is divided into a response zone and a combat zone. As a rule, the response zone has a radius of 4 tiles. When an alien army enters it, it activates the line of behavior set by the player. The combat zone is an area of 1-cell radius. When an alien army enters it, it stops its movement and forces the player to enter the battle. Moreover, with the growth of military technologies and, consequently, the scale of wars, the control zone can increase significantly. Thus, the zone of control in positional warfare, typical of world wars, can reach the size of the region. Supply and replenishment of the army Each army must be assigned to one or more regions. The designated regions will continue to supply this army. Replenishment of the army reserves is carried out through a trade route of supply from the region to which the army is assigned. Roads can contribute significantly to accelerating the supply of armed forces. In addition, it is possible to replenish stocks by plundering the local population. The fighting efficiency of the army, left without supplies, sharply falls, while the speed of movement decreases and action points are reduced. It also means that in order to win over a strong army it is not necessary to win it in an open battle - it is enough to cut the lines of supply communication. Replenishment of the army is also carried out through trade routes of supply, which in addition to supplies (food, weapons, pack animals) will transfer new recruits. Reinforcements It is possible for armies to establish automatic reinforcements for other armies of the player located on its territory or in the zone of another army’s control. Movements, military operations and tactical schemes At the beginning of the turn each army has a certain number of action points (AP), which can be spent on a movement, the beginning of the battle, siege or change of the state of the army. The AP cost of the movement depends on the area and infrastructure development. Speed of the army equals the speed of the slowest kind of troops in it. The army can have four states: Combat readiness is a standard condition that does not give any certain bonuses; Marsh allows the army to move twice as fast, but twice as low as the protection characteristics. However, it is possible to attack another army during the marsh; Camp is a recommended condition for peace time. It allows not to spend a lot of supplies on the army, but it is particularly vulnerable in this state as both the characteristics of attack and protection decrease. You need to spend all the AP to move into another state; Ambush gives the army a chance to escape from the enemy’s visibility distance, increasing the characteristics of the attack, but reducing the protection characteristics in case of ambush exposure. The army can adapt up to three different tactical circuits. Tactical schemes increase the combat characteristics of some troops, but can reduce the combat characteristics of others. Or they can amplify some combat characteristics, but reduce the others. For example, the tactical scheme "phalanx" increases the close-in attack for spearmen in general and against cavalry in particular, but it decreases the speed of movement and its ability to maneuver. Therefore, in such a tactical scheme additional attention should be paid to the saturation of their army with cavalry. A tactical scheme is also a familiar pattern in the fight, the way of thinking for the generals, so change of an accepted tactical scheme can be quite painful: it leads to a loss of experience for the entire army. Battles between armies in the open field At the end of the turn for the enemy armies, which came together at a normal location (without a fortress or city), the battle is calculated. The battle consists of two phases. The "Long-range combat" phase. It involves all the troops capable of a long-range attack. The "Close-in combat" phase. All the troops are involved in it. Only a limited number of troops can participate directly in the battle. Their number depends on the technology and the area. The rest of the troops are in the standby mode. For example, in the mountains it is quite possible to stop quite a large army. The formal winner of the battle is the one who leaves the battlefield. However, the gained experience and state of the army after the battle play a larger role. Siege of cities and fortresses. City fights It is impossible to take a fortress or a fortified capital without siege-assault engines. Also taking a fortress or fortified capital always requires a minimum of 2 turns. In the first stage of assault it is necessary to break the fortifications and enter the besieged settlement. The battle at this stage consists of two phases. The "Long-range assault" phase. It involves all the troops capable of a long-range attack and siege-assault engines of the attacker. The "Close-in assault" phase. The purpose of this phase for the attackers is to capture the wall of the settlement, and for the defenders-trivia attack. If the attacker managed to capture the walls, the next turns begins with the battle for the settlement by the rules of the battle in the open field. However, for the final victory the attackers must destroy all the troops of the defenders, and not just win. Only then the settlement will be completely seized. Thus, battles for cities, which consist of more than one location, can last during more than 3 turns, as each part of the city will have to be captured separately. Fleet Fleet is a group of ships under the authority of a single commander with its control zone. As a rule, the zone of control is an area with a radius of 3-6 locations. When the alien fleet enters it, it leads to the sea battle. The radius of the control zone increases with the growth of technologies and experience of the fleet crew. Fleet Supply and Repair Unlike the army, the fleet is not assigned to any region and is supplied by all of them. To exit the port, the fleet can bring a limited amount of supplies. Supplies include food, weapons and building materials. For replenishment of supplies it is possible to go to any friendly port. The fleet, left without supplies, sharply loses fighting efficiency while the speed of swimming decreases and action points get reduced. During the battle ships can get damaged or lose a part of the team - to repair and replenish the team again you have to go to a friendly port. Swimming and sea battles The fleet receives a number of action points (AP), which can be spent on swimming, repair and replenishment of supplies, boarding and landing of the army and the beginning of sea battles. The sea battle is not divided into phases and represents individual battles between ships of fleets. The formal winner is the one who retained the highest morale of the fleet.
  10. Hello! I'm currently developing a top-down RPG styled game with an Entity Component System architecture and, as the game grows in features, so does my game entities, that is, item models, enemy prototypes, etc. Those definitions are currently in JSON files but at the end of the day I still have long factory classes that read from those files and populate the entities with their respective components and properties in the most naive way. Reading through a presentation about Techniques and Strategies for Data-driven design in Game Development (slides 80–93) (warning: big pdf file) there is this "prototyping approach" where you can build up each game entity from multiple prototypes. I find this really interesting, however, the presentation doesn't mention any implementation details and I'm totally in the dark. I don't know how powerful should this system be. By the way, I'm using Java and LibGDX's engine. My first idea is making a robust prototype-instancing factory where, given a JSON file, it will be able to return an entity populated with its corresponding components. For example: Enemies.json { "skeleton" : { "id" : 0, "components" : { "HealthComponent" : { "totalHealth" : 100 }, "TextureComponent" : { "pathToTexture" : "assets/skeleton.png" } } } } If I wanted to instantiate a Skeleton entity, I would read it's prototype, iterate over it's components and somehow I would instantiate them correctly. With this approach I have the following issues: It will most likely involve using Java Reflection to instance entities from a JSON file. This is a topic that I know little about and will probably end up in dark magic code. Some instances properties can't be prototyped and will have to be passed as parameters to the factory. For example, when creating an enemy entity, an (x, y) position will have to be provided. Suddenly creating instances is not so straight forward. How powerful should this system be? Should it have this "recursive" behavior where you can extend a prototype with an other and so on? This sounds a little bit like dependency injection. Am I reinventing the wheel? Is there anything done already I can make us of? Even though it's still in it's infancy, here is a short demo (under one minute) of my game. Thank you!
  11. RidiculousName

    FXML and CSS in JavaFX

    Would any readers please explain to me the differences between FXML and CSS? I just want to create a basic GUI in JavaFX. For example does one work better on linux? Is one easier to learn than the other? What are their benefits and drawbacks?
  12. Hello, I have problems deciding some design questions. About the game: It's like Anno 1404 but multiplayer only 1) Accessing GUI directly (Object interaction) Should the Notifier has some kind of queue or should I call it directly, because the player expects immediate response. A queue would maybe overkill in things of performance, if it's processor has its loop in the render method/loop. As of writing these lines I doesn't even know why I would have even considert choosing a queue. Searching for a solution to my problems, I came across this article http://gameprogrammingpatterns.com/event-queue.html and it made me thought if it is a good practice or needed for my problems how to wire objects and handle asynchronous tasks and object communication. I don't know, if its a good idea/programming style to let the ActionController do everything as a central station or to let objects do their own eventchain, like trigger a request from the ActionController, the RequestBuilder sends its request directly to the NetworkManager and the NetworkManager can directly call on the GUI. 2) Observe game objects From time to time the client sends a request (carrying the actions done by the player) to the server to get a new update of the gamestate and if the actions are allowed and possible. The server calculates end send back the "cleaned" gamestate. The client receives the approved gamestate from the server and transition/interpolate from it's current state to the ones of the server, like undo not allowed actions with a message in the players notification feed, what was reverted. (not the ones shown in the image above, but an extra one) So there is one observer to observe the overall gamestate and little ones that observe game objects like buildings on the grid, that produce items. Is it good to use a observer pattern here? Can't say why, but my intuition says: Observers for states the player doesn't initiate directly (burning fuel, producing units over time, ...) Listeners for direct actions the player does (pressing a button to login, build a building, move a item on the map, pay for something, trade) A better example: The player wants to research "Ironswords". So he presses the button for this research. The listener notice the event and creates an observer (or subscribe that event to an existing research-observer) which observes the progress over time. If the research is finished after a certain amount of time, a notification is added to the players feed and the event unsubscribes from the observer or the observer is getting killed.
  13. LukasIrzl

    Tales of Vastor - Progress #9

    Tales of Vastor - Progress #9 Content What's done? What's next? Music What's done? Black knight model Another enemy was added to the game - the black knight, one of the late game enemies. Waypoint icons The waypoint icons will help you identify what is waiting on a certain waypoint. Currently, the following ones are designed and configured: The boss icon will be displayed on waypoints, where a boss will occur. So, you might want to buy a few items before getting into the fight. The merchant is located near Udins castle. There, you should stock up a few potions or even buy a new weapon. Last but no least, the temple icon. It displays a temple, where you can save the game and heal all your characters. Status icons Up until now, there was no way to know, which status effects applied to a certain character. Later, the following icons will be displayed, depending on the active statuses. A short explanation to the effects: freeze: Does not allow action choosing for a certain amount or turns. The only good thing about the freeze effect is, that it nullifies the fire effect. fire: Damages the affected character at the start of each turn. If you can not remove the status fast enough, the character might end up dying. If the character is frozen, the fire effect will remove the freeze status. defense up: Raises the defense of the affected character. This status effect is essential to survive certain bosses or even harder fights. lower defense: Will decrease the affected characters defense. You should be careful, if a character has this status applied, because the damage received will increase. New background Here is one of the refactored backgrounds used for fights: This one provides more fog in the background, which shows the depth of the landscape. Lately, I love to put in a little bit of fog to the backgrounds, since it provides so much more life. What's next? This week, I want to focus on the character animations for the playable characters. Up until now, the base animations are already available for every character. Power attack animations, on the other hand, are still missing. They should be complete, as soon as the beta version is released. Alongside with the new animations, a few particle effects have to the created, such as lightnings, status changes and many others. Music I am glad to tell, that the main theme is already composed and others will come soon. Here is the main theme by Andrew LiVecchi: If you missed to check him out on YouTube, be sure to click the link: Youtube.com If you have feedback, you can contact me via mail or direct message whenever you want. Be sure to take a look at Twitter as well, since there will be more frequent updates. Thank you!
  14. I'm sure many of you know Eric Lippert's Blog series: Wizards and Warriors. In it, he has two rules: A warrior can only use a sword. A wizard can only use a staff. Over the series of blogs, he tries to show you how the C# type system fails to implement those rules and what to do about it instead. He suggest the creation of a Rule class, and let the Rule system determine what can happen in the game. You can agree or disagree, that's not the point of my question. I included it because it relates to my bigger question, how would you tell the Rule class or system that the object you're trying to carry is in fact a Sword without instanceof? For my question, lets remove the Rule object and stick with two objects, a Wizard and Sword. A Wizard is a subclass of the abstract Character class and Sword is a subclass of the abstract Weapon class. The Character class will have a method called tryAdd(); public final boolean tryAdd(Weapon weapon){ // Code to add Weapon } At first I thought I would use an enum to determine what object the player is attempting to add to it's inventory. public enum WeaponType { ReloadableWeapon // -- imagine more weapon types } public abstract class Weapon { private WeaponType wt; public Weapon(WeaponType wt) { this.wt = wt; } } public ReloadableWeapon extends Weapon{ public ReloadableWeapon() super(WeaponType.ReloadableWeapon); { } } As pointed out, it violates DRY and is a poor version of instanceof. Okay, fine, the comments suggested a Map or Collection of attributes, even this GameDev link suggested the same thing. So a long the lines of this: public enum GameObjectAttributes{ Replenishable Destructable Health LongBlade ShortBlade Mana Health Potion Indestructible } public abstract class Weapon { private List<GameObjectAttributes> gOAttributes; // imagine a constructor :D. public final boolean containsAttribute(GameObjectAttributes attribute) { // determine if weapon contains a specific attribute. } } Suppose I had a Sword object, and the level of detail allows a Sword to be damaged and broken if hit hard enough, so my Sword object might contain Destructable and LongBlade as attributes. As suggested in this link, this too is a bad idea because I'm using the attributes to determine or carry out behavior with that object. HOWEVER! Isn't this how OOP is supposed to work? I query an object for an answer, in this case true or false and carry out actions with that object? In this case I ask the Weapon, do you have LongBlade as an attribute? If so, the Wizard cannot add it to there inventory. The method doesn't add the weapon and returns false. Problem Even if we were to use a Rule class, at some point, we have to determine what object is being passed to the TryAdd() method, in other words, one object will have to communicate with another object to determine the object type. The link that suggests the attribute collection is a bad idea, says that a Player should implement a tryCarry method, but even that methods needs to decided if the Weapon parameter is a Sword. How then do you make that distinction without instanceof or a variable to decided what to do? Or How do two objects communicate with each other so that one object is aware of the other object type without violating OOP principals? Can someone provide a clean code sample? This problem is getting frustrating to solve because no matter what solution I come up with, someone will point out it's a bad idea, but no one can provide a solid solution to the problem. Even Eric Lippert's blog just suggests a Rule class but no example code of how to implement it. What seems like a simple solution to a problem is ripped apart by veteran developers who are quick to point out something is a code smell or bad code. Sometimes I wonder why bother writing any code at all.
  15. Introducing Jumpaï! A game made using LibGDX. It's been 21 months the game is in development and we just released version 0.3! It's an online game, there's a server running at http://jumpai.net/ and everyone can join! Registering is easy, username password and you are good.The point of the game is to make your own level! There's an easy to use, integrated editor allow you to make your levels and they same automatically on the cloud. You can then join them online to play with your friends. A lot of cool mechanics, portals, powerups, items... Check it out! Trailer: Also, you can join us on discord https://discord.gg/R4ZafEw Screenshots:
  16. thecheeselover

    Unit Vision

    Subscribe to our subreddit to get all the updates from the team! First off, here's a video that shows the unit vision in action : So, what is the unit vision? It's a simple mechanism that notifies a unit when another unit enters its vision field. It also takes into account if the vision is blocked by entities. This is how it is implemented step by step : A cone ghost control is attached to the unit's head All units intersecting with the cone's AABB fire events (AABB because of how Bullet Physics work) Cast a ray towards the visible unit and then adjust the angle so that it fits in the cone If the ray cast touches the supposedly visible unit, then it is truly visible Using the debug view of Bullet Physics in the jMonkey Engine 3.1, we're able to see what the vision cone actually looks like. And when inside the cone we can't see it because of culling. However, we can see the enemy's arm moving, which is a test I did for when a unit see another unit. Behind a box, the enemy does not move its arm because he can't see me. But when I leave my hiding spot, he can see me again.
  17. thecheeselover

    Zone division

    Subscribe to our subreddit to get all the updates from the team! A friend and I are making a rogue-lite retro procedural game. As in many procedural rogue-lite games, it will have rooms to complete but also the notion of zones. The difference between a zone and a room is that a zone is open air whilst a room is not. Rooms are connected mainly by corridors while zones are mostly naturally connected / separated by rivers and mountains. Because we want levels with zones to be generated, we need to tame the beast that is procedural generation. How can we generate each zone itself and also clearly divide them? Until now, I had only been using the Java noise library called Joise, which is the Java community port of JTippetts' Accidental Noise Library. I needed the zone data to be generated with basis function modules, i.e. Perlin noise, but in contrast I needed a more structured approach for the zone division. Joise library does have a cell noise module that is a Worley noise. It looks like this depending on its 4 parameters (1, 0, 0, 0) : Using math modules, I was able to morph that noise into something that looks like a Voronoi diagram. Here's what a Voronoi diagram should look like (never mind the colors, the important parts are the cell edges and the cell centers) : A more aesthetic version : The Worley noise that I had morphed into a Voronoi-like diagram did not include the cell centers, did not include metadata about the edges and was not enough deterministic in a sense that sometimes, the edges would around 60 pixels large. I then searched for a Java Voronoi library and found this one called Voronoi-Java. With this, I was able to generate simple Voronoi diagrams : Relaxed : 1 iteration Relaxed : 2 iterations The relaxation concept is actually the Lloyd's algorithm fortunately included within the library. Now how can I make that diagram respect my level generation mechanics? Well, if we can limit an approximated number of cells within a certain resolution, that would be a good start. The biggest problem here, is that the relaxation reduces the number of cells within a restricted resolution (contrary to the global resolution) and so we need to keep that in mind. To do that, I define a constant for the total number of sites / cells. Here's my code : private Voronoi createVoronoiDiagram(int resolution) { Random random = new Random(); Stream<Point> gen = Stream.generate(() -> new Point(random.nextDouble() * resolution, random.nextDouble() * resolution)); return new Voronoi(gen.limit(VORONOI_SITE_COUNT).collect(Collectors.toList())).relax().relax().relax(); } A brief pseudo-code of the algorithm would be the following : Create the Voronoi diagram Find the centermost zone Selects X number of zones while there are zones that respect the selection criteria Draw the border map Draw the smoothed border map The selection criteria is applied for each edge that is connected only to one selected zone. Here's the selection criteria : Is connected to a closed zone, i.e. that all its edges form a polygon Does have two vertices Is inclusively in the resolution's boundaries Here's the result of a drawn border map! In this graph, I have a restricted number of cells that follow multiple criteria and I know each edge and each cell center point. To draw the smoothed border map, the following actions must be taken : emit colors from already drawn pixels and then apply a gaussian blur. Personally, I use the JH Labs Java Image Filters library for the gaussian blur. With color emission only : With color emission and a gaussian blur : You may ask yourself why have we created a smoothed border map? There's a simple reason for this, which is that we want the borders to be gradual instead of abrupt. Let's say we want rivers or streams between zones. This gradual border will allow us to progressively increase the depth of the river and making it look more natural in contrast with the adjacent zones. All that's left is to flood each selected cell and apply that to a zone map.
  18. Subscribe to our subreddit to get all the updates from the team! Recently I've been tackling with more organic low poly terrains. The default way of creating indices for a 3D geometry is the following (credits) : A way to create simple differences that makes the geometry slightly more complicated and thus more organic is to vertically swap the indices of each adjacent quad. In other words, each adjacent quad to a centered quad is its vertical mirror. Finally, by not sharing the vertices and hence by creating two triangles per quad, this is the result with a coherent noise generator (joise) : It is called flat shading.
  19. I wrote a flood fill algorithm in Java to get the bounds of each sprite in a spritesheet. The problem is that it works fine with some sprites but with the rest of them it doesn't. For example: https://i.gyazo.com/cdbdb0ce40a46445ca8e7b62176ab442.png I put a red square surrounding some of the errors. This is the flood fill method: private static Rectangle floodFill(int[] pixels, int x0, int y0, int width, int height) { Rectangle frame = new Rectangle(x0,y0,1,1); Deque<Point> queue = new LinkedList<>(); queue.addLast(new Point(x0,y0)); while(!queue.isEmpty()) { Point p = queue.poll(); final int x = p.x; final int y = p.y; if(x < 0 || x >= width || y < 0 || y >= height) { continue; } // Is not part of a sprite, or has been visited before if(pixels[x+y*width] == 0) { continue; } pixels[x+y*width] = 0; // Mark as visited // Update bounds if(x < frame.x) { frame.x = x; } else if(x > frame.x + frame.width) { frame.width++; } if(y < frame.y) { frame.y = y; } else if(y > frame.y + frame.height) { frame.height++; } queue.add(new Point(x-1,y)); queue.add(new Point(x-1,y-1)); queue.add(new Point(x-1,y+1)); queue.add(new Point(x+1,y)); queue.add(new Point(x+1,y-1)); queue.add(new Point(x+1,y+1)); queue.add(new Point(x,y-1)); queue.add(new Point(x,y+1)); } return frame; } The flood fill method is called from here: private static List<Rectangle> split(BufferedImage image) { List<Rectangle> sprites = new ArrayList<>(); int[] pixels = ((DataBufferInt)image.getRaster().getDataBuffer()).getData().clone(); final int width = image.getWidth(); final int height = image.getHeight(); for(int y = 0;y < height;y++) { for(int x = 0;x < width;x++) { if(pixels[x+y*width] != 0) { Rectangle r = floodFill(pixels,x,y,width,height); sprites.add(r); } } } return sprites; } What it does is visit each pixel, and if it is not equal to zero (background color), then it is a sprite, and the flood fill method gets it bounds. I have searched for a solution and I've tried many times with different implementations but I couldn't found a solution. Can someone help me? I think I am missing something but I can't see it. Thanks!
  20. So im starting to build game for me and my friend to play but if it ends up good then i want it to be easily expandable. My question is ... Where do i learn how to set up a server? how to run code on my server? how do you open your server to the outside world. Not only your home/pc. I want to program my server in java because i'm fairly comfortable with java. I've decided i want a tcp server. Do i need separate server to handle log-ins, registers etc.? I've done a lot of googling and i still can't find any decent tutorials.
  21. LukasIrzl

    Tales of Vastor - Progress #5

    Tales of Vastor - Progress #5 Content What's done? What's next? Updated alpha version What's done? Cloud shadows on world map You may have noticed on Twitter that the world map in now covered with cloud shadows. It definitely looks better now. What do you think? New wand for the mage class The alpha version focused on the knight as a playable character. In order to balance Tales of Vastor for other classes as well, the mage got a new weapon - the iron wand. This mystic weapon is a special one, because it is only given to mages of higher ranks. If you got lucky, you may get one as well. Optimized game state handling Until now, there was no information, whether the game state is used or not. In order to make it more transparent, the players name will be shown. Additionally, to the players name, there is a confirm dialog, if you want to override the previously saved game state. Fixed button positioning in main menu A friend on mine told me, that there was an issue with resolutions > 1920 x 1080. In the main menu, the menu buttons were not visible, preventing players to start a game. Now, the buttons will be shown in the lower left corner and will be visible regardless of your resolution. Gold display in inventory Of course, gold is one of the most important things in Tales of Vastor. In order to know the amount of gold collected, there is a gold field in the inventory. What's next? more bandit animations more bandit boss animations a new playable character Update alpha version I created a new alpha version as well today. It contains a few bug fixes and new features. Be sure to check out the last progress updates to know, what was added. Get the alpha here. If you have feedback, I would really appreciate reading it. You can contact me via mail or direct message whenever you want. Be sure to take a look at Twitter as well, since there will be more frequent updates. Thank you!
  22. I recently transferred to a new college that teaches Java as part of it's Computer Science core classes. I've heard Java isn't that great when it comes to making games, and I was wondering what its weaknesses are compared to more popular game-creation languages, and if any of its weaknesses have a work-around of some sort. Specifically, I'm interested in Artificial Intelligence and Procedural Generation.
  23. Nico Aaron Studt

    Tamago 2

    https://play.google.com/store/apps/details?id=com.copycat.tamago2
  24. Hi, I want to present my game called "Stick Bunny" – arrcade game in which you have to help Bunny to go from one platform to another. Download from here: https://play.google.com/store/apps/details?id=com.threemgames.stickbunny Youtube video gameplay: Funny Bunny wants to go from one platform to another. Use stick and help Bunny. Stick can increase the length. Be careful, if the stick is too long Bunny will be knocked and if it is too short Bunny will fall down. Try to go as far as you can. Collect carrots and exchane them for new characters of Bunny. Tap the screen to change size of the stick. Are you ready to reach 100 platforms or mayby you want to go even farther? So tap the screen, join platforms with sticks, and collect carrots. It is FREE! I am waiting for your comments. Please, give me feedback. If you notice any bugs please tell me. Thanks !
  25. Today, I finally finished the following features : Add new solid voxels at the selected position Destroy voxels at the selected position Generate chunks on the fly Remove chunks on the fly Here is a video demonstrating those features :
  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!