GDR Forum Index
Podcast Podcast
Dev Dev Logs
Search Search
RSS RSS
Register Register
Log in Log in
Reply to topic GDR Forum Index -> Game Developer's Refuge -> Development Log - Jungle Mayhem Page 1, 2, 3  Next
View previous topic :: View next topic  
Author Message
IMakeGames
Contributor

Joined: 13 Apr 2011
Posts: 499
Location: Austria
PostPosted: Mon Oct 17, 2011 2:40 pm    Post subject: Development Log - Jungle Mayhem Reply with quote

I've been quite silent recently, so I thought I get the development log for my next game going... Jungle Mayhem! It's gonna be a 2d platform shooter/slasher with an arcade feel. :-D

This time, I'm using the LibGDX library, which has been a blast to work with so far. The biggest advantage is I can now develop for Windows, Linux, Mac AND Android with little overhead!!! Of course, the Android version will need a different input method and the HUD and UI will also be a bit different, but the main game will be the same. Major win! Plus libGDX wraps OpenGL calls and presents a fast and easy way to draw 2d sprites. No more slow canvas-calls!

Maps and collision detection/response is already in and working. I was able to take most of it from my older game. You can also walk around the map with your character and shoot at enemies.

I'm currently working on NPC pathfinding and AI in general. Basically, I want the NPCs to find their way in the levels almost as if they were human players. They should jump onto higher platforms, drop to lower ones, jump over pits and generally move towards their goal like a human player would. Less talking, more video posting: http://www.planet-wars.net/junglemayhem/2011-10-18_0008.swf
In the video you can see me playing as the red and blue dude being chased by the green "stick man", wanting to beat me to death. The red dots and lines are pathfinding-nodes and links between them. The green dots show the path the NPC wants to go, found by the A* algorithm. But the hardest part was to get the NPC from one node to the next. I wanted NPCs to be controlled exactly like a PC is controlled. So the stick man's "brain" only issues the commands "walk left", "walk right" and "jump" every frame and the stick man himself just acts on that. This is exactly like the player controls his character. Now the challenge was to always issue the right combination of commands so the NPC doesn't get stuck between nodes.

I'm quite happy with how it goes so far! :-D
View user's profile Send private message Visit poster's website
Alex
Developer

Joined: 05 Sep 2005
Posts: 1159

PostPosted: Mon Oct 17, 2011 2:56 pm    Post subject: Re: Development Log - Jungle Mayhem Reply with quote

IMakeGames wrote:
I want the NPCs to find their way in the levels almost as if they were human players. They should jump onto higher platforms, drop to lower ones, jump over pits and generally move towards their goal like a human player would.

looks good so far. have you thought about adding any lineofsight for the enemies?
View user's profile Send private message Visit poster's website
n29
Developer

Joined: 13 Sep 2005
Posts: 879

PostPosted: Mon Oct 17, 2011 5:50 pm    Post subject: Reply with quote

Looks really effing awesome so far. A problem I forsee: I assume the nodes are positioned manually? This will be very labor intensive when the number and size of levels increases! If nodes positioned dynamically, how??? Haven't seen those sprites in a while, iirc they come from a book a guy wrote about spriting some years ago.
_________________
My Blog
View user's profile Send private message
IMakeGames
Contributor

Joined: 13 Apr 2011
Posts: 499
Location: Austria
PostPosted: Tue Oct 18, 2011 4:50 am    Post subject: Reply with quote

n29 wrote:
Looks really effing awesome so far. A problem I forsee: I assume the nodes are positioned manually? This will be very labor intensive when the number and size of levels increases! If nodes positioned dynamically, how???

The nodes and links are placed automatically. :-) I knrw that creating maps can get boring really quickly for me, so spending even more time tediously setting nodes and links would have been an even bigger waste of time.
The automatic generation is not that hard after all. Nodes are placed everywhere there is a non-solid tile on top of a solid tile. Links between nodes are a different beast though. I came up with what I call "stencils". A stencil may look like this:
Code:

00
09
81

"0" denotes no tile, "1" denotes a solid tile, "2" denotes I don't care what tile, "8" and "9" denote start and end-node. With each stencil, I sweep over the map to see if I can match it somewhere. Every item in the stencil has to match with the corresponding tile in the map. If there is a full match, a link between the start and end-node is created at that possition. An example:
Consider the map below:
Code:

00000
00000
00111
11111

"0" denotes no tile, "1" denotes a solid tile.

First, create the nodes:
Code:

00000
00***
**111
11111

