An Adventure Game - WIP

He he, sorry for my moment of weakness :-). Nice Swedish from google translate btw :-).

He may be swedish actually :smiley: There’s a surprising amount of european people in here :slight_smile:


Insulting my native language, are we?
Jag kan självklart svenska and I’m pretty fluent at English too. 日本語もちょっとわかります。 (Nihongo mo chotto wakarimasu.)

I love retro adventure/RPG games - nicely done.

Sound works fine on OS X, but … the rendering is broken.

It’s just one big blank grey window, until you drag resize it, at which point it flickers HORRIBLY between grey and the game, and when you let go, it just displays the game correctly, and it’s fine from there.

So … I think you need to look at your Java2D initialization, and also: that flickering on resize suggests you’re not using J2D framebuffer correctly.

Very cool! :slight_smile:

Kev

Hi all, thx for commenting in this thread.

@Kevin, I’m honored by your comment! :-).

I’ve been busy with implementing multiplayer capability in this game, and so far it’s going pretty well.

I made a small update though, to polish this state of the game a little bit. Heres the news:

  • Fixed - keys sometimes not working.
  • Fixed - threading synchronization problem in AStar service.
  • Added - basic levelling system for main character.
  • Changed - light calculation algorithm of tiles changed. Now using dynamic buffer.

Hope I will have some updates soon.

Wheew! Finally I have something to show. I succeeded “somewhat” in implementing basic multiplayer capability in my game!! :slight_smile:

You can download the zip file from my site in the first post. Or the direct link below:
zip download (v0.3.0 - Latest multiplayer version): http://www.indiedeveloper.dk/adventure-030.zip

Note, this is a multiplayer version, and cannot be played directly from your browser.
Short instructions are as follows:

  1. download the ZIP (v0.3.0)
  2. unzip it somewhere
  3. run start_server.bat OR “java -cp adventure-030.jar adventure.server.AdventureServer”
  4. run start_client.bar OR “java -jar adventure-030.jar player1 localhost 5555”

I think performance will suck on a WAN but on LAN it seems to work ok. Here’s a quick high level listing of changes:

version 0.3.0 - 2012-04-11 18:21 CET

  • Fixed - Map sizes != 50x50 were not working
  • Fixed - All other keys now disabled in game
  • Added - Implemented multiplayer capability!! (A hell of a lot of changes)
  • Added - MasterZombies!!! Extra powerful zombie spawns every 2’nd night. (Only one can exist at a time)
  • Added - Info console
  • Changed - Map size now 100x100 tiles

Let me be the first to congratulate you on your updates. I liked your approach to this from the beginning (even though I always got hopelessly overrun with zombies). Network code is one of my favorite things to do, so that’s a really exciting update. I’m going to play with it later this evening…

@Nyhm - Thanks for you comment :slight_smile:

I can tell you that the networking code is probably hopeless, and my code needs a lot of cleaning up.

If anybody’s interested, I will probably post my source code here, in case anybody could teach my something. I am also very interested in network programming, and it seems like it’s one of the most challenging areas in gamedev.

My next big step will be to move from discrete movement to fluent motion. But then I will have to optimize my networking, maybe move to UDP and introduce interpolation and prediction… (swallows) … ehm, seems like a lot of work :-D.

Just a tidbit of advice - don’t worry about performance until you’ve proven that it’s necessary to tweak. That is, implement whatever you want using TCP, thread-per-connection handling, per-pixel (twitch) movement, full broadcast, etc. Then, figure out if it’s to slow, and only speed up what is needed. Or, make game design decisions that work around the performance issues (maybe there’s nothing wrong with discrete movement).

Navigation in my game isn’t perfect, but it’s fairly simple. Movement is, indeed, discrete steps, but the GUI fills in the step-by-step position with a smooth animation. That way, the networking doesn’t care what pixel you’re at; just what (much larger-grained) nav coord you’re on.

Certainly it’s good to think ahead when designing your architecture, but that’ll come with experience. If you have the time to experiment, just take it step by step and learn along the way.

@Nyhm - Of course you’re right. Many games fails because we programmers do too much “gold plating” and focus on the last 5 % of the game, instead of focusing on the gameplay.

Your suggestion about smooth animation transistion between tiles is defninitely something I’m thinking about, and is a very good suggestion. At least it could be an intermediate steps towards smooth movement.

If anybody tests the multiplayer code - please tell me how it “felt” :-).

I ran your game last night, but only ran one client. I think it felt the same as the prior version, which implies that the client-server code works fine. One time I swear I walked through a zombie without attacking it, but maybe it side-stepped and I missed the movement (it was at night). I still became dominated by zombies in about 1 night.

Nice!! :-)))

@Nyhm - Thanks a lot for the feedback.

The “moving through a zombie” bug has been verified, will fix :-).