Game Maker's Garage Forum

Game Maker's Garage => Contests => Topic started by: WarHampster on December 19, 2010, 10:26:45 AM

Title: Devlog - Hacksilver
Post by: WarHampster on December 19, 2010, 10:26:45 AM
[size=10]I'm going to make a roguelike game using my tile engine. Still working out the details but I have a basic concept in mind.

You are a representative of The People's Intergalactic Globalization Bureau sent on a preliminary mission to evaluate a newly discovered planet for colonization.

Setting: Alien planet it its dark ages

You need to explore a procedurally generated planet, decide whether or not it is suitable for colonization, and then get home. The level of civilization on the planet is equivalent to our dark ages, so lots of random violence and power struggles.

I had some ideas regarding attributes and such. I really hate the usual RPG systems, and I was thinking of doing something like this:

There isn't a overall level for your character, you have separate levels for different skills, which you level up by using those skills (think the Elder Scrolls series). Your overall condition is defined by two variables - Physical Health and Mental Health. Physical health governs use of most weapons, and mental health governs non-combat abilities and magic (don't know if I'm going to have magic. Maybe not.). Your health stats never increase past their starting point, and decrease when you get attacked. You never die in the game, but when your stats get to zero you are essentially a vegetable and can restart.
 
Permadeath: a staple of roguelikes is that once you die the game is over and you need to restart. I am combatting the pain of this somewhat by making the character never truly die, but once all your skills are zero (this shouldn't happen often) you will have to start a totally different character. This A) increases re-playability and B) encourages strategy.[/size]  

The above information is old, but I'll keep it around to show how the game progressed.


Title: Re: Devlog - EldritchRL
Post by: WarHampster on December 19, 2010, 11:16:43 AM
Task #1: Implement pathfinding algorithm for NPC and enemy movement, and maybe also player movement (if I opt for RTS style control). I will probably use the standard A* algorithm.
Title: Re: Devlog - EldritchRL
Post by: Charlo on December 19, 2010, 11:25:33 AM
Sounds cool!  Pathfinding will be tough but you're a great programmer so it should be no sweat for you.  :P

Are you using SC?
Title: Re: Devlog - EldritchRL
Post by: Silverwind on December 19, 2010, 11:57:48 AM
Sounds awesome Hammy, and by a strange coincidence I had considered the title Eldritch for a topdown RPG before deciding on the 3D engine. It wouldn't have been set in space though! ;D
Title: Re: Devlog - EldritchRL
Post by: EqwanoX on December 19, 2010, 12:19:17 PM
this is an interesting idea for stat progression. what stats are there and what actions alter them? a heal spell should be easy to program. if you dont have magic what else is there besides physical health.
Title: Re: Devlog - EldritchRL
Post by: Connors on December 19, 2010, 01:00:37 PM
@ Eq: weapon skill, avoiding damage, using items...
Title: Re: Devlog - EldritchRL
Post by: WarHampster on December 19, 2010, 02:50:50 PM
Quote
Sounds cool!  Pathfinding will be tough but you're a great programmer so it should be no sweat for you.  :P

Are you using SC?

Yeah, I'm using SC. The pathfinding is going to be really hard to pull off. The idea behind the A* algorithm is that you choose the next tile in the path based off that tile's heuristic value (which is just the estimated distance from the target) and a value based on how you got to that tile from the previous tile. In an object oriented language I would just have a class or struct representing a tile that would include methods for calculating its heuristic and such, but in SC I need to keep a bunch of arrays to store the different values. We'll see how this works out.

Quote
Sounds awesome Hammy, and by a strange coincidence I had considered the title Eldritch for a topdown RPG before deciding on the 3D engine. It wouldn't have been set in space though! ;D

The setting is more "weird-fantasy" than generic space. I just like the idea of everything happening on another planet.

Quote
this is an interesting idea for stat progression. what stats are there and what actions alter them? a heal spell should be easy to program. if you dont have magic what else is there besides physical health.

Basically what Connors said. Physical skills would be things like Chop (governing axes and swords) and Stab (governing swords and daggers), and mental skills would be things like Personality (makes NPCs respond favorably to you) and Focus (increases accuracy with ranged weapons).
Title: Re: Devlog - EldritchRL
Post by: WarHampster on December 21, 2010, 12:48:37 AM
I'm going to try to do regular updates.

I've been working on the pathfinding. I started to implement A* but there was really no way it would work in SC without being ridiculously hackish. So as of now I'm using a stack-based implementation of a breadth-first search flood fill algorithm. It too is pretty hackish, but should work eventually. Speed will probably be an issue, but early optimization is the root of all evil. Will try to get it working with correct results first.

Also, design decision: ERL will not have scrolling maps, I don't want to deal with all the complications to enemy spawning (as Silver dealt with in ToF) and pathfinding.
Title: Re: Devlog - EldritchRL
Post by: Connors on December 21, 2010, 11:37:46 AM
Hackish is an odd word, it doesn't necessarily mean it's bad; Usually you can make it look like you knew what you were doing. XD
Title: Re: Devlog - EldritchRL
Post by: WarHampster on December 21, 2010, 09:20:50 PM
By hackish I mean unreadable and unmaintainable, which is always bad.
Title: Re: Devlog - EldritchRL
Post by: WarHampster on December 21, 2010, 10:54:23 PM
Me when I got pathfinding working: http://www.youtube.com/watch?v=P3ALwKeSEYs

Video: http://www.screencast.com/users/WarHampster/folders/Jing/media/37f0f1d4-701d-4ea0-a437-89974bda4d54

Here's an explanation of how the algorithm works, it explains it much better than I could: http://www.gamasutra.com/blogs/AdamSaltsman/20090430/1287/A_for_Artists.php
Title: Re: Devlog - EldritchRL
Post by: Silverwind on December 22, 2010, 04:14:08 AM
Wow! :D Nice one Hammy, can't wait to see it in action.
Title: Re: Devlog - EldritchRL
Post by: Charlo on December 22, 2010, 09:14:32 AM
Quote
Me when I got pathfinding working: http://www.youtube.com/watch?v=P3ALwKeSEYs

Video: http://www.screencast.com/users/WarHampster/folders/Jing/media/37f0f1d4-701d-4ea0-a437-89974bda4d54

Here's an explanation of how the algorithm works, it explains it much better than I could: http://www.gamasutra.com/blogs/AdamSaltsman/20090430/1287/A_for_Artists.php
That's awesome!  And the third link you posted is great, it makes much more sense than the wikipedia articles about pathfinding.
Title: Re: Devlog - EldritchRL
Post by: EqwanoX on December 22, 2010, 12:46:48 PM
lol uh um variables

the screencast wasnt a good example sinse there was no real obstacles in the way. i would be really impressed if it moved from the bottom left to bottom right. if this is real its a HUGE step for enemy ai
Title: Re: Devlog - EldritchRL
Post by: WarHampster on December 22, 2010, 04:40:42 PM
Heh, the "uh" variable was the result of one of those "oohhh, THAT'S why it isn't working" moments.

New video: http://www.screencast.com/users/WarHampster/folders/Jing/media/3f2dc082-d913-4502-85e7-6140153c7e30
Title: Re: Devlog - EldritchRL
Post by: Tireas Dragon on December 23, 2010, 12:10:18 AM
Thats really cool.
Title: Re: Devlog - EldritchRL
Post by: WarHampster on December 23, 2010, 11:06:21 AM
Thanks everyone. I'm flying home today so I'll try to finish optimizing the algorithm on the plane.

I've been thinking about how battles and movement will work. I think that I might use RTS style controls, where you click to move to a tile. In that case, I need to decide between turn based or realtime action. Turn based would be easier so I might end up doing that.

I also need to design some sort of queue system for rendering. If I have the player and multiple enemies and possibly other light sources all finding paths to different locations, then the engine needs to know which path is associated with which object and then move them all within the main loop.
Title: Re: Devlog - EldritchRL
Post by: EqwanoX on December 23, 2010, 11:50:51 AM
omg. need. source. now.

this is epic for rts and tactics gameplay, i can see using this for a mini warcraft. how many lines is it?

 you might want to mess around with real-time a little, it might actually be easier,
Title: Re: Devlog - EldritchRL
Post by: WarHampster on December 27, 2010, 04:22:20 PM
Well I started working on this again after a break for Christmas stuff, I got it running really quickly but broke it a bit in the process.

Eq, it's 280 lines with lots of comments and whitespace.
Title: Re: Devlog - EldritchRL
Post by: Charlo on December 27, 2010, 05:07:54 PM
Quote
omg. need. source. now.

this is epic for rts and tactics gameplay, i can see using this for a mini warcraft. how many lines is it?

 you might want to mess around with real-time a little, it might actually be easier,
I think the best part of this post is that Eq actually spelled "source" correctly for perhaps the first time in his life.   ;)
Title: Re: Devlog - EldritchRL
Post by: Silverwind on December 27, 2010, 06:41:22 PM
It's hardly Eq's fault that English makes about as much phonetic sense as a bum flavoured pastry! ;D The only reason we don't all spell it "sorse" is because it's been beaten into us since childhood.

