AS3 OOP Game Development Framework

I am wondering what is the best practice for gamedevelopment for actioncript 3. I am currently creating a tile-based game, but I already have problems with individual classes.

This is the current situation:

Main class

  • Creates tiles
  • Adds a player class
  • Adds an interface class.

An interface class contains all interface elements. For example, it is possible to call an object into the game. This object can be placed on the selected plate.

Now the problem is the following: the generated object is placed in the interface class, how should the generated object be able to communicate with tiles? The same problem occurs with several other parts in the game. How should a player be able to interact with a generated object? Everything in different classes makes communication between these things difficult.

Is there any standard game development routine that addresses this issue? I was thinking of creating a "world" class, where each object must be somehow placed. But it’s hard for me to actually do this with little knowledge of the kind of structure that I consider. For me this is all new, so I would appreciate it if the explanation was as possible proof of noob. Thanks in advance!

+3
3

, , - , , ,

, Robotlegs, , .
http://www.robotlegs.org/

Robotlegs.

+1

. -, World, , Map, Unit . Map, Tile, . , Unit , . Game, World, , Player, Game World, . , , World Map, Tile, , .

, - . , Model-View-Controller, , , , , , .

+1

. Singlepat Dispatcher , .

, , , .

0

Source: https://habr.com/ru/post/1771107/


All Articles