"*" denotes a node. Easy...
Now we apply our stencil from above to see if it matches somewhere. And it does. Therefore, a link is created between the second and third node from the left. The NPC now knows it can travel between those two nodes. For convenience, stencils are also mirrored and (if applicable) their endpoints are swapped so I don't need to specify them all manually.

Additionally, for every stencil, I assign 2 thresholds for x and y and also store these values with every link. This helps the NPC decide how to get from one node to the other. The x-threshold specifies when to move towards the next node horizontally, the y-threshold specifies when (or if) to jump. Staying with our example from above, I would assign an x-threshold of 100%, meaning I want the NPC to move horizontally all the way until it has reached the next node. And I would assign an y-threshold of about 50%, meaning it should only jump until it has moved half of the way to the next node. If I'd specify 100%, it would jump as high as it could, which isn't necessary as it's just a 1 tile difference in y-direction.

Pfeew... I hope that made ANY sense... :-)

Quote:
Haven't seen those sprites in a while, iirc they come from a book a guy wrote about spriting some years ago.

They are from the "spritelib": http://www.widgetworx.com/widgetworx/portfolio/spritelib.html


Edited by IMakeGames on Tue Oct 18, 2011 6:25 am; edited 1 time
View user's profile Send private message Visit poster's website
0xDB
Developer

Joined: 26 Dec 2005
Posts: 1651
Location: Your consciousness.
PostPosted: Tue Oct 18, 2011 5:20 am    Post subject: Reply with quote

Quote:
Therefore, a link is created between the second and third node from the right.
Looking at the "stencil" and trying to follow your explanation, I think you meant the second and third node from the left because the second and third one from the right are directly next to each other and would match a different stencil:
Code:

00
89
11


Interesting technique. I'll have to remember it should I ever write a platform game with AI being able to move around freely in a map. :)
_________________
0xDB
View user's profile Send private message Visit poster's website
IMakeGames
Contributor

Joined: 13 Apr 2011
Posts: 499
Location: Austria
PostPosted: Tue Oct 18, 2011 6:26 am    Post subject: Reply with quote

Of course you're right Dennis, thanks! I changed it in my post...
_________________
My current project: Hook'd
View user's profile Send private message Visit poster's website
IMakeGames
Contributor

Joined: 13 Apr 2011
Posts: 499
Location: Austria
PostPosted: Sat Oct 29, 2011 12:14 pm    Post subject: Reply with quote

So....

I've been working on various things, including AI, new enemies and other stuff! Wanna try a playable version? Download the runnable JAR file from here: http://www.planet-wars.net/junglemayhem/JungleMayhem_29112011.jar
I've never distributed a JAR file before, so I hope this is a viable way and works for you. I've tried to create a web-applet as well, but I couldn't get it to work, yet...
Controls are:
Arrow-keys to move
Y and Z to jump
X to shoot

I'd like to know two things:
1) Is it fun? There are still quite a lot of things missing, like many more enemy-types, traps and powerups. I hope the difficulty level is ok though and it is enjoyable.
2) Is the Auto-aiming working as you would expect? Or do you find yourself shooting at the wrong enemies?

Thanks for trying it out! :-)

edit: if the JAR doesn't work for you, here's a video at least: http://www.planet-wars.net/junglemayhem/2011-10-29_2220.swf
View user's profile Send private message Visit poster's website
IMakeGames
Contributor

Joined: 13 Apr 2011
Posts: 499
Location: Austria
PostPosted: Wed Nov 02, 2011 4:06 pm    Post subject: Reply with quote

Woot! There's an applet version:
http://planet-wars.net/junglemayhem/applet/
No download, play it in a browser, minecraft-style! :-D
Screenie, if you don't trust me:


Come on, people, I need somebody to test this! :-)

Edit: it probably won't work on a x64 Mac, but it should definitely work on Windows. I tried it with a pretty vanilla one and it worked without a problem...
View user's profile Send private message Visit poster's website
Alex
Developer

Joined: 05 Sep 2005
Posts: 1159

PostPosted: Wed Nov 02, 2011 5:07 pm    Post subject: Reply with quote

seems good so far. I think I would enjoy it more if there were more capabilities than just simply jumping and shooting. Like upgrading weapons or even like maneuvering abilities.
View user's profile Send private message Visit poster's website
BadMrBox
Developer

Joined: 12 Jun 2006
Posts: 1196
Location: Beyond return
PostPosted: Thu Nov 03, 2011 4:57 am    Post subject: Reply with quote