If more of us spelled words the way they ought to be spelled, we might actually see a change to the stupid grammar rules.
Title: Re: Devlog - EldritchRL
Post by: WarHampster on December 28, 2010, 06:22:35 PM
Update, and inspiration for programmers!

You know those times when you have a bug that you have absolutely no idea how to fix? When you sit and stare at your code for hours, and then finally get so bored that you quit your editor and go play video games or something? Then the next day, you dread working on the project, because you know that if do you'll have to face that same problem.

Well that just happened to me, and I finally got myself to open SC and work on EldritchRL. And then, the first few lines of code caught my eye - "hmm, the order in which I'm putting stuff into that array seems a little funky."

Pathfinding done!!!
Title: Re: Devlog - EldritchRL
Post by: Charlo on December 28, 2010, 07:31:44 PM
I know exactly what you're talking about WarHampster.  I experienced the same thing with Bricker and then I opened it up the next day and fixed the problem in a minute.   ;D
Title: Re: Devlog - EldritchRL
Post by: Connors on December 28, 2010, 11:59:10 PM
That happens to me all the time! I always have to stop for a while and come back when I'm fresh and/or less frustrated. Also applies to games I'm playing. ::)
Title: Re: Devlog - EldritchRL
Post by: WarHampster on December 30, 2010, 04:47:23 PM
So I've been playing with pathfinding, and it is now fast and accurate enough to be used for player movement!!! I've actually developed a new algorithm to do this within SC's constraints. It is a mixture of the flood fill algorithm and standard A* and combines the benefits of each: A*'s speed with flood fill's capability of searching for an unknown location.

