game-development

Implementing BFS in Java

萝らか妹 提交于 2019-12-05 03:27:39
I am a beginner in Java, and I need some help. I am trying to implement Breadth First Search algorithm to solve a puzzle game (Unblock Me a game on Android). I am done with the GUI, but I am stuck with the algorithm. So far I can count the available moves of each block, which supposed to be the children nodes of the root node. Each node (linkedlist) has the position of each block, and all the nodes are being stored in a Set. What I need now is to mark each node as visited, so I don't get into an infinite loop. I would appreciate any kind of help, and please correct me if I am mistaken with

Java JProgressBar using Image

醉酒当歌 提交于 2019-12-04 15:09:05
I am making a game in Java, and I am using a JProgressBar for a health bar. I want to use an image (instead of colours) for the JProgressBar , but I have not been able to do it. I have tried using the paint method, paintComponent method, making a new class, but it's not working. May someone please help me? MadProgrammer Without going to the extent to creating your own ProgressBarUI implementation, you could simply create your own... This example essentially makes a "bar of potions" out of a single potion image and then renders a sub image based on the current progress. It wouldn't take much to

How do I use applyLinearImpulse based on rotation in Corona / Lua

家住魔仙堡 提交于 2019-12-04 13:06:46
I am using the Corona Gaming Addition SDK to build an iphone / andorid game. I have a space ship on the screen and I will allow the user to rotate the ship 360 degrees. I would like to then call the applyLinearImpulse method to allow the user to thrust the ship forward in the direction the ship is facing. The method accepts these arguments witch are applied to the ships X and Y in order to move the ship to the new destination. The trick is to figure out what the new X and Y needs to be based on rotation / direction the ship is pointing. ship:applyLinearImpulse(newX, newY, player.x, player.y)

Xbox one dev mode and Unity free version

南楼画角 提交于 2019-12-03 15:15:54
I have a retail Xbox one console with Dev Mode activated Unity (latest free version) and a MSDN individual developer account. I am able to deploy test apps from Visual studio on the Xbox however i want to know how do i build and run apps on Xbox from Unity? I contacted unity and they said i need approval from my account manager however I'm an individual developer. What I want to do is deploy from Unity to Xbox one I'm running parallel from a Mac (Windows 10 version) but Unity is installed on my Mac. After some research here is a way to run a Unity built app on a retail XboxOne Developer

Reading Console Buffer / Output C++

雨燕双飞 提交于 2019-11-29 07:54:56
My question is quite simple, but the solution seems absolutely impossible for me to find. I have a dedicated game server (JEDI ACADEMY JAMPDED), which is a console application. It writes some information continously and I want to handle the data somehow. It would be easy if I could read the output of it with external. Problem: It does not write to Standard Output, so can't be piped with batch file and popen does not work also. So I wanted to do with WINAPI. I was able to create the process, but still can't read the output. I tried these: How do I call ::CreateProcess in c++ to launch a Windows

How to make a server discoverable to LAN clients

谁说我不能喝 提交于 2019-11-29 00:15:36
I am working on a multiplayer game in python that uses the socket library for its networking. The game will support play over LAN. One player will set up the server and other players on the LAN will be able to join the game. To implement this, I need a simple way for the players to discover a list of available servers (players shouldn't be expected to have to enter IP addresses!). My preferred solution would use only the python socket library (and optionally other parts of the standard library). What I am looking for is client and server code: client: broadcasts its request for games to all

php game, formula to calculate a level based on exp

旧时模样 提交于 2019-11-28 16:53:05
问题 Im making a browser based PHP game and in my database for the players it has a record of that players total EXP or experience. What i need is a formula to translate that exp into a level or rank, out of 100. So they start off at level 1, and when they hit say, 50 exp, go to level 2, then when they hit maybe 125/150, level 2. Basically a formula that steadily makes each level longer (more exp) Can anyone help? I'm not very good at maths :P 回答1: Many formulas may suit your needs, depending on

Using javax.sound.sampled.Clip to play, loop, and stop multiple sounds in a game. Unexpected Errors

让人想犯罪 __ 提交于 2019-11-28 07:51:13
I'm trying to play two wav sounds at once during a game (Background Music and an effect). I first constructed this chunk of code using another audio handler in java which would handle the playing, stopping, and looping of the sound. This construct would play the background music or effect but only one at a time. I looked around the internet and was told to use javax.sound.sampled.Clip to handle the sounds so reused the same construct(play, stop, loop) but switched it to use javax.sound.sampled.Clip. Now I'm completely lost. From what I have read so far I've done everything correct and get no