I cant access the site. It only crashes.
_________________
My Blog | I take steroids for my bad knee. Now I can kick a smart car across the Walmart parking lot![/size]
View user's profile Send private message Visit poster's website MSN Messenger
IMakeGames
Contributor

Joined: 13 Apr 2011
Posts: 499
Location: Austria
PostPosted: Thu Nov 03, 2011 6:04 am    Post subject: Reply with quote

Quote:
I cant access the site. It only crashes.

Shit! It doesn't work on my office PC either... guess the whole "run anywhere"-mentality of Java comes crashing down pretty hard. Sorry! But do other Java applets work for you?
View user's profile Send private message Visit poster's website
BadMrBox
Developer

Joined: 12 Jun 2006
Posts: 1196
Location: Beyond return
PostPosted: Thu Nov 03, 2011 9:34 am    Post subject: Reply with quote

I tried it with FF and then it worked.
I played until wave 6 when I bit the dust.

1) It was fun as long as new kinds of enemies showed up. The area feels a bit small.
2) The autoaim works but it would be more fun to aim yourself.
_________________
My Blog | I take steroids for my bad knee. Now I can kick a smart car across the Walmart parking lot![/size]
View user's profile Send private message Visit poster's website MSN Messenger
Sirocco
Moderator

Joined: 19 Aug 2005
Posts: 9410
Location: Not Finland
PostPosted: Thu Nov 03, 2011 12:17 pm    Post subject: Reply with quote

I must say the speed with which you turn around raw ideas is pretty impressive.
_________________
NoOP / Reyn Time -- The $ is screwing everyone these days. (0xDB)
View user's profile Send private message Visit poster's website
Gil
Developer

Joined: 14 Nov 2005
Posts: 2341
Location: Belgium
PostPosted: Thu Nov 03, 2011 3:07 pm    Post subject: Reply with quote

Wave 7. Moderately fun. Basic combat is fun, but I lack diversity.
_________________
PoV: I had to wear pants today. Fo shame!
View user's profile Send private message Visit poster's website
IMakeGames
Contributor

Joined: 13 Apr 2011
Posts: 499
Location: Austria
PostPosted: Thu Nov 03, 2011 11:48 pm    Post subject: Reply with quote

Thanks a lot for all your feedback! This kinda confirm my thoughts on the current game/prototype as well. The big question I'm asking myself (and I'd like to ask you):
Is it possible to make this game fun with more content and gameplay-elements, or is the basic "premise" flawed already? Maybe a 2D platformer and fighting off waves of enemies by shooting them just doesn't work together (like that)!

I'm thinking hard on where to go from here. I wanted to have this playable prototype so I can get a feeling for what work and what doesn't but frankly, I'm at a loss. Here are the features I had/have planned:

  • about 5 more enemy types with different behaviors
  • spikes, which both kill you an your enemies instantly
  • Pixel-particles! For blood, for gore, to make it more fun to kill! ;-)
  • traps with floor-triggers like spikes coming out from the ground when you walk on a trigger somewhere
  • powerups, giving either advanced abilities (faster shooting, higher jumping, ...) or points or health
  • Different areas like in classical 2D beat'em ups. After you cleared some waves, a "GO" arrow appears and you can walk into the next section. That should add some variety.
  • the game should be highscore-based, that means the ultimate goal is to get as many points as you can.


Would you say that these are "enough" to make the game more enjoyable? Or would they be just gimmicks and the game itself would basically be still only moderately fun?

Right now I'm experimenting with different AI behaviors. Some enemies should chase you, some intercept you, some even ambush you.
Also, I'm trying out different "physics". Make higher jumping possible, changing movement-speed, that kind of jazz...
View user's profile Send private message Visit poster's website
Alex
Developer

Joined: 05 Sep 2005
Posts: 1159

PostPosted: Fri Nov 04, 2011 12:48 am    Post subject: Reply with quote

I think it has potential. Your project inspired me to try and start a little platform shooter prototype of my own (or rather, it rekindled an idea i had in the past).
smarter ai or more diverse reactions I believe would help. At the moment the enemies feel like drones, so that's good that you're working on that. Their pathways are easy to predict, so I'd suggest a system where they rely on where they believe you are rather than where you actually are (because essentially at the moment you can control which way they go by jumping between specific spots).
View user's profile Send private message Visit poster's website
mandrake
Developer

Joined: 19 Aug 2005
Posts: 717
Location: The Land of Nod
PostPosted: Fri Nov 04, 2011 5:17 am    Post subject: Reply with quote