Also it is confusing as hell. I will post the source after the contest so you can all use it in your RPGS :)

I have also chosen a graphical style. The tiles will be detailed (like the tiles that I've been showing in my videos) while the characters and collectables will be cartoony and pixelated.
Title: Re: Devlog - EldritchRL
Post by: WarHampster on December 30, 2010, 05:12:06 PM
This is my devlog, and I'll double-post if I want to!

Video update: http://www.screencast.com/users/WarHampster/folders/Jing/media/efac3889-5935-4d4b-a5fb-4f930f406a80

Atari 2600ish player: (http://i63.servimg.com/u/f63/11/03/78/78/man10.gif)
Title: Re: Devlog - EldritchRL
Post by: Connors on December 30, 2010, 06:01:13 PM
Lovin' the graphics style man! I've got to see what you do with more charachters. ;D
Good to see there's some good competition, I'd better start adding more to my game!
Title: Re: Devlog - EldritchRL
Post by: WarHampster on December 30, 2010, 08:10:06 PM
Thanks! First I need to actually design more characters...

Actually on that note, ideas are welcome!

Notes on AI:

I've designed the pathfinding algorithm in such a way that I can easy edit the directions that the algorithm searches in. For example, I could have an enemy that can't walk diagonally.

Notes on story:

I think I'll change this again. I'll probably end up with something like "In your travels, you have happened upon a strange land. Its people are brusque and worship strange idols, and you feel the persistent presence of some nameless dread. You attempt to flee, but no matter how far you venture in any direction, you always find yourself back where you started."

Your objective is therefore to find the source of evil and kill it so you can go home. A much more traditional story that will be easier to implement.
Title: Re: Devlog - EldritchRL
Post by: Charlo on December 30, 2010, 09:06:04 PM
Nice story.  Been reading some Lovecraft?  Anyway, that demo you posted is really awesome and I'm looking forward to being able to play a game made with that engine.  The main character is kinda cute actually.   8)
Title: Re: Devlog - EldritchRL
Post by: WarHampster on December 30, 2010, 09:21:18 PM
Yeah I'm going through a Lovecraft phase :)

And thanks! The cuteness will make his horrific demise at the hands - err - tentacles - of some extra-dimensional monster all the more terrible!
Title: Re: Devlog - EldritchRL
Post by: WarHampster on December 31, 2010, 03:40:50 PM
I want the game to be controlled mostly by the mouse and a few key presses.

key1 + mouse drag in a direction = attack with current weapon in that direction

key2 + mouse click = move to selected tile

key3 + mouse move up or down = cycle current weapon

mouse click = display info about selected tile (enemy stats, etc)




Title: Re: Devlog - EldritchRL
Post by: Connors on January 01, 2011, 01:13:44 AM
Don't make the player hold a key in order to move, that can just be a normal click!
Title: Re: Devlog - EldritchRL
Post by: EqwanoX on January 01, 2011, 10:05:04 AM
 what about haveing buttons that you click to set the action instead of keys
Title: Re: Devlog - EldritchRL
Post by: WarHampster on January 01, 2011, 12:06:17 PM
Quote
Don't make the player hold a key in order to move, that can just be a normal click!

Yeah that will probably flow better.

Quote
what about haveing buttons that you click to set the action instead of keys

Well I think the game is going to be real time, so that wouldn't really work.
Title: Re: Devlog - EldritchRL
Post by: WarHampster on January 04, 2011, 10:59:16 PM
Currently attacking works by holding down shift. This makes the character take out his sword and swing it in the direction that the player moves the mouse.

Combat will be based around quickly determining a strategic spot to move to, moving there, and then slashing enemies. You are vulnerable while moving.

Also I am rushing the art. I started to draw sprites for the character swinging his sword in different directions, but scrapped them and am now just drawing a line from the character to the adjacent tile. Crude but effective... I'm running out of time now that school has started.
Title: Re: Devlog - EldritchRL
Post by: WarHampster on January 11, 2011, 08:56:28 PM
Why are you teleporting, enemy? You're an enemy you can't teleport I didn't even program that.
Title: Re: Devlog - EldritchRL
Post by: Charlo on January 11, 2011, 08:59:30 PM
Quote
Why are you teleporting, enemy? You're an enemy you can't teleport I didn't even program that.
That quote would work best put on an image using a 24-point Impact font.

Anyway, It's really a mind warp when something has functionality you didn't expect it to have.  I suppose it's better than it NOT having the functionality you DO expect it to have.  Maybe.
Title: Re: Devlog - EldritchRL
Post by: WarHampster on January 12, 2011, 02:03:12 PM
Basic enemy AI and combat are done! Currently enemies will move toward you if they can see you, and will stay away if you are pointing your sword at them.

Next up for implementation: when an enemy sees that you are pointing your sword at him, he should try to run around and get behind you.
Title: Re: Devlog - EldritchRL
Post by: WarHampster on January 15, 2011, 12:24:51 AM
Sometimes the simplest optimizations are the best optimizations :)

Progress:

Some optimization of everything.

A VERY nice audio intro.

I've recruited a friend to make a logo screen for my "company" and a menu screen.

Also the game has been renamed Hacksilver, as it is no longer particularly eldritch and is certainly no longer a roguelike.  
Title: Re: Devlog - Hacksilver
Post by: Silverwind on January 15, 2011, 03:03:27 AM
Awesome! Can't wait to play it!
Title: Re: Devlog - Hacksilver
Post by: EqwanoX on January 15, 2011, 08:49:45 AM
 does it involve hacking silvercreator?
Title: Re: Devlog - Hacksilver
Post by: Silverwind on January 16, 2011, 05:42:55 PM
Or my bank account?
Title: Re: Devlog - Hacksilver
Post by: WarHampster on January 18, 2011, 10:05:23 AM
Perhaps....

I'm down to one lingering bug in the combat... occasionally enemies will be able to hit you from a distance. This generally happens when you're fighting multiple enemies at once.
Title: Re: Devlog - Hacksilver
Post by: WarHampster on January 18, 2011, 10:39:56 AM
Ok, there are two lingering bugs, but they will be really hard to fix and I don't have enough time... they aren't so bad.

So combat is done! Now I'm going to write a quick map generator and pull everything together.
Title: Re: Devlog - Hacksilver
Post by: Silverwind on January 18, 2011, 01:24:17 PM
Awesomenessness...
Title: Re: Devlog - Hacksilver
Post by: Connors on January 18, 2011, 05:49:57 PM
I'm impressed you're just now deciding to put together a "quick map generator".
Title: Re: Devlog - Hacksilver
Post by: WarHampster on January 18, 2011, 08:55:32 PM
Heh, it's already done :)

Interesting problem that I've run into: I've been playing the game so much that it's become really easy for me. In fact, I thought that the enemy AI had somehow broken and become less smart, and spent a while trying to fix it before realizing that the AI was the same, but I had gotten much better.

Moral: get people other than yourself to play-test your games!!!
Title: Re: Devlog - Hacksilver
Post by: EqwanoX on January 19, 2011, 09:56:29 AM
Quote
Heh, it's already done :)

Interesting problem that I've run into: I've been playing the game so much that it's become really easy for me. In fact, I thought that the enemy AI had somehow broken and become less smart, and spent a while trying to fix it before realizing that the AI was the same, but I had gotten much better.

Moral: get people other than yourself to play-test your games!!!
YES! it makes stat balanceing so annoying, because that can make or break the game. it took me a long time to figure that out. i think this is why there was so many frustratingly hard games during the 8-bit era
Title: Re: Devlog - Hacksilver
Post by: Silverwind on January 19, 2011, 04:11:09 PM
Quote
YES! it makes stat balanceing so annoying, because that can make or break the game.
You just gotta use the percentile based table system (http://www.gamemakersgarage.com/cgi-bin/yabb/YaBB.cgi?board=news;action=display;num=1272322085) Eq. You'll never go back to making games without it!
Title: Re: Devlog - Hacksilver
Post by: EqwanoX on January 19, 2011, 05:07:10 PM
percentile stats seem broken to me. if weak armor blocks 10% of damage and early enemies only do 20 damage, it only blocks 2, thats nothing. so, say you bump it up to 20%, then strong enemy that does 200 damage it blocks 40 which is to much for the weakest armor. i used percentile in mystic legend 1.0. it blocked excessive damage on stong enemies and to little on weak enemies, maybe theres a way to balance it but it doesnt work for me

Title: Re: Devlog - Hacksilver
Post by: WarHampster on January 19, 2011, 10:59:56 PM
I'M DONE

GIVE ME A MINUTE TO UPLOAD
Title: Re: Devlog - Hacksilver
Post by: WarHampster on January 19, 2011, 11:47:42 PM
GAME: http://lastbossworks.com/Files/HackSilver.zip


Title: Re: Devlog - Hacksilver
Post by: Gan on January 20, 2011, 08:44:19 AM
Whoa that's nice. I think your title screen beats my game hands down.
Title: Re: Devlog - Hacksilver
Post by: EqwanoX on January 20, 2011, 11:27:21 AM
this is good, i like the gameplay of targeting in eight directions. and the ai is challenging. but on my g5 it takes a long time for the title screen to come up, the gradient effect goes real slow. music is epic too
Title: Re: Devlog - Hacksilver
Post by: WarHampster on January 20, 2011, 12:50:59 PM
Thanks guys!

Quote
on my g5 it takes a long time for the title screen to come up, the gradient effect goes real slow.

That's interesting, it just uses a for loop to increment a black sprite's fade intensity. I'll redo it using a timer, that might be faster.
Title: Re: Devlog - Hacksilver
Post by: Silverwind on January 20, 2011, 04:13:16 PM
Quote
percentile stats seem broken to me. if weak armor blocks 10% of damage and early enemies only do 20 damage, it only blocks 2, thats nothing. so, say you bump it up to 20%, then strong enemy that does 200 damage it blocks 40 which is to much for the weakest armor. i used percentile in mystic legend 1.0. it blocked excessive damage on stong enemies and to little on weak enemies, maybe theres a way to balance it but it doesnt work for me

You've got it all wrong my fine feathered fiend friend from France. You don't use percentages as stat values, you base your stat values on percentages. In fairness I've never actually given an in-depth explanation on how the engine works, so I'll try to post up a video tutorial soon. Honestly though, it's the best thing since sliced bread!
Title: Re: Devlog - Hacksilver
Post by: WarHampster on January 21, 2011, 12:28:22 PM
Post your HackSilver highscores!

(http://i33.servimg.com/u/f33/11/03/78/78/hacksi10.jpg)
Title: Re: Devlog - Hacksilver
Post by: Gan on January 21, 2011, 03:09:34 PM
(http://cl.ly/0a1J3P020B2E071v3F2N/hacksi10.jpg)
 ;D

On a serious note, found a bug:
(http://cl.ly/3i042Q1A080Q0i3P0R0W/Screen_shot_2011-01-21_at_4.11.12_PM.png)
Title: Re: Devlog - Hacksilver
Post by: WarHampster on January 21, 2011, 04:14:41 PM
Holy crap Gan, that is impressive. ;)

Yeah, I've run into that before... didn't have time to fix it before the contest.

EDIT - on that note: anyone who plays this, please let me know if you find more bugs! I've run into the following:

The map generator will occasionally place enemies in impossible to reach areas.

Enemies will occasionally be able to hit you from a distance.

I've run into a crash bug once, never been able to reproduce it.  
Title: Re: Devlog - Hacksilver
Post by: Charlo on January 21, 2011, 08:39:35 PM
I got an error where the GETGRIDLOCATION method referenced an array with an index that was out of bounds, but I don't remember the name of the array.  It caused a crash.  The game was flippin' great up until that point though, I'm extremely impressed.  The random maps were cool and the combat mechanics were very nice.  
Title: Re: Devlog - Hacksilver
Post by: WarHampster on January 21, 2011, 08:47:37 PM
Yeah, that's the crash bug I mentioned. I think it happens when all the spots that an enemy wants to move to are filled.

Too late to fix now, and thanks!
Title: Re: Devlog - Hacksilver
Post by: EqwanoX on March 15, 2011, 09:28:11 AM
any plans to release the pathfinding code?