Author Topic: Hase Prototype 2  (Read 4821 times)

Ziz (OP)

  • *
  • Posts: 284
    • http://ziz.gp2x.de
Hase Prototype 2
« on: July 24, 2014, 05:16:26 pm »
Hi guys,

some months ago there were some kind of contest in the Pandora board with the goal to make a crappy game. I thought this would be a good opportunity to give an idea a try, which I had a long time.

Worms in Space. With Gravitation fields. And hares instead of worms.

So I made a prototype of the idea and even tested it on the GCW, because the recalculation of the gravity field was quite time expensive and I needed to test it on different devices. At this time, I didn't own a Pandora, but a GCW and a GP2X, so I tested it for them.

That does it look like in the past:
<a href="https://web.archive.org/web/20190313214014/https://www.youtube.com/watch?v=lATtwxgTeuY" target="_blank">https://www.youtube.com/watch?v=lATtwxgTeuY</a>

As said, this version already run on the GCW. But one rule for the competition was "Pandora only". Don't ask me, why I observed the rules, the whole competition was crap (pun included).

However the game and the idea rested for some time. I made the OPKManager, I finished Snowman, but some weeks or months ago I started to work on it again. The new goal was: Implementing networking. I never did this before, I don't have some kind of "own" server (just a but webspace from ED + a mysql database). So I did another approach. If you are interested, feel free to read about my idea here, I am too lazy to write two texts:

http://boards.openpandora.org/topic/16708-hase-prototype-two/

The basic idea is: The server is a php script, which stores the game data in a mysql database.

The result looks like this:
<a href="https://web.archive.org/web/20190313214014/https://www.youtube.com/watch?v=YJF4NufZLlQ" target="_blank">https://www.youtube.com/watch?v=YJF4NufZLlQ</a>
But of course smaller on the GCW. I tried to improve the GUI, however the screen is quite small, so it will always look a bit overfraught. But it runs!

Here is the opk to try:
http://ziz.gp2x.de/downloads/hase/hase.opk

Please keep in mind: This is a prototype! This means: It is not feature complete (not even close to it) and I focused to the goals of the two prototypes: fast gravitation recalculation and working Network implementation.

For now the game is freezed, but I think you already have a lot of fun with it. Later if I find spare time, I will implement
  • Teams instead of one-hare-action
  • Improved handling
  • More weapons
  • different level size
  • Speeds optimizations
  • Maybe some warnings like "If you jump now, you will float in space and DIE"
  • Better camera (with following the bullet e.g.)
  • Ponys.

Greetings and enjoy the game. Be kind, there are  ~2 months of work in it.
I am a leaf on the wind - watch how I soar. Wash

Ziz (OP)

  • *
  • Posts: 284
    • http://ziz.gp2x.de
Re: Hase Prototype 2
« Reply #1 on: July 24, 2014, 05:55:19 pm »
It has happened!

I played my first game over internet with another human player, but not with some random human player on some random machine, but with zear in another country on his GCW!
Pandora vs. GCW! This is so AWESOME!

I think I really should implement chatting while ingame.

Greetings,
Ziz

PS: I won. But I made the game, so I think in fact that doesn't really count...
I am a leaf on the wind - watch how I soar. Wash

Nebuleon

  • Guest
Re: Hase Prototype 2
« Reply #2 on: July 24, 2014, 10:21:12 pm »
The game plays fine (I played a game with zear and 3 more people after the game you played, all on GCW Zeroes I think). But there's a problem with the turns.

You wait for turn data for a long while. And when you receive it, you play it back in real time. So if someone else takes a 25-second turn, you wait 25 seconds for the turn data to be transmitted, then display the other person's 25-second turn, and then... you have 5 seconds of turn for yourself (?).

Perhaps it would be best if one of these two things happened:
a) The initiating player sends turn data at the end, and gets a replay of his/her own turn at the same time as everyone else gets it. The next turn starts when everyone has replayed the turn.
b) Turn data is sent a few frames at a time, then broadcast to everyone.

On our first game, zear reported having won on IRC, then I got the "waiting for turn data" for over 20 seconds for sabotender and zear in multiple turns, and I saw "zear won!" 2 minutes 20 later.
« Last Edit: July 24, 2014, 10:23:45 pm by Nebuleon »

Kouen Hasuki

  • *
  • Posts: 155
Re: Hase Prototype 2
« Reply #3 on: July 24, 2014, 10:43:17 pm »
As we touched on in IRC I feel the font could be a touch larger to aid readability and also maybe change the controls in the menu's as its really hard to navigate.

