Author Topic: Run and hide  (Read 36355 times)

pat

  • Rogueliker
  • ***
  • Posts: 193
  • Karma: +0/-0
    • View Profile
Run and hide
« on: November 23, 2009, 02:52:35 AM »
Hello friends, here's a small roguelike project which I'm working on as a stepping stone towards something bigger: http://magnuscanis.com/runandhide/

At the moment it's a simple (in terms of gameplay) Java applet which aims at encouraging the player to avoid combat as much as possible. In terms of the length of the game, I would imagine that there's somewhere between a couple of minutes to half an hour of gameplay in it, depending on what you think of the concept.

The setting is the over-done (but convenient for my purposes) setting of a zombie apocolypse and the player is the sole survivor of a small village which has been overrun by the maraudering undead. As the name suggests, you're supposed to run for your life! There's no character progression or other facets of the game (such as weapons or other equipment) at this stage, and it possibly might stay that way.

It's probably a long way from its finished state, but it's playable and I hope someone finds it interesting at this stage. It might look familiar to you because the code is based on another roguelike project (details of which are here: http://www.roguetemple.com/2008/05/24/a-couple-of-simple-applet-roguelikes/) and this is due to the long period of time over which I haven't had anything to do with coding anything whatsoever.

At the moment, it's arguably a variant of that original applet, but the gameplay is considerably different and moving further away as time goes on.

purestrain

  • Rogueliker
  • ***
  • Posts: 172
  • Karma: +0/-0
    • View Profile
Re: Run and hide
« Reply #1 on: November 23, 2009, 12:35:41 PM »
Hi,

i like it, some suggestions:

Of course it needs a more intelligent wait function. Turning should cost much less time and fov should be 180deg. Sidestepping seems to be a good idea, maybe a "peek around corner" feature. I need a goal... reaching helicopter, waiting 10000 turns until army arrives, searching gas/spare parts for the broken car, maybe medics for the girlfriend (boyfriend) with a broken leg. Maybe i can carry my buddy to a safer place. Maybe the player has to keep alive for 3 days but needs to retrieve some food and water. The game needs lots every day objects, just laying around to increase the overall mood.

Lots of maybes.

magellan

  • Rogueliker
  • ***
  • Posts: 91
  • Karma: +0/-0
    • View Profile
    • Email
Re: Run and hide
« Reply #2 on: November 23, 2009, 05:42:26 PM »
What purestrain said + the ability to make traps out of the every day objects, in an open ended, everything goes way :) (Of course i have no idea how one would go about doing that)

Vanguard

  • Rogueliker
  • ***
  • Posts: 1112
  • Karma: +0/-0
    • View Profile
Re: Run and hide
« Reply #3 on: November 23, 2009, 09:19:31 PM »
I think it's pretty good as a proof-of-concept, and there are probably a lot of directions you could take it in to make a nice game out of it.  As it is it's overly simple, but I'm sure that will change with time.  Purestrain's ideas sound pretty good too.

pat

  • Rogueliker
  • ***
  • Posts: 193
  • Karma: +0/-0
    • View Profile
Re: Run and hide
« Reply #4 on: November 23, 2009, 10:05:53 PM »
thanks for the comments guys, yeah it's all a bit simplistic at the moment but I'm relatively happy that I've got something resembling gameplay and a map generator which spits out something resembling a town (albiet sloppily).

Hi,

i like it, some suggestions:

Of course it needs a more intelligent wait function. Turning should cost much less time and fov should be 180deg. Sidestepping seems to be a good idea, maybe a "peek around corner" feature. I need a goal... reaching helicopter, waiting 10000 turns until army arrives, searching gas/spare parts for the broken car, maybe medics for the girlfriend (boyfriend) with a broken leg. Maybe i can carry my buddy to a safer place. Maybe the player has to keep alive for 3 days but needs to retrieve some food and water. The game needs lots every day objects, just laying around to increase the overall mood.

Lots of maybes.

I really like your idea about carrying your buddy to a safer place - I'm thinking that your movement is slowed when you carry your pal around the map and you can put him down someplace safe (?!) to move faster or fight off zombies while he/she relaxes comfortably on the ground and periodically complains. Hmm, it might just turn out to be annoying but I figure if I slow down the zombies to take into account the fact that you'll be mucking around with manuevering an invalid around the map, the concept might be a good one. Thanks a lot!

I'm not sure about implementing useable items (or even unuseable items). Originally, I had planned on doing just that and trying to put in an ability to set traps for zombies to stumble into and objects to use as weapons or throw but I put it aside while I aimed for getting the avoiding combat and survival aspect off the ground. I'll have a think about it - I'm probably not going to go down the traditional route of having a potential armoury of weapons randomly available, but the odd broken bottle, rock, tree branch or homemade crossbow might liven things up...

