• 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

  • News

Categories

  • Audio
  • Visual Arts
  • Programming
  • Writing

Categories

  • GameDev Unboxed

Categories

  • Game Dev Loadout

Categories

  • Game Developers Conference
    • GDC 2017
  • 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
  • Topical
    • Virtual and Augmented Reality
    • News
  • Community
    • GameDev Challenges
    • For Beginners
    • 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
  • Workshops
    • C# Workshop
    • CPP Workshop
    • Freehand Drawing Workshop
    • Hands-On Interactive Game Development
    • SICP Workshop
    • XNA 4.0 Workshop
  • Archive
    • Topical
    • Affiliates
    • Contests
    • Technical

Calendars

  • Community Calendar
  • Games Industry Events
  • Game Jams

Blogs

There are no results to display.

There are no results to display.

Marker Groups

  • Members

Developers

Developers


Group


About Me


Website


Industry Role


Twitter


Github


Twitch


Steam

Found 57 results

  1. Hi, so I have this game which I'm working on and I have implemented A* pathfinding algorithm, but the problem is that the game framerate drops significantly if there are more than 50-100 enemies which need to find path to player. I did some code analyzing and noticed that the part which takes longest to process is part where it searches for node with the lowest F score. Is there anyway I could speed the process up? Here's the code I'm using: public ArrayList<Node> getPath(Node start, Node end){ closedSet.clear(); openSet.clear(); openSet.add(start); cameFrom.clear(); start.gScore = 0; start.fScore = heuristicCostEstimate(start, end); while(openSet.size() > 0){ Node currentNode = lowestFScoreNode(openSet);//openSet.findLowestFScoreNode(); if(currentNode.equals(end)){ return reconstructPath(cameFrom, currentNode); } openSet.remove(currentNode); closedSet.add(currentNode); Node [] neighbours = getNeighbours(currentNode); for(int i = 0; i < neighboursCount; i++){ if(closedSet.contains(neighbours[i])) continue; openSet.add(neighbours[i]); float tentativeGScore = currentNode.gScore + heuristicCostEstimate(start, neighbours[i]); if(tentativeGScore >= neighbours[i].gScore) continue; cameFrom.put(neighbours[i], currentNode); neighbours[i].gScore = tentativeGScore; neighbours[i].fScore = neighbours[i].gScore + heuristicCostEstimate(neighbours[i], end); } } return null; } The lowestFScore node function just returns result of Collections.min() Thanks in advance.
  2. Hi I am having this problem where I am drawing 4000 squares on screen, using VBO's and IBO's but the framerate on my Huawei P9 is only 24 FPS. Considering it has 8-core CPU and a pretty powerful GPU, I don't think it is not capable of drawing 4000 textured squares at 60FPS. I checked the DMMS and found out that most of the time spent was by the put() method of the FloatBuffer, but the strange thing is that if I'm drawing these squares outside of the view frustum, the FPS increases. And I'm not using frustum culling. If you have any ideas what could be causing this, please share them with me. Thank you in advance.
  3. I am trying to figure out a good component design for my item classes since otherwise it probably ends up in a hierarchy disaster. I will just be just using this to define my items in a data driven way. My items do not have a position or interact with the map, they are either on a character or on a tile in the map and that is where they are stored. So I created a blank interface and a couple implementations, nothing is set in stone but I think my concept is pretty solid and I'm looking for feedback from people with more experience on the topic since it would not be the first time I burry myself into something I cannot climb out of :). public interface ItemComponent { } public class WeaponComponent implements ItemComponent{ int damage; int range; float attackSpeed; String damageType; } public class ArmorComponent implements ItemComponent { int defense; String armorType; String bodyPart; } Easy enough, like most component systems they only add data the system in my case are the characters using the items, I could add functionality but that will probably complicate things once more components are added. When the character uses any item with the corresponding component I have access to the data, and that is all I currently need. A shield that could also be used as a weapon should be easy to model in. To know and find a specific type of item I implemented a Map that maps a String to a ItemComponent. public class Item { private String name; private int weight; private Map<String, ItemComponent> itemComponents = new HashMap<>(); public Item() { } public void addComponent(ItemComponent component) { itemComponents.put(component.getClass().toString(), component); } } A basic item that is used for crafting only would not have any components. For easy lookup I added a couple methods. public boolean hasComponent(Class c) { return itemComponents.containsKey(c.toString()); } public boolean isWeapon() { return hasComponent(WeaponComponent.class); } public boolean isArmor() { return hasComponent(ArmorComponent.class); } To instantiate items I will import all JSON data in a Factory pattern and clone the items. Since crafting is a thing I will add another Map to this that maps the items name to the recipe. public Item clone() { return new Item(name, weight, itemComponents); } public class ItemPrototype { private Item item; private Recipe recipe; public Item cloneItem(){ return item.clone(); } public Item createItem(List<Item> ingredients) { // Todo: Check ingredients. // Todo: Remove ingredients. return cloneItem(); } } public class ItemFactory { private static Map<String, ItemPrototype> itemPrototypes = new HashMap<>(); static { // Todo: Import items from JSON } public static Item createItem(String name, List<Item> ingredients) { // TODO: Error handling return itemPrototypes.get(name).createItem(ingredients); } public static Item createItem(String name) { // TODO: Error handling return itemPrototypes.get(name).cloneItem(); } } Here is how an item would look inside a JSON file. A simple rock would truncate everything except for it's name and weight unless it I decide it can be used as a weapon too. "Rifle" : { "item" : { "name" : "Rifle", "weight" : 3500, "itemComponents" : { "WeaponComponent" : { "damage" : 18, "range" : 20, "attackSpeed" : 10.0, "damageType" : "Piercing" } } }, "recipe" : { "ingredients" : { "Wood" : 1, "lense" : 1, "Steel Plate" : 4 } } } I love to hear what more experienced people have to say about this. There are not much examples to look at on internet except for a couple that go all the way down to engine level where basically everything is a entity. If I have success with this structure I definitely write a article about it.
  4. Zone division

    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.
  5. Borbudo! What do you think?

    Hi folks, During a recent leave of absence for family reasons, I needed something to take my mind off my troubles. So I decided to learn Android development and create a game I've always wanted to play. "Borbudo" is available on the Google Play Store at: https://play.google.com/store/apps/details?id=com.borbudo.free Very briefly, Borbudo is inspired by the old 80s games Time Bandits and Gauntlet, and in the future I hope to include lots of puzzles and quests in the spirit of Dungeon Master. Right now I confess that the game needs some re-work to create a unifying theme, but I think the alpha version available now is pretty solid. My game also features the music of Eric Matyas. I'd very much appreciate any comments (or even Patreon pledges). With many thanks, Rob Lehrbass
  6. Hello, im looking for some feedback about my latest experiment . You can find it here : http://www.honny.net/hexnet But please before to do that take some minutes to read what follow. In all my previous projects i have always used C language ( C not C++ ), yes i am a very old person. Some time ago I felt the need to “evolve” in some way, I cant say why exactly. To be honest in C i have always been able to find a way to solve a problem by myself or a library for a specific task. Of consequence all this stuff about OOP and Classes was really new to me. To test this experience i have used Processing. From what i have understood this was the fastest ( and easiest ) way to setup this kind of project. Well, if you are reading this you have already understood that this is not really a "complete game", just a minimalist minesweeper-like similar to the "mini hack" sub-games that you can find in major titles. Keep in mind that the main goal was to make some experience with basic stuff like : setup a project learning OOP and Classes basic drawing and images loading handling user input etc... UPDATE 11/02/2018 : updated new game version and added some screenshots !!! UPDATE 03/02/2018 : now it exist AT LEAST a path to complete the game :-)
  7. Hello everyone, This is going to be my first blog here and I would like to start by introducing you to my new project on which I already worked for over 2 weeks. In these two weeks I implemented joystick system, created a custom map creation tool, added collision detection and pathfinding, programmed simple quest system and much more. The game is written in Java and OpenGL. Here are some screenshots and a video: https://www.youtube.com/watch?time_continue=1&v=LqYiXptAIRI
  8. This is linked to another question that I asked here a couple of days ago: I'm looking at making a client-server game with a game server programmed in Java. The game will be a 2D turn-based game (like a board game), with a maximum of around 50-100 games going on at any one time. So, the performance requirements are not very high. The reason I would like to use Java for the server are because I already have some familiarity with it and I would like the server to not be tied to one particular platform. I would also like to design it so that the client interface to the server is as generic as possible, so that the same server could be used with multiple different clients. For example, there might be a web-based client, or someone else might design a stand-alone 3D client application later on, using the same server. So, I am looking for some advice on where to start with this, as I have very little experience with coding servers. I was planning to use web sockets for the client-server connection, which apparently uses Java EE (Enterprise Edition), which seems to require the use of the GlassFish server. However, I have been advised that a fully-fledged application server, like GlassFish, may be overkill for a game server. So, here are my questions: Should I use something like GlassFish? Does it makes sense for the type of game server I am describing? If not, then what sort of networking protocol/library would experienced Java game designers recommend? Are there any existing, general-purpose Java game servers that exist, which I might be able to use as a starting point? (Or even free software/open-source client-server games?) Or, should I look at coding my own game server from scratch? In which case, again, what sort of connection type/library would be recommended? Does anyone know of any suitable introductory tutorials that deal with how to make this sort of game server in Java? I guess my priority is probably minimizing the learning curve and the amount of time/effort involved, over performance. How much effort is this sort of undertaking going to require? Thanks in advance! :-)
  9. G'day folks! I'm a Java developer looking for a team to work with on a hobby project. I've worked on small personal projects in the past (as well as non-games at work), and I'm looking for the opportunity to work on something bigger than what I could do alone. I have experience with libGDX, but am willing to explore other libraries/frameworks. A small demo game I worked on a while back is on github: https://github.com/madigan/merchant
  10. I have been working on a collision engine in Java, utilizing the Separating Axis Theorem in 3D space. I have it working successfully in all cases (that I could think of testing) with object-oriented bounding boxes, but I'm finding that SAT isn't super accurate at detecting collisions as immediately with other convex 3D polygons. Corners of rotated polygons may overlap a small amount before any valid collision is found, and the subsequent clipping algorithm I use to calculate contact points will fail. I'll highlight the main points on my current SAT implementation below, and I'd just like to get some feedback to see if I was on the right track with this or if I'm fundamentally missing something in the theory. Trying to refrain from pasting code since its moderately long. Do note that I am using object models imported from Blender in wavefront.obj files, so I'm using the vertex normals in these files to populate my collision bodies in simulation. I'm not sure if that could cause issues with ordering or normal calculations. Input two collision bodies (BodyA, BodyB) Calculate distance between the centers of bodyB and bodyA (the offset) for each face normal (axis) in bodyA: - Project the vertices of both bodyA and bodyB along this axis to get the 2D minimum and maximum projections along that direction - add offset to projection of bodyA - check for overlap along the projections of both bodies, exit the separating axis test if their is no overlap along this projection as this is a separation. Otherwise continue the loop. for each face normal (axis) in bodyB: - Project the vertices of both bodyA and bodyB along this axis to get the 2D minimum and maximum projections along that direction - add offset to projection of bodyA - check for overlap along the projections of both bodies, exit the separating axis test if their is no overlap along this projection as this is a separation. Otherwise continue the loop. for each face normal in bodyA (axisA): - for each face normal in bodyB (axisB): - - get the cross product of axisA and axisB (axis) - - Project the vertices of both bodyA and bodyB along this axis to get the 2D minimum and maximum projections along that direction - - add offset to projection of bodyA - - check for overlap along the projections of both bodies, exit the separating axis test if their is no overlap along this projection as this is a separation. Otherwise continue the loop. Most SAT resources I have read seem to be concerned with AABB or OBB collision and don't care for more complex polygon shapes so any resources you might know of that deal with a more general 3D SAT implementation would be a great help. Thanks.
  11. Hello. I'm trying to make an android game and I have come across a problem. I want to draw different map layers at different Z depths so that some of the tiles are drawn above the player while others are drawn under him. But there's an issue where the pixels with alpha drawn above the player. This is the code i'm using: int setup(){ GLES20.glEnable(GLES20.GL_DEPTH_TEST); GLES20.glEnable(GL10.GL_ALPHA_TEST); GLES20.glEnable(GLES20.GL_TEXTURE_2D); } int render(){ GLES20.glClearColor(0, 0, 0, 0); GLES20.glClear(GLES20.GL_ALPHA_BITS); GLES20.glClear(GLES20.GL_COLOR_BUFFER_BIT); GLES20.glClear(GLES20.GL_DEPTH_BUFFER_BIT); GLES20.glBlendFunc(GLES20.GL_ONE, GL10.GL_ONE_MINUS_SRC_ALPHA); // do the binding of textures and drawing vertices } My vertex shader: uniform mat4 MVPMatrix; // model-view-projection matrix uniform mat4 projectionMatrix; attribute vec4 position; attribute vec2 textureCoords; attribute vec4 color; attribute vec3 normal; varying vec4 outColor; varying vec2 outTexCoords; varying vec3 outNormal; void main() { outNormal = normal; outTexCoords = textureCoords; outColor = color; gl_Position = MVPMatrix * position; } My fragment shader: precision highp float; uniform sampler2D texture; varying vec4 outColor; varying vec2 outTexCoords; varying vec3 outNormal; void main() { vec4 color = texture2D(texture, outTexCoords) * outColor; gl_FragColor = vec4(color.r,color.g,color.b,color.a);//color.a); } I have attached a picture of how it looks. You can see the black squares near the tree. These squares should be transparent as they are in the png image: Its strange that in this picture instead of alpha or just black color it displays the grass texture beneath the player and the tree: Any ideas on how to fix this? Thanks in advance
  12. Hi i'm trying incorporate sounds into my game and I have ran into troubles with performance. Whenever I call: soundPool = new SoundPool.Builder().setAudioAttributes(new AudioAttributes.Builder().build()).build(); I immediately notice lagging and the framerate drops drastically. I don't even have to actually play the sounds for the framerate drop to occur. Is there anything I can do to fix this issue? Thanks in advance. P.S. Never mind, I figured out that restarting the phone got rid of the lagg and it wasn't because of the sound.
  13. Jumpaï is a game about creating platformer levels and playing them online with everyone. Will you become the most popular level maker or will you be a speedrunner holding world records on everyone's levels? More into casual play? No problems! You can happily play through the giant level database or chill at people's hub. Meet new people, make new friends, learn to master the game by asking pros or ask for people's favorite tricks on level making. Unlike other games of its genre, Jumpaï is about playing levels with everyone in real time. You have the fun to see how other people are playing and get to realize you are not the only one failing that jump! The game is currently into development and still have lots to do. I am looking for people willing to help how they can. Developer? Graphist? Play tester? Sound designer? Game designer? I'm welcoming everyone. The project is so big I have a lot of work to do in all areas. Server backend, UI/UX, Game networking, Gameplay and even the website some day. As you can see from the default buttons, the game has been made with LibGDX. If you plan to take an important role into the development of the game, we will discuss how you will get paid once the game generates money. Note that I'm not working on the game full-time. I'm studying full-time and working on it is a hobby. It's been 14 months since it started.So, are you interested? If so join me on my discord https://discord.gg/dwRTNCG and I'll answer all your questions.Additionnal screenshots:
  14. Hi, I'm currently working on a 3D game multiplayer. I really need to save the data some where save so players can not edit it from there own computer. Is there any way how i can make that it is saved like in a database or something also they need have accounts then so they save data for an account. So when the game first starts up they first need to sign in or create a new account. Is there anyway i can do this on youtube there are only videos that explain how to save data for singelplayer games, i use LWJGL for all my code so i hope its possible. (I'm a bit new to LWJGL i coded before but never in this big off sorts so please do not be to hard on me :D)
  15. Hey guys, I recently made this post, I recommend skimming for a quick gist and look at the results at the bottom of the post : (I felt that post misrepresents what I've turned the language into as of right now, so here's this post.) Where I described my proposition for a language to replace CSS (for good reasons, in my view). Well I've gone ahead and create a Jar for it, and a GitHub wiki with a syntax specification (I recommend reading that instead of the syntax in the post I linked), and a quick-start guide to start making your own UX Library compatible with the language, if you want something a little less... shipoopi to work with. More organized, and robust. Here is the GitHub for anyone who is interested: https://github.com/BetterBe/Kiss-lang/wiki
  16. Starting game dev with Java

    Hey guys, I am totally new to game dev and member here since today. I have been learning Java since 3 years now in school and have not done any bigger projects, but now i want to make the next step and start to develop a little game. Although i got a lot of ideas, i am not sure about a lot of basic game specific questions and i would appreciate it if you helped me there. The game should be about an shift supervisor at a nuclear power plant, that has to deal with problems like replacing the fuel rods (where some complications could show up), an automated reactor shutdown or a generator on fire. I am not exactly sure how deep and real life compliant this game should be, but at least more realistic than just adjust the amount of coolant and how deep the control rods are in the water. The second problem here is that i have so many ideas that it would have more content than any game on the market and i can not decide what to include to my project. Another point where i am not sure are the graphics (I heard that coding the game functions has prior 1 and the graphics should be done when the game functions are already working), I think 2d graphics would be easier to do, sure there are engines for 3d, but i have no experience with them and i do not instantly want to do a game with AAA graphics. Then i remembered the game X-COM: UFO Defense and i guess that type of graphic would be totally enough for my little simulator but i have no idea about the difficulty of making this (My only graphical experience is Window Builder). So there should be the control buttons and levers on the bottom of the interface, in the middle displays and the lights that you have to react to and on the upper side i would like to give a very very small and basic overview (more for your eyes than with real purposes) about your power plant where you for example can see smoke coming out of the cooling tower or a small fire burning down your transformer. What do you think about my idea, what should i change, what do you think about my problems? General feedback would be great as well. And no i do not want to learn C and do this in C, i want to do it with Java And sorry if my English is not the best, it is not my mother tongue.
  17. The title is vague, so I'll explain. I was frustrated with UI dev (in general), and even more-so when working with a application that needed OpenGL with embedded UI. What if I wanted to make a full application with OpenGL? (Custom game engine anyone?) Well I did want to. And I'm working on it right now. But it started me onto making what I think is a great idea of a styling language; I present KSS (pron. Kiss) The multitudes more programmable version of CSS.... (only for desktop dev) /* It has all the 'normal' styling stuff, like you'd expect. */ elementName { /*This is a styling field.*/ font-color: rgb(0,0,0), font: "Calibri", font-size: 12px } .idName { color: rgba(255,255,255,0) } uiName : onMouse1Click{ color: vec3(0,0,0) } BUT It also has some cool things. I've taken the liberty to add variables, templates (style inheritance), hierarchy-selection, events (as objects), native function calls, in-file functions. var defaultColor: rgb(0,0,0) var number : 1.0 /*Types include: rgb, rgba, vec2, vec3, vec4, number, string, true, false, none (null), this*/ fun styleSomeStuff{ .buttons{ color: defaultColor, text-color: rgb(number,255,number) } } template buttonStyle{ color: rgb(255,255,0) } .buttons{ use: buttonStyle, otherTemplateName /*copies the templates styling field*/ color: defaultColor; } .buttons : onMouse1Click{ /* events not assigned as a value are initialized when read from file*/ styleSomeStuff();*/* call the in-file function*/ *nativeFunctionCall();/*call a native function that's binded*/ var a : 2; /*assign a variable, even if not initially defined.*/ } /*storing an event in a 'value' will allow you to operate on the event itself. It is only ran when 'connected', below.*/ val ON_CLICK2 = .buttons : onMouse2Click{ use: templateName } connect ON_CLICK2; disconnect ON_CLICK2; /*you can make a function to do the same.*/ fun connectStuff{ connect ON_CLICK2; } But wait, you ask... what If I need to select items from a hierarchy? Surely using element names and id's couldn't be robust enough! Well: /*We use the > to indicate the item next element is a 'child' to itemA in the hierarchy*/ itemA > itemAChild : onMouse1Click{ } .itemId > .itemAChild > itemAChildsChild{ } /*want to get all children of the element at hand?*/ elementName > .any{ /*this will style all the elements children*/ } /*What about if we want to use conditional styling? Like if a variable or tag inside the element is or isnt something?*/ var hello : false; var goodbye : true; itemA [var hello = false, var goodbye != false] { /*passes*/ } itemA [@tagName = something]{ /*passes is the tag is equal to whatever the value u asked.*/ } The last things to note are event-pointers, how tagging works, 'this', and general workflow. Tagging works (basically) the same as Unity, you say @tagName : tagValue inside a styling field to assign that element a tag that's referable in the application. You have the ability to refer to any variable you assign within the styling sheet, from say.. source-code. The backend. As such, being able to set a variable to 'this' (the element being styled) allows you to operate with buttons who are currently in focus, or set the parent of an item to another element. All elements are available to use as variables inside and outside the styling sheet, so an event can effectively parent an element or group of elements to a UI you specify. Ill show that in a figure below, Event pointers are so that you can trigger an event with a UI component, but affect another, below- /*We use the -> to point to a new element, or group of elements to style.*/ .buttons : onMouse1Click -> .buttons > childName{ visible : false parent: uiName; } /* In this case, we style something with the name "childName" whos parented to anything with the id 'buttons'. Likewise, we if there was a element with the name 'uiName', it would parent the childName element to it. */ Lastly: The results/workflow. I'm in the process of building my first (serious) game engine after learning OpenGL, and I'm building it with Kotlin and Python. I can bind both Kotlin and Python functions for use inside the styling sheet, and although I didn't show the layout-language (cause its honestly not good), this is the result after a day of work so far, while using these two UI languages I've made (In the attachments.) It's also important to note that while it does adopt the CSS Box-model, it is not a Cascading layout. That's all I had to show. Essentially, right now Its a Kotlin -backed creation, but can be made for Java specifically, C++, C#, etc. I'm planning on adding more into the language to make it even more robust. What's more, it doesn't need to be OpenGL backed- it can use Java paint classes, SFML, etc etc. I just need to standardize the API for it. I guess what I'm wondering is, if I put it out there- would anyone want to use it for desktop application dev? P.S. Of course the syntax is subject to change, via suggestion. P.S.[2] The image in the middle of the editor is static, but wont be when I put 3D scenes in the scene-view.
  18. Hi, I want to present my game called "246! Fast counter" - an engaging mathematical challenge! Add quickly and train your brain! Download from here: https://play.google.com/store/apps/details?id=com.threemgames.a246fastcounter Youtube video gameplay: Use math and sum up numbers to get the right result. The correct result gives you more time for further mamtematic operations. Do not let the numbers fill all the free fields, because it will be the end of your adventure with math. Act and add numbers quickly to get the right amount. Look for numbers in the borders and use them for adding - this will allow You to unlock more fields and get even more time. Collect as much as possible points - be simply the master of summation and the hero of mathematics! Train brain every day to be even better in mathematics. It is FREE! I am waiting for your comments. Please, give me feedback. If you notice any bugs please tell me. Thanks !
  19. I'm looking to add some new experience so I can get better at development, so I'm looking to join a team. I'm great with retro pixel art, even better with reference images (below is an example of my pixel art work), and I just started learning about mobile development. More specifically, Android Studio, though I am trying to expand my horizons. I have great programming experience, and am versatile. I took one year of C++ at my school, and studied Java independently. I'd like to find a team to join that's working on a 2D pixel art game for Android phones.
  20. how to make game in java swing

    Hi everyone. My name is Sang and I am a student in primary school. I studied Java and i am really like it. and now I want to learn make game a game use Java in Java Swing. Would you like give me some websites teach make game java for begginers, please? Thank you very much!
  21. i created 10 more programming tutorial videos about how to use my game framework. https://www.youtube.com/channel/UCVytGTIkZpg6m_WYmA_77Iw/playlists i hope this will help people develop games and learn game programming in general. if you have any feedback i would love to hear about it.
  22. Marching cubes

    I have had difficulties recently with the Marching Cubes algorithm, mainly because the principal source of information on the subject was kinda vague and incomplete to me. I need a lot of precision to understand something complicated Anyhow, after a lot of struggles, I have been able to code in Java a less hardcoded program than the given source because who doesn't like the cuteness of Java compared to the mean looking C++? Oh and by hardcoding, I mean something like this : cubeindex = 0; if (grid.val[0] < isolevel) cubeindex |= 1; if (grid.val[1] < isolevel) cubeindex |= 2; if (grid.val[2] < isolevel) cubeindex |= 4; if (grid.val[3] < isolevel) cubeindex |= 8; if (grid.val[4] < isolevel) cubeindex |= 16; if (grid.val[5] < isolevel) cubeindex |= 32; if (grid.val[6] < isolevel) cubeindex |= 64; if (grid.val[7] < isolevel) cubeindex |= 128; By no mean I am saying that my code is better or more performant. It's actually ugly. However, I absolutely loathe hardcoding. Here's the result with a scalar field generated using the coherent noise library joise :
  23. 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.
  24. Java Java Network Library

    Hello everyone! I have a GitHub repository on which I'm developing a Open Network Library for Java Developers and I'd like to share it so more people come in and contribute. Till now the repo is being developed only by me so the library is not 100% bug free. I'd really like this repo to be famous and got people working on it! [You will find more information in the repo] Here's the link for the repo: https://github.com/giannismarinakis/java-open-nl Thanks!
  25. I'm currently remaking a game I made a few years back using Slick2D (as opposed to Swing/AWT, which was a terrible idea). I've fleshed out a lot of the background architecture, but I'm starting to run into issues with my architecture and I'm not sure how to proceed. The game I'm making is an overhead shooter. It's wave-based, with hordes of zombies coming at you. There are 10 weapons to choose from. Specifically, my latest issue is with a particular "weapon" I'm designing; the Laser Barrier. In the previous game, I had a "Laser Wire" weapon, which when two terminals were placed on the ground, created a wire made of laser on the ground that would damage enemies that passed through. Problem was that it didn't do enough damage in the short time that the enemies would be colliding with it for it to be of any use, so it was a waste of money. In the remake, I'm instead creating the "Laser Barrier", which visually looks the same, but instead of damaging enemies that touch it, it will act as an obstacle that enemies can't walk through. The enemies damage the shield while they are in contact with it until the laser barrier collapses. Projectiles however, can still pass through the barrier, allowing the player, and certain enemies, to shoot through them. The issue I'm running into, though, is the method of communicating between the Laser Wire itself and the enemy touching it. I'm currently able to detect a collision between the enemy and wire projected between the two laser terminals, but I'm not sure how I can implement the actual movement blocking part. It would take too much text to explain how it works, so here are the relevant files in my project: Player class - the checkProjectiles() method on line 344 is where the game loop checks for collisions between the player's weapon projectiles and the an enemy passed as an argument. On line 350, you can see that when there is a collision between the enemy and the LaserNode object (collision method is linked below), the laser node takes damage so that it will eventually be destroyed. I figured this is where the "movement blocking" should be, as I have access to the terminal and the enemy, and this is where a collision is confirmed. LaserNode class - this is the class representing the laser terminals on the ground that project the laser beam between them. The checkCollision() method on line 57 is used to determine if the enemy is touching either of the terminals, or if it is touching the beam itself. Enemy class - this is the base class for all game enemies. You can see what methods are available to all enemies, so perhaps this can provide some insight into what could be done to communicate with the LaserNode. I realize it's a lot to ask considering the scope of my project, but could someone give me an idea of how to communicate between the LaserNode and Enemy so that the enemy knows not to move when touching the LaserNode? The only methods I can think of seem cumbersome and it seems like I'd be adding a lot to the Enemy class just to get this one feature working. I'd love to script these weapons with LUA, but I never learned how to integrate a scripting language into my game architecture. I also have limited experience writing game engines, so I'm sure there's a lot of refinement that could be done to make my game architecture less restricting. I don't expect anyone to actually comb through my project and make suggestions, but I would super appreciate it.
  • Advertisement