# Q\&A

**Q: I have Cell2D set up. Where do I start?**

A: Start by understanding the CellGame class. You'll probably want to make a subclass of CellGame to represent your game as a whole.

**Q: What's with all of the values of type** `long`**?**

A: Those values are measured in fracunits. See the Frac class for more details.

**Q: How can I make the game wait a certain amount of time before executing some code?**

A: Make an Event out of the code and pass it to an appropriate Thinker's `setTimerValue()` method.

### Space

**Q: How can I let the player interact with a SpaceState by mousing over/clicking on things in it?**

A: Use the CellGame's `getMouseX()` and `getMouseY()` methods to find out where the mouse cursor is on the screen. Then, use the appropriate SpaceState or Viewport's `getSpacePoint()` method to find the corresponding point in the SpaceState's space.

**Q: How can I make a SpaceObject stay at a fixed position on the screen?**

A: If the SpaceObject is just a display of information about the game world, like a health bar, then you should probably use the HUD class instead. If the SpaceObject represents an actual object in the game world, you can use the appropriate SpaceState or Viewport's `getSpacePoint()` method to find out where in the SpaceState's space the SpaceObject needs to be.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://cell2d.gitbook.io/cell2d-documentation/general/q-and-a.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