pat

  • Rogueliker
  • ***
  • Posts: 193
  • Karma: +0/-0
    • View Profile
Re: Run and hide
« Reply #5 on: November 23, 2009, 10:09:54 PM »
oh yeah, and also thinking about turning up the creation rate of new zombies but making them deterioate over time so there's an army of weak zombies swarming all over the map (spending all their time killing each other) with the occasional stronger and fresher one amongst the mix.

purestrain

  • Rogueliker
  • ***
  • Posts: 172
  • Karma: +0/-0
    • View Profile
Re: Run and hide
« Reply #6 on: November 24, 2009, 09:14:39 AM »
Well; i imagine moving e.g. a cupboard to the door to keep the zombies outside while searching the house for some medics and escaping through the window. After some turns the cubboard gets smashed.

I agree, fighting should be the last possible options - but maybe i can find a pistol but every shot attracts nearby zombies? The player could find a doll which makes noise and throw it anywhere? Smashing a cupboard to get some planks and use them to fortify a house? I've got plenty of ideas just by watching my zombie-dvd collection and remembering "zombie survival guide".

AquaTsar17

  • 7DRL Reviewer
  • Rogueliker
  • *
  • Posts: 57
  • Karma: +0/-0
    • View Profile
Re: Run and hide
« Reply #7 on: November 24, 2009, 04:55:55 PM »
This looks like a fun game! I'm looking forward to seeing what else you do with it. I have a few ideas for you.

You could vary the behaviors of the zombies a bit. Some would just wander aimlessly and fight any living things they see (or maybe stop to eat a corpse if there's any around). Others could actively seek out living things (such as the player) and hunt them down, making these zombies more of a threat. Other zombies could act as a group leader, and any wandering zombie in a range around them would just follow the leader instead of doing their own thing. The zombies don't need to have different strengths as their behavior is enough to change how deadly some may be, though you could still keep the a - e level of zombies if you want. An e hunter would then be the most deadly zombie.

Another thing you could add would be other humans wandering around. They could also be trying to hide, but could be good for the player in that they distract zombies. You don't necessarily need to interact with them. Having other living things around (that when killed could turn into a zombie) would add to the mystery about what thing you hear. Seeing a ? in the corner of your view could be a zombie, but it could also be a human that doesn't actually pose a threat.

Likewise, if you go with the concept of carrying a friend out your friend doesn't necessarily have to be annoying. Your friend could provide warnings, such as "I hear something east of me". Just make your friend more unrealiable (because he's scared or something), so you may get a lot of false alarms. That would add on to the other human issue above: you could hear something, but it may not be a zombie. Your friend could hear something, but may not be a zombie (it could be another human or nothing at all).

Given that the point is to survive you'd want to give the player reasons to think they could be killed at any moment, but the game doesn't actually have to be deadly. The player just needs to think it's deadly.

magellan

  • Rogueliker
  • ***
  • Posts: 91
  • Karma: +0/-0
    • View Profile
    • Email
Re: Run and hide
« Reply #8 on: November 24, 2009, 06:41:59 PM »
By some wierd coincidence i have was thinking about a zombi apocalypse game just this weekend. (Made the map generator and then abandoned it ;) )
What I was thinking about was stuff to push that blocks doors (See purestrain)
Traps, maybe a system where you can combine different household items to "Trigger"-"Connection"-"Damage dealing" things, and build "mixer connected by shoe strings to doorknob"-kinda traps.
and: Bikes, Cars, Skateboards. with your facing system that could work pretty well, i imagine!

pat

  • Rogueliker
  • ***
  • Posts: 193
  • Karma: +0/-0
    • View Profile
Re: Run and hide
« Reply #9 on: November 25, 2009, 12:54:01 AM »
Thanks for the comments guys - glad to hear that the concept seem ok.

There's definitely going to be non-hostile creatures added. I was thinking about terrified survivors who draw the zombies as they run around the map in hysterics and if they don't see any zombies in their immediate vicinity, they'll tend to move towards houses to hole up.

