Space Invaders v0.03 (Now real-time!)

I made this:

http://textadventures.co.uk/games/view/fxslqq9snu2iqhul8rufpq/space-invaders

Questions:

1: How bad is the lag for the website version.
2: Is everything working well when it comes to using keyboard?
3: What you think about making a game like this, but more complicated, is it worth it?


First comment: Unplayable online...
the lag time could be measured in seconds.
BUT, I am probably the worse case scenario... I have satellite internet.
Nothing is ever fast when 44,000 miles is added to the distance!


Local: I like it!
single key, move and shoot!
(Need the alien to shoot back too.)
Not timer but it responds well on keyboard key presses...
From your code, looks like you have an interesting start to a good game!


version 0.02 changelog:

  • Added ground tiles.
  • Made the weapon transparent so the ground tile behind it is visible.
  • Changed the projectile sprite.
  • Added proper credits.
  • Fixed the Alien leaving the game area.

Thank you for your feedback DarkLizerd.

The Plan

In the next version you should expect the alien to shoot back and there to be some sort of health bar.

Anyway, I need to figure out how to make the game handle creating multiple objects on the run.
I will call this Multiple-Objects-Handling, and until I figure it out I won´t add anything more complicated.

When THAT issue is solved, I will try to figure out how to make this real time instead of turn based.


There is a timer for that.
just set it for 1 second and have that move the alien ship and the shots...


I am afraid that is not possible in Gamebook editor style, which THIS game is built in.


OOPS!


You're right, the online is laggy.
But the game works fine.


version 0.03

-The game is now real-time.
-The Alien now shoots back.


The game has been successfully converted into a Text Adventure from Gamebook style.
There are slight issues and occasional minor bugs, and I am quite inexperienced with TA editor style.

But hopefully this will make the Multiple-Object-Handling easier.


buggy: yes! but you already knew that... :)
You need to disable the "shoot again" until after the player shot reaches the top row.
I've noticed that I can shoot, dodge the UFO's shot, move under the UFO and shoot again and hit it because my shot moves
to my column, but not to my row-1...
Looks like your code mixes text and graphics (badly)...
Someone posted a short demo game that shows how to do the graphics on the screen.
The code I have is called Map, but I'm not sure where I got it from.
That may fix your display and make it move a little better.
(looking again for the original post.)


Maybe some one will recognize their code...
It is a short little graphical example where you have an island and you move the player on the screen.
you used MapBox to draw boxes and MapSet to color a pixel.


The bug was found and fixed.

I was experimenting with using the TA "Clone object" function to create multiple shots and I forgot to turn it off.
There is no such thing as code mixing text and graphics, there is only bad code and good code.


Posting here so the thread won´t get auto-locked.

Also keyboard is broken and busy with real life.


How would one go about making something like this, for a dungeon, with encounters in said dungeon, using Quest?

http://www.lutanho.net/play/laby.html


Sebastian will have to help with the graphics aspect...

but if you just want to implement some of the basics aspects of D&D, such as monsters that move towards you:

look up 'path finding' and/or 'random map generation' (by Jay: jaynabonne) in the libraries and code sample forum board

basically, the trick is to give all of your rooms an 'x_coordinate' and 'y_coordinate' Integer Attributes

then, you can compare the room's coordinates that you're in with the room's coordinates that the monster is in, and have the monster move accordingly, for example:

// starting positions/rooms:
// (a 10x10 perfect square grid for the "map" of your game, 100 rooms total, 10 rows of rooms and 10 columns of rooms)

you: room_1x1
monster: room_10x10

<game name="example_game">
  <attr name="room_list" type="objectlist">room_1x1; X...X ; room_10x10</attr>
</game>

<object name="room_1x1">
  <inherit name="room_type" />
  <attr name="x_coordinate" type="int">1</attr>
  <attr name="y_coordinate" type="int">1</attr>
</object>

// the other 98 rooms...

<object name="room_10x10">
  <inherit name="room_type" />
  <attr name="x_coordinate" type="int">10</attr>
  <attr name="y_coordinate" type="int">10</attr>
</object>

<type name="room_type">
  // these (to be inherited) Attribute's Values will be over-writen by the Object's own x/y coord Attribute's values
  <attr name="x_coordinate" type="int">0</attr>
  <attr name="y_coordinate" type="int">0</attr>
</type>

<object name="monster">
  <attr name="parent" type="object">room_10x10</attr>
</object>

<object name="player">
  <attr name="parent" type="object">room_1x1</attr>
  <attr name="changedparent" type="script">
    <![CDATA[
      x = 0
      y = 0
      if (player.parent.x_coordinate > monster.parent.x_coordinate) {
        x = monster.parent.x_coordinate + 1
      } else if (player.parent.x_coordinate < monster.parent.x_coordinate) {
        x = monster.parent.x_coordinate - 1
      }
      if (player.parent.y_coordinate > monster.parent.y_coordinate) {
        y = monster.parent.y_coordinate + 1
      } else if (player.parent.y_coordinate < monster.parent.y_coordinate) {
        y = monster.parent.y_coordinate - 1
      }
      foreach (room, game.room_list) {
        if (room.x_coordinate = x and room.y_coordinate = y) {
          monster.parent = room
        }
      }
    ]]>
  </attr>
</objct>

the above code example still needs to be adjusted to deal with some handling issues... but I'm too lazy to do so, as it's just an example for you to get an idea of how this is done.


Development of this game is delayed until September.


Another comment to keep this thread from auto-locking.

Well, I have nothing to report on, except my life.
I am a teenager that spent the entire summer making pizza and I hoped that I would have time to delve back into my coding binges once the season was over, but I am already getting invited into another restaurant that serves pizza out of the summer season so now I cannot even promise that I will return to this game at all.

Did I know to make pizza two months ago? Nope.
I will let my life fall like a feather and see where it lands.


This is cool, Sebastian2203!

I can only tell the screen is clearing when I enter too many moves at once, too! (Or I think I see that happening sometimes...)

I gotta go kill this stinking bad guy now...

Great work!

Best wishes!


So you're mostly done and have a working game, besides a few minor glitches, and you're dumping the game without publishing it?
*cough
At LEAST publish the game.


Log in to post a reply.

Support

Forums