Welcome, Guest. Please login or register.

Login with username, password and session length

 
Advanced search

1411424 Posts in 69363 Topics- by 58416 Members - Latest Member: JamesAGreen

April 19, 2024, 08:07:07 AM

Need hosting? Check out Digital Ocean
(more details in this thread)
TIGSource ForumsCommunityDevLogsBATTLECRUISER - minimalistic game about building ship from scraps
Pages: [1]
Print
Author Topic: BATTLECRUISER - minimalistic game about building ship from scraps  (Read 2163 times)
pixeye
Level 1
*


You have my mace


View Profile WWW
« on: April 28, 2017, 03:04:26 AM »


The Battlecruiser is a game about building a gigantic space battleship from scraps. Construct, adapt and protect your mothership to fly away from dying world.

Game site
Facebook page
Watch me making the game on Twitch


Hi everyone: ) I've decided to start the diary about the game I develop and I will share my experience of creating a game from scratch and cover up pitfalls I encounter.






« Last Edit: November 05, 2017, 12:23:26 AM by pixeye » Logged

pixeye
Level 1
*


You have my mace


View Profile WWW
« Reply #1 on: April 28, 2017, 03:07:16 AM »

The battlecruiser is built from the small platforms. Player connects them to each other by dragging free platforms from space.



Player sends little probes to rip new platforms from space garbage : )

Logged

pixeye
Level 1
*


You have my mace


View Profile WWW
« Reply #2 on: April 29, 2017, 03:47:38 AM »

Building up the battlecruiser from platforms!

https://i.gyazo.com/799db9c3c84bd6118c3e1c8ead0f744b.mp4

I needed a random pick to spawn platforms with different amount of pins. There is a useful trick to make some random pick up. ( Well, mostly everyone knows how to do it, but I'll post for the beginners )



Now you can do something like this:


 int sidesAmount = new float[4] { 50f, 25f, 18.5f, 6.5f }.ReturnRandom();

The idea is that only linked to "reactor" node platforms will be active. So I had to do some checkings if our platforms can reach the main node from a chain of connections.



With 4 sided platforms we can easily check neighbors for active pins. So the pin indexed 1 will refer to pin 3 from the right sided neighbor.

At first, I used the method from screen, but there is an alternative way to get pin index : )

 for(int i = 0; i < 4; i++)
{
index = (i + 2) % 4
}
Logged

Zireael
Level 4
****


View Profile
« Reply #3 on: April 29, 2017, 11:07:15 AM »

Looks like a really neat concept!
Logged
pixeye
Level 1
*


You have my mace


View Profile WWW
« Reply #4 on: April 30, 2017, 04:42:20 AM »

Looks like a really neat concept!
Gentleman thanq sir! : )


I like the way price is shown in another brilliant game, Kingom: New lands.


I made a script to generate price nodes in nice looking rows with some "arc" effect. Feel free to take it if needed or maybe you can see how to improve it ; )
Code:
 [SerializeField]
        private int currentPrice = 0;
        [SerializeField]
        private float size = 1.0f;
        [SerializeField]
        private Transform[] nodeObjs;
        [SerializeField]
        private float arcSize = 0.1f;
        [SerializeField]
 
 /// <summary>
        /// Bad in math. Good in bed.
        /// </summary>
        void CalculateNodes()
        {
 
            // Add nodes to array with we will work
            Transform[] nodes = new Transform[currentPrice];
            for (int i = 0;i<nodeObjs.Length;i++)
            {
                nodeObjs[i].gameObject.SetActive((i<currentPrice)?true:false);
                if (currentPrice>i)
                nodes[i] = nodeObjs[i];
            }
 
            // we will calculate single row length based on amount of price nodes.
 
            int rowLength = currentPrice / 2;
 
            if (currentPrice < 7)
                rowLength = currentPrice;
 
 
            float zPos = 0;
 
            float extraOffset = 0;
   
            for (int i = 0; i < currentPrice; i++)
            {
 
                float offset = 0;
                float arcRatio = 0;
                float yHeight = 0;
         
       
 
                if (i < rowLength)
                {
                    zPos = size * 1.25f;
                    extraOffset = 0;
                    if ((rowLength % 2) == 0)
                        extraOffset = size * 0.5f;
                    offset = (rowLength / 2 * size - extraOffset) * -1;
                    arcRatio = Mathf.PingPong((float)i / (float)(rowLength-1), 0.5f);
                }
                else
                {
                    zPos = 0;
                    extraOffset = 0;
                    if (((currentPrice - rowLength) % 2) == 0)
                        extraOffset = size * 0.5f;
                    arcRatio = Mathf.PingPong((float)(i-rowLength) / (float)(currentPrice-rowLength-1), 0.5f);
                    offset = ((rowLength*size) + ((currentPrice-rowLength) / 2 * size - extraOffset)) * -1 ;
                }
                yHeight = Mathf.Sin(arcRatio * Mathf.PI)*arcSize;
                nodes[i].localPosition = new Vector3(offset + i * size, yHeight, -zPos);
            }
 
        }