Inside the game it mostly works great though while we are waiting for the other players maybe some elevator music or something :)

Overall I have had a blast playing it already!

Lasharus

  • Posts: 2
Re: Hase Prototype 2
« Reply #4 on: July 24, 2014, 10:46:38 pm »
I was another one of those playing in the game mentioned by Nebuleon. Good laugh, but needs some refining, obviously. Don't have too much to say that hasn't already been said though, so I'll leave it at this:

Great work, as a proof of concept it already had me giggling. Keep going! :)

Nebuleon

  • Guest
Re: Hase Prototype 2
« Reply #5 on: July 24, 2014, 11:01:27 pm »
Yeah, this is a very fun multiplayer game concept :)

zear

  • * Moderator
  • Posts: 2379
Re: Hase Prototype 2
« Reply #6 on: July 24, 2014, 11:23:35 pm »
Here's a couple screenshots I took while we played:




All of us running it on GCW Zeros :)

Ziz (OP)

  • *
  • Posts: 284
    • http://ziz.gp2x.de
Re: Hase Prototype 2
« Reply #7 on: July 25, 2014, 07:48:42 am »
The game plays fine (I played a game with zear and 3 more people after the game you played, all on GCW Zeroes I think).
I saw this in the server logs. Awesome!

Quote
But there's a problem with the turns.

You wait for turn data for a long while. And when you receive it, you play it back in real time. So if someone else takes a 25-second turn, you wait 25 seconds for the turn data to be transmitted, then display the other person's 25-second turn, and then... you have 5 seconds of turn for yourself (?).

Perhaps it would be best if one of these two things happened:
a) The initiating player sends turn data at the end, and gets a replay of his/her own turn at the same time as everyone else gets it. The next turn starts when everyone has replayed the turn.
b) Turn data is sent a few frames at a time, then broadcast to everyone.

On our first game, zear reported having won on IRC, then I got the "waiting for turn data" for over 20 seconds for sabotender and zear in multiple turns, and I saw "zear won!" 2 minutes 20 later.
In fact this happens:

There are two background threads. One for pushing data to the server if it is your turn and one for pulling data from the server if it is the turn of an human opponent from the internet.

One second after the start of your turn your first second is pushed to the internet and ready to be pulled from the others players. Then every second 1,5KB turn data are committed. So if everything works fine you only have to wait a few seconds between the turns and of course not wait for AI turns. So in fact no time to watch a replay of you own turn... But as you mentioned correctly, this seem not to work all the time. In fact I don't really know the exact reasons, but possible would be:
  • Every further delay is added to the whole latency. So if the game takes longer, the latency grows, it can't decrease atm.
  • Maybe the GCWs wifi chip tries to "collect" some data before it sends them out to save energy. The pandora does that (for both directions). It is possible to deactivate it on the pandora, but then you consume more energy
  • The changes in the database are not instant. Maybe ED's MySQL database tries to cache some data for speed up reasons, too. Even if it would only be 500ms, as said before: The would accumulate to a quite big waiting time.

I have some approaches of solving this issue.
  • Implementing ingame chat to use the waiting time to insult enemy players. In fact the chat observer thread is still running, but not used.
  • If the latency gets too big the turn of the opponent is calculated in double speed. But I have to have a deeper look, whether this works - or not. ;)

Thanks for the other feedback, too!

I know, there is still a lot of work and I don't know, whether all goals can be achieved.

However I did another small changes yesterday evening (in bed ^^). The camera moves now with a little latency and tries to follow the player and the bullet. Furthermore it is not jumping around anymore, so hopefully you get a better idea of the level and the position of others players.
Furthermore I added Hase to my own repository script for the OPKManager.
Zear, would you mind, if I would use one of your screenshots for this purpose?

New version (Same link as old version):
http://ziz.gp2x.de/downloads/hase/hase.opk

Greetings,
Ziz
I am a leaf on the wind - watch how I soar. Wash

zear

  • * Moderator
  • Posts: 2379
Re: Hase Prototype 2
« Reply #8 on: July 25, 2014, 11:45:10 am »
Zear, would you mind, if I would use one of your screenshots for this purpose?
I wouldn't. In fact, I already asked all the participants of that game if I can publish screenshots including their nicks and they all agreed.

Ziz (OP)

  • *
  • Posts: 284
    • http://ziz.gp2x.de
Re: Hase Prototype 2
« Reply #9 on: July 25, 2014, 12:30:13 pm »
Zear, would you mind, if I would use one of your screenshots for this purpose?
I wouldn't. In fact, I already asked all the participants of that game if I can publish screenshots including their nicks and they all agreed.
Great! I used the second one. :D

