Jump to content

Nyerguds' old school project game


Nyerguds

Recommended Posts

So, I've recently been working on fixing up an old school project of mine; a fun little tactical RPG game.

 

The game, simply called "Battle Game", is a simple RPG, loosely based on the HeroQuest board game, with a hero whose task is to clear all enemies on each level. You 'throw' two dice to get action points you need for walking and attacking, you get gold and experience from killed enemies, and leveling up gives you level points that can be distributed over skill sets like strength, magic, evasion, accuracy, etc. Between game levels you end up in a shop where you can buy potions, weapons and spells, and where you can repair your armour if it's damaged.

The original assignment asked for the traditional "battle mode switch" when attacking an enemy, but since the assignment also had magic spells with a "range" property, this seemed rather ridiculous.

The result is a game where the level's terrain is a tactical battlefield. Any enemy will consider attacking you if he can see you and has enough action points to both get to you and attack. You can physically run away from enemies during battle, and you can fire spells and duck behind the walls. Be prepared to get chased though. The AI is quite smart.

 

The game can be downloaded here.

 

Note that in this newer version I seriously upgraded the "w" (use weapon) and "s" (use spell) keyboard shortcuts, so they automatically scan for nearby enemies to attack.

I also completely rewrote the algorithm that calculated the line of sight between two creatures. This algorithm is used to determine if an enemy can be attacked with long-range spells, and if an enemy monster would try to attack the player.

 

battle_game_ice_cave.png

 

I posted more info about it in the CNCNZ thread. In fact, it's kind of a giant info dump.

Link to comment
Share on other sites

Well, it's not exactly like it... just sort of based on it.

 

Just now, I added an extra info label when you mouse over an enemy that shows if your hero can actually see the enemy. This is especially handy since it also tells you whether the enemy can see you :P

 

I'm still planning some other minor adjustments, like an indicator in the shop showing which spells you already bought, and a general "armoury" / "spellbook" feature to show the weapons and spells you got without needing to attack enemies with it just to get the list.

Link to comment
Share on other sites

Game updated, and rar pack uploaded. If you got savegames, make sure you don't overwrite the "data/gevechtsspel.db" file when updating.

 

1. The mouse-over information on enemies will now show whether they're visible or not.

2. AI update: Enemies that come towards you will take one less step if they can attack diagonally.

 

Original behaviour:

ai_improvement_1_normalpath.png

 

New improved behaviour:

(this gives the enemy one more action point to attack you with)

ai_improvement_2_efficientpath.png

Link to comment
Share on other sites

Well, I just want the AI to act like a smart player would act. This was a really obvious failure. The original (1.11) already did this anyway, but it did it in a way that messed up the "is the enemy visible?" check, since an enemy was already deemed 'visible' if the attacker could see that diagonal cell, rather than when seeing the actual enemy :P

 

So yeah, this was really just a final fix on the rewritten algorithm :)

Link to comment
Share on other sites

  • 2 weeks later...
  • 2 months later...

I feel silly, but How does one run a (javascript) jar file?

 

Coincidentially I put much effort in a similar game project, which is based even more on HeroQuest, heck it is even called HeroQuest. It should be fun to play it or watch the rolling demo. IIRC it used to be listed on the HeroQuest wikipedia, but no more. Pending were the advanced inventory system and the spells, and it is still like that.

Link

Link to comment
Share on other sites

It's not Javascript. Javascript is a HTML extension script for use on web pages. Java is a compilable programming language. It's entirely different.

As for the installing and running, I'm afraid I'm going to make you feel even more silly, since the included readme file covers that... and I even included a Dutch version (I'm Flemish).

So yeah, very sorry, but RTFM. Specifically, these sections:

Quote

1.1 Requirements
This game requires Java 1.5.0 or higher to be installed on your system. Most people have java installed for web applications anyway, so this shouldn't be a problem.

If you don't have Java, you can download it at:
http://java.com/

1.2 Installation
This part is fairly simple. Simply extract all files to a new directory.

The game comes with three executable JAR files, one for each language:
battlegame.jar    English version
gevechtsspel.jar  Dutch version
jeudecombat.jar    French version

Normally, you just double-click on the file and it'll run with Java. If it doesn't, download and install Java as indicated in 1.1.

Note that through the menu you can switch language at all times during the game.

If installing Java doesn't link jar files to it, there are a number of other ways to get it done:

  • Make sure WinRAR isn't set to open jar files
  • Manually link the jar files to "Java Platform SE binary" in the Programs list by right-clicking on the jar and selecting "open with" (you may need to shift-rightclick the file to get the "Open With" option)
  • Open notepad, put "@java -jar battlegame.jar" in it (without the quotes), go to 'Save', set the save type in Notepad to "all files", and save it as "run.bat". Then double-click "run.bat" to run.
  • Open the jar as zip file (you may have to rename the .jar to .zip for that), extract the entire contents to the installation folder, and then use the included "run.bat"
Link to comment
Share on other sites

  • 4 weeks later...

Just added a silly little extra... holding down [ctrl] gives a visual display of the visibility checker algorithm. [ctrl] shows it to the first obstruction, [ctrl]+[shift] shows the full path :P

 

I call it the "flashlight" :3

path_display_v1.14.png

note: pic is shooped; in reality the info label is not shown in flashlight mode, since it'd get in the way. I just added it because none of the other screenshots show the new 2-line info label.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...