metaloph1l / pacman

2 stars 1 forks source link

Basic Client-Side Representation (ui, Java2D) #3

Open metaloph1l opened 12 years ago

metaloph1l commented 12 years ago

Work out a basic optical client-side representation of the game. Should be extensible if sprites are used later on.

We should use Java2D. But we need to decide if we load images (SVG or Bitmaps) or if we override a couple of paint methods and use hard coded drawing operations to create the GUI elements.

Package: at.ac.foop.pacman.ui

spookyTU commented 12 years ago

I would prefer images because then we are able to change graphics just by changing the images (and not the source code). Furthermore it allows a leaner code.

lanoxx commented 12 years ago

Yes I agree. I have created a few simple swing classes today. For the start I used blue and black fields just to be able to display anything. So the next step would be to replace the drawing code with some image loading code and also create some sensible images.

Maybe someone can find some open source icons here: http://findicons.com/

spookyTU commented 12 years ago

In our representation is there only one type of wall? Or will we have different types (e.g. horizontal, vertical, corner....). This is also related to #1

metaloph1l commented 12 years ago

Implement different types, but for the moment one graphical wall type should suffice. Use the one graphical representation you draw for all the wall types and make extensible for a later point in time.

spookyTU commented 12 years ago

Ok, I was just thinking about how we process this information. We could introduce different kind of wall-types already in the labyrinth (not representations but kind of walls, horizontal, vertical... I'm not sure if the SquareType-Enum was intended for this) or just let the client handle the representation itself. For example could we have an algorithm that detects how and if walls are connected (for example we have three walls in a row (vertical) and then two to the right it automatically connects them with a corner wall (a specific representation)).

metaloph1l commented 12 years ago

You are correct. The SquareType-Enum wasn't intended for this in the first place. Actually I don't know how to implement it. Maybe you can come up with a simple way? If not it would be best to stick with exactly 1 type of wall.