Dayamn man. Now I want to play more old skool :)
_________________
<blog >
View user's profile Send private message Send e-mail Visit poster's website MSN Messenger
Gil
Developer

Joined: 14 Nov 2005
Posts: 2341
Location: Belgium
PostPosted: Fri Nov 04, 2011 11:03 am    Post subject: Reply with quote

Few pointers:
- Bullets are too hard to see, there's a reason most games use orange or pink or whatever
- AI path is too predictable. Read up on PacMan AI. You need a small collection of AIs, one of which just wanders around. This stops the enemy from forming a conga line following you around.
_________________
PoV: I had to wear pants today. Fo shame!
View user's profile Send private message Visit poster's website
0xDB
Developer

Joined: 26 Dec 2005
Posts: 1651
Location: Your consciousness.
PostPosted: Sat Nov 05, 2011 2:17 am    Post subject: Reply with quote

applet version:
After some time (wave 4 or 5 I think) the game started freezing occasionally for a few seconds. The first time this happened was when I kept holding down the shoot key while at the same time running/jumping around wildly and keeping the shoot key pressed all the time.

edit/append:
It might be fun to be able to duck to avoid enemy bullets without having to give up your current position. Maybe this way the player could even take cover behind half-height objects (crates/barrels) and fire from there.
_________________
0xDB
View user's profile Send private message Visit poster's website
IMakeGames
Contributor

Joined: 13 Apr 2011
Posts: 499
Location: Austria
PostPosted: Tue Nov 08, 2011 10:02 am    Post subject: Reply with quote

Alright alright...

I've made some big improvements on the AI, most notably:

  • Enemies have different behaviors. The guys with sticks chase you directly, the ninjas try to predict where you're going and intercept your path and the guys with guns pick a location to camp and shoot at you when you're near.
  • Gun-guys can now shoot upwards and downwards by some degree.
  • Enemies also try to guess where you will be in the short-term. If you're in mid-air, they guess where you will land and move towards that position.
  • Various path-finding improvements and new jump possibilities.

I've also increased the general possible jump-height, that should make it more interesting as well.

I've updated the applet-version at http://planet-wars.net/junglemayhem/applet/. It's really hard from the start now, you're probably gonna get crushed... but it should be a good AI-test. :-) Would you say that this improved things?
View user's profile Send private message Visit poster's website
Alex
Developer

Joined: 05 Sep 2005
Posts: 1159

PostPosted: Tue Nov 08, 2011 11:07 am    Post subject: Reply with quote

hm.. it crashes for me after one or two seconds when it starts.
View user's profile Send private message Visit poster's website
IMakeGames
Contributor

Joined: 13 Apr 2011
Posts: 499
Location: Austria
PostPosted: Tue Nov 08, 2011 1:08 pm    Post subject: Reply with quote

Quote:
hm.. it crashes for me after one or two seconds when it starts.

Dang... could you try again now? I've uploaded a new version.
_________________
My current project: Hook'd
View user's profile Send private message Visit poster's website
Alex
Developer

Joined: 05 Sep 2005
Posts: 1159

PostPosted: Tue Nov 08, 2011 2:54 pm    Post subject: Reply with quote

works now.
it's tough, but the ai is better.
View user's profile Send private message Visit poster's website
Gil
Developer

Joined: 14 Nov 2005
Posts: 2341
Location: Belgium
PostPosted: Tue Nov 08, 2011 5:13 pm    Post subject: Reply with quote

Okay, that is lots better :D

The camping shooters are really hard. Some powerups and different weapons for variety and balance, so first wave isn't so hard and this is starting to become tons of fun :D
_________________
PoV: I had to wear pants today. Fo shame!
View user's profile Send private message Visit poster's website
Sirocco
Moderator

Joined: 19 Aug 2005
Posts: 9410
Location: Not Finland
PostPosted: Tue Nov 08, 2011 5:21 pm    Post subject: Reply with quote

The AI does a fabulous job of beating my ass :)
_________________
NoOP / Reyn Time -- The $ is screwing everyone these days. (0xDB)
View user's profile Send private message Visit poster's website
Reply to topic GDR Forum Index -> Game Developer's Refuge -> Development Log - Jungle Mayhem Page 1, 2, 3  Next

Use this link to get a Sign-On Bonus when you get started!

All trademarks and copyrights on this page are owned by their respective owners. All comments owned by their respective posters.
phpBB code © 2001, 2005 phpBB Group. Other message board code © Kevin Reems.