Even some random animals might be a good idea - something like stray cats and dogs wandering the map before being eaten, with these friendly creatures making noise which alerts you to something moving around nearby (but you won't know what).

I've been thinking about all these suggestions which inevitably involve the implementation of useable items and I think I'll have to bite the bullet in that regard. So what I was thinking about doing first up would be to create a weapon slot for the player which affects the damage dealt by that individual weapon and then put in a long-ish list of everyday items which would be scattered all over the map and which would have their individual characteristics (how much damage would a stale loaf of bread deal out when compared to swinging a recently severed arm???).

I'm in the process of working out the easiest way to do that - I'm loathe to put in an x by y array of lists of item objects because it seems like overkill for this type of thing - I won't be expecting the items to do all that much, but I'll work on exactly how I'm going to implement it inlcuding how to handle the picking up and dropping of items (ie. do they stack or restricted to one-per-square or something in between?!).

Other things which I've decided to do:

* larger map with scrolling view and with the '@' to remain in the centre of the screen a la Crawl
* after items are put in, the random creation of body parts from dead zombies (or others) which can in turn be picked up and used
* tweaking of the map generator to fix up the annoying things I did with it and which probably only bother me

Traps are going to be hard and I'll have a think about that once I've got this stuff done. The comment about zombie AI is good as well. I'll have a think about what I'm going to do in that regard also. Obviously, I'll need to play with the AI to create non-hostile creatures, so it'll come up shortly.

Thanks!!

pat

  • Rogueliker
  • ***
  • Posts: 193
  • Karma: +0/-0
    • View Profile
Re: Run and hide
« Reply #10 on: December 03, 2009, 09:22:55 AM »
new version is up with scrolling view of the map. This allowed me to boost the size of the town, so of course, I didn't think it through and made it 25 times bigger 8) :o ;D

This means more zombies, more places to hide and more game-breaking bugs. I'm serious about the bugs - I found a couple of real doozies after it was already uploaded - oh well...

www.magnuscanis.com/runandhide/
www.magnuscanis.com/runandhide/runandhide-v4.zip
« Last Edit: December 03, 2009, 09:29:17 AM by pat »

pat

  • Rogueliker
  • ***
  • Posts: 193
  • Karma: +0/-0
    • View Profile
Re: Run and hide
« Reply #11 on: December 06, 2009, 11:21:51 PM »
Stupid Java question:

I'm trying to pilfer some pathfinding code because I am either unable/unwilling to code it myself. I'm using Eclipse as my IDE and trying to steal code along the lines of the stuff found here: http://www.cokeandcode.com/pathfinding or something similar

Basically, my issue is that I can't seem to get Eclipse set up properly so that when I try to 'import' that stuff that it actually recognises it. I have searched high and low for a simple tutorial as to how to do this plainly basic task but it just won't work for me. I even had an example which worked, and I tried to copy its set-up as much as possible and it still wouldn't work.

This is what happens when you take on a programming project without any kind of actual knowledge  :-\. Your help re: my fundamental incompetence would be greatly appreciated. Thanks in advance roguelike friends. :^)

pat

  • Rogueliker
  • ***
  • Posts: 193
  • Karma: +0/-0
    • View Profile
Re: Run and hide
« Reply #12 on: December 07, 2009, 02:18:52 AM »
actually, while I would still like an answer to my idiotic problem (because it'll inevitably arise again), I think I'm going to make my own pathfind in the djkistra (spelling, but who cares) vein. I can actually get my head around that, so that'll do me

Etinarg

  • Rogueliker
  • ***
  • Posts: 424
  • Karma: +1/-1
  • Idea archivist and game tinkerer.
    • View Profile
    • Gedankenweber Blog (German)
Re: Run and hide
« Reply #13 on: December 09, 2009, 02:04:58 PM »
I can't help you with Eclipse, but a selfmade breadth-first search (basically what Dijkstra's algorithm does) is very quick to program and good enough unless you search really big areas.

Edit: That's just Java files there ... why do you need to "import" them in Eclipse? Wouldn't it suffice to put them in the right folders (matching their packages) and tell Eclipse that they are part of your sources?
« Last Edit: December 09, 2009, 02:08:58 PM by Hajo »

pat

  • Rogueliker
  • ***
  • Posts: 193
  • Karma: +0/-0
    • View Profile
Re: Run and hide
« Reply #14 on: December 09, 2009, 11:14:52 PM »
yeah, that's what i'm in the process of implementing. I've got it done and just trying to work out a few kinks. I think it's actually suitable in the circumstances because I'm only doing a pathfinding search once (because everyone moves towards the player) and then I can just use the results of that search for each enemy who acts in that way.

I'm going to have to do something else though when I start looking at pathfinding for individual creatures looking to move to other random points on the map. If I'm doing a breadth-first search for each and every one of those instances, then I think it's going to slow it all down. Anyway, that's tomorrow's problem.

About those java files, I don't really understand half of what's going on with Eclipse or even the type of files which I'm supposed to be using (?!) haha, I'm not ashamed of admitting that I'm working on this project with a very limited knowledge of the workings of java and I'm trying to scrape by with the bare minimum.