Logged

pixeye
Level 1
*


You have my mace


View Profile WWW
« Reply #5 on: May 01, 2017, 09:47:16 AM »

The final process of buying anything in the game. Right now you get the structure immediately, but you will need special drones in future to build turrets.

Logged

pixeye
Level 1
*


You have my mace


View Profile WWW
« Reply #6 on: May 15, 2017, 01:25:47 PM »

been a while since I've updated the thread. I've implemented a lot of stuff to game.
Modules on platforms :

Reactor module - the heart of the ship. All other modules links to the reactor. If the link chain breaks the module goes
inactive untill the chain restored.
Drone bay - you can excange one of your probe to builder drone. Drones construct other modules.
Energy shield module - an energy shield that can be filled 4 times. Protects nearby modules from attacks.
Turret - kills everything suspicious : )

I've also added enemies. They spawn around your big ship and try to destroy reactor module. They can choose target based on special "threat" level.

The last adding is the Battlecruiser itself. The Battlecruiser is divided in 5 huge decks with slots to fill with platforms u find in space. Right now I've added the "main" deck.

Logged

Fat Pug Studio
Level 2
**


View Profile WWW
« Reply #7 on: May 16, 2017, 02:54:32 AM »

Cool, so nice of you to share the coding insights too!
Logged

pixeye
Level 1
*


You have my mace


View Profile WWW
« Reply #8 on: May 25, 2017, 02:34:59 PM »

Thanks, Fat Pug Studio! : )  Gentleman  Beer!
I've recorded an update video to show the summary of work I've done til today.





Also who is interested in shader that paints parts of the model in custom color, can find implementation in my blog



Coloring Specific Parts of a Model in Unity3d
Logged

pixeye
Level 1
*


You have my mace


View Profile WWW
« Reply #9 on: June 10, 2017, 03:00:43 PM »

Hey ho! The second update of the Battlecruiser game where I talk about some utility scripts and simple shaders.




I've also made a simple library for fading out groups of objects similar to canvas group but for any kind of objects, not only UI. About render group lib

Logged

lolo
Level 0
**



View Profile WWW
« Reply #10 on: June 10, 2017, 09:05:47 PM »

This looks like the perfect base building game.
Logged

McDROID he had a farm ee-eye, ee-eye-oh.
pixeye
Level 1
*


You have my mace


View Profile WWW
« Reply #11 on: October 24, 2017, 05:39:51 AM »

Setup of the reactor. You need energy to link more modules to the battlecruiser.



Link on reddit
Logged

pixeye
Level 1
*


You have my mace


View Profile WWW
« Reply #12 on: November 05, 2017, 12:20:23 AM »

I've made a time lapse for fun to show process of creating desolate planet on the background of the game.
It was pretty tricky to show really huge scaled objects in the scene without weird glitches so I've ended up using second camera for my background.

I use amplify shader editor and tools for post effecting.







Logged

Lowbit
Level 0
***



View Profile WWW
« Reply #13 on: November 05, 2017, 12:12:06 PM »

Quote from: pixeye
I've made a time lapse for fun to show process of creating desolate planet on the background of the game.

Best four minutes of my day. That planet couldn't have turned out better, although calling it desolate might be a bit of an understatement.
Logged
pixeye
Level 1
*


You have my mace


View Profile WWW
« Reply #14 on: November 07, 2017, 07:59:03 AM »

Quote from: pixeye
I've made a time lapse for fun to show process of creating desolate planet on the background of the game.

Best four minutes of my day. That planet couldn't have turned out better, although calling it desolate might be a bit of an understatement.

Thanks Smiley Ye, it might be confusing. Sometimes I don't know how to name things in english in a proper way.






In the game, you will find some huge enemies, sort of bosses. The first one is a big spawning cruiser with portals to spawn swarms of little droids. He appears randomly and stays for a while, generating swarms. The warship armed with big turret gun and rockets. Rockets used when significant danger occurs and can destroy player's corvette with one hit. A player can stop this ship by destroying portals and modules on it.
Logged

pixeye
Level 1
*


You have my mace


View Profile WWW
« Reply #15 on: November 12, 2017, 02:06:58 AM »

Hello Pilots! Currently, I'm working on the creation of a combat system. Your ship is not very strong and will not hold a lot of damage. The video below shows an example of a battle in the game.
 
The other news is that I finally created a Discord channel for the game. I hope we will have a lot of fun there.

Do you like the pace of fighting on video below?



Logged

Pages: [1]
Print
Jump to:  

Theme orange-lt created by panic