dir.by  
  Поиск  
Компьютер, программы
Разработка игр | для телефонов на Unity, MonoGame | для браузера Google Chrome на JavaScript, HTML | рисуем графику
Моя игра "Animal Go". Технологии: C#, MonoGame, Windows, Android, iOS
 My game is "Animal Go". How to play. Description | The game is written in C# using MonoGame (runs on platforms: Windows, Android, iOS) 
посмотрели 5893 раз
обновлено: 22 September 2023
Goal of the game: Do not let the enemy pass.
How to Play: You need to put the heroes on the playing field.
Download my C# code from github.com
Windows
Android
iOS
My philosophy for writing a game in C#
1) I write code for C# (game) and then after a while I look at the C# code in this game and see that something is not logical.

2) Or you can imagine that the 2nd programmer looks at C# the code of my game and does not understand everything, that is, something is not logically written.

The 1st and 2nd points mean that my c# program (game) is poorly written and the classes are very much tied to other classes.

As a result:
• To change the logic of the game, you have to be wise
• To add new functionality (a new hero in the game), you have to write a lot of code and the program becomes very complicated

I rewrote the game several times and if I see that something is not logical (point 1 and point 2), then I rewrite it again.

The program is written PERFECTLY, which means:
• Easily add new objects to the C# program (with a small and understandable C# code), that is, the program is easily expandable
c# the game can be written by 2 people and c# the code becomes more, the program is understandable
• It is important that c# the game can be easily rewritten into another programming language, for example, Java
Game structure (files)
When writing a game, you get a lot of C# classes.
For each C# class I create my own .cs file
D:\MyGit\MyGame_AnimalGo_MonoGameCSharp
        Android
                Activity1.cs
        iOS
                Program.cs
        Windows
                Program.cs
        GameLogic

                Game1.cs

                MyGame
                        ImageType.cs
                        MyGame.cs
                        MyGraphic.cs
                        MySettings.cs
                        MyTexture2D.cs
                        MyTexture2DAnimation.cs
                        interfaces
                                IMyGraphic.cs
                                IMyTexture2D.cs
                                MyColor.cs
                                MyPoint.cs
                                MyPointF.cs
                                MyRectangle.cs
                                MySize.cs

                MyLevels
                        MyLevel.cs
                        MyLevelIntro.cs
                        interfaces
                                IMyLevel.cs

                MyUnits
                        AnimPictureDieByTime_Template.cs
                        BackgroundSquad_Template.cs
                        Fire_Morkovka.cs
                        Fire_Template.cs
                        Trajectory_Template.cs
                        Unit_DogGo.cs
                        Unit_EnemyBird1.cs
                        Unit_EnemyPauk.cs
                        Unit_EnemyZmeia.cs
                        Unit_KrolikStayAndFire.cs
                        Unit_Template_FireOnDistanceIfSeeEnemyUnit.cs
                        Unit_Template_StopAndHitIfNearOtherUnit.cs
                        UnitWillAppear_Template.cs

                        interfaces
                                IAnimPictureDieByTime.cs
                                IAnimPictureDieByTime.cs
                                IFire.cs
                                ITrajectory.cs
                                IUnit.cs
                                IUnitWillAppear.cs
The game logic is written as a library and the same code is used for different platforms
All the logic and drawing of the game is written in the library GameLogic.
 
Project Android uses the GameLogic library.
 
Project iOS uses the GameLogic library.
 
Project Windows uses the GameLogic library.
 
← Previous topic
Habr story [kavichka]Network game Tanks in HTML, JavaScript[kavichka] (nodejs, socket.io for the web, PixiJs library for graphics)
 
Next topic →
How do I write a game "Animal Go" on a computer Windows. I compile, get the exe file and run it | C#, MonoGame
 
Your feedback ... Comments ...
   
Your Name
Your comment (www links can only be added by a logged-in user)

Экскурсии по Москве Экскурсии по Москве: пешеходные, автобусные и речные прогулки на любой вкус
Анонс! Ярмарка вакансий для молодежи, работа (учащихся, которые хотели бы подработать в свободное время, а также выпускники)|||Минск, Витебск, Гомель, Гродно, Могилев, Борисов, Полоцк, Брест, Барановичи, Пинск с 13 по 17 апреля 2026
  Объявления  
  Объявления  
 
Моя разработка игр на HTML, Javascript, Typescript
Пишем игру используя HTML, JavaScript, TypeScript в Visual Studio Code. Я создал несколько ts файлов. Поэтому использую Webpack (собирает все файлы в один js)
Анимация человечка на месте. Используем HTML элемент <div>. Для анимации используем CSS стили: "animation", "background-image", "background-position", "keyframes"
Анимация человечка в движении (sprite). Используем HTML элементы <div>, <img>. Для анимации используем CSS стили: "animation", "background-image", "background-position", "keyframes"
My Game "Wizard World" | HTML, JavaScript
Habr story [kavichka]Network game in HTML, CSS and JavaScript[kavichka] (nodejs, socket.io for the web, HTML canvas for graphics, game maps in js are set)
Habr story [kavichka]Network game Tanks in HTML, JavaScript[kavichka] (nodejs, socket.io for the web, PixiJs library for graphics)
Моя игра "Animal Go". Технологии: C#, MonoGame, Windows, Android, iOS
My game is "Animal Go". How to play. Description | The game is written in C# using MonoGame (runs on platforms: Windows, Android, iOS)
How do I write a game "Animal Go" on a computer Windows. I compile, get the exe file and run it | C#, MonoGame
How to compile and run the game "Animal Go" on your phone or in emulator mode Android on your computer (Windows) | C#, MonoGame
How to compile and run the game "Animal Go" for the system iOS | C#, MonoGame
Создание графики, анимации для 2D игры
Какую рисовать картинку для 2D игры: растровую картинку png по точкам или векторную картинку svg по линиям?
2D анимация для игры

  Ваши вопросы присылайте по почте: info@dir.by  
Яндекс.Метрика