Author Topic: Preview - Gladiator management game  (Read 2890 times)

0 Members and 1 Guest are viewing this topic.

Offline Deque

  • P.I.N.N.
  • Global Moderator
  • Overlord
  • *
  • Posts: 1203
  • Cookies: 518
  • Programmer, Malware Analyst
    • View Profile
Preview - Gladiator management game
« on: August 10, 2013, 02:44:44 pm »
Hello EZ.

I started to code a gladiator management game. The fighting stage is now playable.
You are the left gladiator and have to fight the one on the right side.



I painted all sprites by myself except for the background. I will replace it later with my own painting.

Starting the program:

Extract Gladiator.zip. In Windows run start.bat, in Linux run start.sh.
On MacOS use your terminal and type: java -Djava.library.path=./gladiator_lib/native/macosx -jar gladiator.jar
For Solaris exchange macosx with solaris in the path.

Controls:

You will get into a basic inventory screen which I made for testing. Drag and drop the item you want to the character and press enter to start the fight.

space - attack
lctrl - block
enter - restart fight
arrow keys - walk

Code: https://github.com/katjahahn/Gladiators
LOC: 1439
Download program: http://uppit.com/elem168tqcly/Gladiator.zip

Tell me your impressions.
« Last Edit: August 13, 2013, 11:14:50 am by Deque »

Offline Kulverstukas

  • Administrator
  • Zeus
  • *
  • Posts: 6627
  • Cookies: 542
  • Fascist dictator
    • View Profile
    • My blog
Re: Preview - Gladiator management game
« Reply #1 on: August 10, 2013, 05:22:47 pm »
What can I say. +1 for the effort but -1 because it crashed my system.
I'm running winxp SP2 and everything was fine, except for the huge delays (about a second or two) when you drop stuff on your gladiator. When I pressed Enter to fight, I was slapped with a BSOD.
I see you implemented log4j, but you probably turned that off because I didn't get any logs to post :/

Offline Deque

  • P.I.N.N.
  • Global Moderator
  • Overlord
  • *
  • Posts: 1203
  • Cookies: 518
  • Programmer, Malware Analyst
    • View Profile
Re: Preview - Gladiator management game
« Reply #2 on: August 10, 2013, 08:49:15 pm »
What can I say. +1 for the effort but -1 because it crashed my system.
I'm running winxp SP2 and everything was fine, except for the huge delays (about a second or two) when you drop stuff on your gladiator. When I pressed Enter to fight, I was slapped with a BSOD.
I see you implemented log4j, but you probably turned that off because I didn't get any logs to post :/

I am sorry that your system crashed. But I really can not imagine why this would happen. I never had any problem like this, no delays, no crashes or anything like that. (Linux)
The game uses Slick2D and the native libraries that come with it. I will test it on Windows and see if the same happens to my system.
Logging is not turned off. It is on INFO level, but it is by now not written to a file, only to stdout.


Offline Kulverstukas

  • Administrator
  • Zeus
  • *
  • Posts: 6627
  • Cookies: 542
  • Fascist dictator
    • View Profile
    • My blog
Re: Preview - Gladiator management game
« Reply #3 on: August 10, 2013, 09:05:35 pm »
Logging is not turned off. It is on INFO level, but it is by now not written to a file, only to stdout.
You should make it log to a file when releasing to public so that people can post their logs :)

You are going to the game dev side or what? I see you are releasing all kinds of games in Java...

Offline Deque

  • P.I.N.N.
  • Global Moderator
  • Overlord
  • *
  • Posts: 1203
  • Cookies: 518
  • Programmer, Malware Analyst
    • View Profile
Re: Preview - Gladiator management game
« Reply #4 on: August 10, 2013, 10:04:26 pm »
You are right. Let's see if I can fix this. I tried on Windows 7 now and got these issues:
The framerate jumped to 800 fps which is way too much. (with Linux I always get 60-65 fps)
The lags after dropping items on the character appeared too.
The game took a long time to start.

It didn't crash, though.

I updated to the newest lwjgl version, but it didn't change anything.
I will see if limiting the framerate helps.

Quote
You are going to the game dev side or what?

I have some games in my mind that I really need to make. So, yes.
However, the last game I posted was for university. This one is for me.

Thanks for feedback to help me find some issues.
Next time I will turn on logging.
« Last Edit: August 10, 2013, 10:06:44 pm by Deque »

Offline Deque

  • P.I.N.N.
  • Global Moderator
  • Overlord
  • *
  • Posts: 1203
  • Cookies: 518
  • Programmer, Malware Analyst
    • View Profile
Re: Preview - Gladiator management game
« Reply #5 on: August 11, 2013, 01:21:39 pm »
@Kulver: I believe that the high framerates are the cause, so I turned on VSync which synchronizes the framerate to your vertical display refresh rate. I would highly apprechiate it if you could try again if it works. But I understand if you don't feel like it because of the crash.

Here is the new download link: http://uppit.com/ocixxk4qil17/Gladiator.zip
« Last Edit: August 11, 2013, 01:22:03 pm by Deque »

Offline Deque

  • P.I.N.N.
  • Global Moderator
  • Overlord
  • *
  • Posts: 1203
  • Cookies: 518
  • Programmer, Malware Analyst
    • View Profile
Re: Preview - Gladiator management game
« Reply #6 on: August 12, 2013, 09:13:56 pm »
Alright. I made some changes. First I used the targetFrameRate option. Second I set a limit to the logic updates of the game, so even if the framerate is high, it shouldn't use up the CPU that much. (The default option sets one logic update per frame)

Other than that I fixed the issue that choosing similar items won't move them back to the inventory and I added some new items.

I made a very small download for those who still have the old version (240KB). So if you still have the old folder, replace the gladiator.jar and the sprites folder from the download here:
http://uppit.com/sqhahw1tdkhp/GladiatorSmall.zip
« Last Edit: August 12, 2013, 09:34:40 pm by Deque »

Offline Deque

  • P.I.N.N.
  • Global Moderator
  • Overlord
  • *
  • Posts: 1203
  • Cookies: 518
  • Programmer, Malware Analyst
    • View Profile
Re: Preview - Gladiator management game
« Reply #7 on: August 13, 2013, 11:15:45 am »
@Kulver: Turned on logging now and achieved a steady framerate of 120 on Windows 8. It is still not as smooth as on Linux, but it works for me.

Offline hanorotu

  • Dj Rapture
  • VIP
  • Majesty
  • *
  • Posts: 1173
  • Cookies: 98
  • ( ͡° ʖ ͡°)
    • View Profile
    • Rapture
Re: Preview - Gladiator management game
« Reply #8 on: August 13, 2013, 10:11:26 pm »
Very cool, will check it out later!


Life is hard, then you get buried.
If you want to use my work all of my music is licensed under GNU General Public License v3 (GPL-3) - http://bit.ly/TfUOBA