Btw, something I forgot to tell: I saw, that three ghosts of games you had remained. I know this happens if the game crashes or is killed. So I use the chat thread running in the background now at heartbeet. If for one minute no chat thread connects to the server all users are probably dead, so the game can be closed. ;)

The next days / weeks I will implement, that a finished game is not just closed, but you find yourself back in the game view of the lobby after a game. ;)
I am a leaf on the wind - watch how I soar. Wash

Ziz (OP)

  • *
  • Posts: 284
    • http://ziz.gp2x.de
Re: Hase Prototype 2
« Reply #10 on: July 26, 2014, 12:23:45 pm »
So, today I tried to implement Replays. I hope I didn't break anything. Unfortunately only new games are able to create Replays. The Replays will stay one week at the server. ;)
<a href="https://web.archive.org/web/20190313214014/https://www.youtube.com/watch?v=R__ywjdzLos" target="_blank">https://www.youtube.com/watch?v=R__ywjdzLos</a>
« Last Edit: July 26, 2014, 08:31:51 pm by Ziz »
I am a leaf on the wind - watch how I soar. Wash

Kouen Hasuki

  • *
  • Posts: 155
Re: Hase Prototype 2
« Reply #11 on: July 26, 2014, 03:57:46 pm »
Here is how it looked on my Zero, Could be handy for you Ziz to see how its rendering.

<a href="https://web.archive.org/web/20190313214014/https://www.youtube.com/watch?v=ZE6VQyUfiKI" target="_blank">https://www.youtube.com/watch?v=ZE6VQyUfiKI</a>

Ziz (OP)

  • *
  • Posts: 284
    • http://ziz.gp2x.de
Re: Hase Prototype 2
« Reply #12 on: July 26, 2014, 07:39:30 pm »
Epic! :D
I am a leaf on the wind - watch how I soar. Wash

Ziz (OP)

  • *
  • Posts: 284
    • http://ziz.gp2x.de
Re: Hase Prototype 2
« Reply #13 on: July 26, 2014, 08:33:37 pm »
I fixed a BIG bug in the "pulling from server"-method. Instead of getting the newest data, it always started from the beginning... That explains, why it takes a long time in the end of the game to get the opponents turn. New version as always: http://ziz.gp2x.de/downloads/hase/hase.opk
I am a leaf on the wind - watch how I soar. Wash

Kouen Hasuki

  • *
  • Posts: 155
Re: Hase Prototype 2
« Reply #14 on: July 27, 2014, 06:19:28 pm »
Updated my Zero :)

Ziz (OP)

  • *
  • Posts: 284
    • http://ziz.gp2x.de
Re: Hase Prototype 2
« Reply #15 on: July 29, 2014, 04:21:58 pm »
I implemented kicking of inactive players. If this player is the game master no Replay will be created (will fix this later).
An update is necessary for his. Please test this and tell me, whether it works or I broke something...

greetings, Ziz
I am a leaf on the wind - watch how I soar. Wash

Ziz (OP)

  • *
  • Posts: 284
    • http://ziz.gp2x.de
Re: Hase Prototype 2
« Reply #16 on: July 29, 2014, 05:28:35 pm »
As suggested in the channel I tried the gmenu2x font. Please tell me, whether this looks better or not. The CC-BY-SA hint will later appear in an "about" submenu. For now I tell in the title, that HiBan made this font. ;)
I am a leaf on the wind - watch how I soar. Wash

zear

  • * Moderator
  • Posts: 2379
Re: Hase Prototype 2
« Reply #17 on: July 29, 2014, 07:15:35 pm »
It looks much better. All the text is finally readable, including the button captions.

Ziz (OP)

  • *
  • Posts: 284
    • http://ziz.gp2x.de
Re: Hase Prototype 2
« Reply #18 on: July 30, 2014, 12:15:58 am »
It looks much better. All the text is finally readable, including the button captions.
Excellent!
I am a leaf on the wind - watch how I soar. Wash

Ziz (OP)

  • *
  • Posts: 284
    • http://ziz.gp2x.de
Re: Hase Prototype 2
« Reply #19 on: August 12, 2014, 09:47:54 am »
Be prepared!
<a href="https://web.archive.org/web/20190313214014/https://www.youtube.com/watch?v=R48QyCYTj7M" target="_blank">https://www.youtube.com/watch?v=R48QyCYTj7M</a>
I am a leaf on the wind - watch how I soar. Wash

 

Post a new topic