# SPAMPIG Minigame for Crypto GameHUB

in #utopian-io7 years ago (edited)

SPAMPIG Minigame for Crypto GameHUB


Note: This gif has been sped up to compensate for a small file size as well as demonstrating the core mechanics.

Details


We (Wearecodex) have conceptualized our next big project and SPAMPIG will be the first step towards our goal.

SPAMPIG will be the first minigame to be implemented once Crypto GameHUB is developed.

In SPAMPIG you're in control of a spammer pig, your objective is to feed him flags and avoid upvotes.

Every minigame will contain a moral and revolve around that moral. The moral of SPAMPIG: The only attention spammers/trolls must be fed with are flags.

How to play

The objective is to catch as many flags and avoid providing the piggy with upvotes

The player is required to maneuver the piggy with the mouse to fulfill the objective accumulate flags.

How was it done?


There are 2 core mechanics present in this version, the objects & the pig.

The first core mechanic being the pig's movement.

All that's done is updating the pig's position to the position of the mouse.

    private void Update()
    {
        UpdatePosition();
    }

    private void UpdatePosition()
    {
        transform.position = Utility.MousePos;
    }

The second core mechanic is the interactable object's movement.

For this mechanic a Rigidbody2D component must be present in our object so it's subject to physics. Next we need to reverse gravity so everything has a upward pull.

Once the object is generated we will add a downward force to it to propel it downwards so the reversed-gravity will do it's job once the force has worn off.

    public override void Shoot(float force)
    {
        rb.AddForce(Vector2.down * force, ForceMode2D.Impulse)    
    }

It is also imperative to make sure the object is detrimental when a upward velocity is present as well as destroying the object when it exceeds the upper boundary of the screen.

    private void Update()
    {
        if (rb.velocity.y > 0 && objectType != Type.HOSTILE)
            Transform();
        
        if (rb.velocity.y > 0 && transform.position.y >= Utility.ScreenHeight)
            Destroy();
    }

How to install or modify


First you'd need to download the project from repo: https://github.com/wearecodexx/crypto-game-hub

How to Install:

Upload "UnityBuild" files to your web server or local server.
Open the index.html file.

How to modify:

You're required to install unity if you wish to modify this project, as this game is developed with Unity & C#.
After you've installed Unity all you've got to do is open the "UnityProject" folder with Unity.

Workspace


Roadmap


  • Sound effects and background music
  • Different types of flags/different points to score
  • Don't upvote mode. Only upvotes will fall and you have to move the pig to avoid them, score will show time instead of points.
  • Add variety to gameplay by introducing different objects & mechanics.
  • Design and integration of custom loading and splash screens.

Link to the game:


https://wearecodex.com/games/spampig/

How to contribute


If you wish to contribute to the project please contact @fabiyamada or feel free to join our discord server to discuss it further https://discord.gg/8ZNq3Ss.



Posted on Utopian.io - Rewarding Open Source Contributors

Sort:  

@alpacachino, congratulations on making your first post! I gave you a $.05 vote!
Will you give me a follow? I'll follow you back in return!

Congratulations @alpacachino! You received a personal award!

Happy Birthday! - You are on the Steem blockchain for 1 year!

You can view your badges on your Steem Board and compare to others on the Steem Ranking

Vote for @Steemitboard as a witness to get one more award and increased upvotes!

WWWWWWWWWWWWWWEEELCOMEEE!! to wearecodex team!!! I am really glad you appeared ;D This is only the first project of something huge! :D
AWESOME let's go for it!!:D

this look awesome .. thank guys for your job !!!! wearecodex!!!!!!

Hey @alpacachino! Thank you for the great work you've done!

We're already looking forward to your next contribution!

Fully Decentralized Rewards

We hope you will take the time to share your expertise and knowledge by rating contributions made by others on Utopian.io to help us reward the best contributions together.

Utopian Witness!

Vote for Utopian Witness! We are made of developers, system administrators, entrepreneurs, artists, content creators, thinkers. We embrace every nationality, mindset and belief.

Want to chat? Join us on Discord https://discord.me/utopian-io

Thanks for the contribution. It has been approved.

Hi, even though we talked about this on Discord I would like to reiterate it here

  • For future contributions please sort out your .gitignore file! The diff is so large it can't be viewed in the pull request and including so many changes makes it very difficult for us to see the work done.

I played it and it seems fun! I look forward to seeing what else you come up with!


Need help? Write a ticket on https://support.utopian.io.
Chat with us on Discord.

[utopian-moderator]

Hey, i appreciate it the review. Also thanks for listening to me on Discord, i'll make sure to fix this in future contributions :)

What a CUTE and FUN game! LOVE it @alpacachino

Thanks. I hope you enjoy it. Any sort of feedback is always appreciated :D

What the play. Ahaha I love this.

Congratulations @alpacachino! You have completed some achievement on Steemit and have been rewarded with new badge(s) :

You got your First payout
Award for the total payout received

Click on any badge to view your own Board of Honor on SteemitBoard.
For more information about SteemitBoard, click here

If you no longer want to receive notifications, reply to this comment with the word STOP

Upvote this notification to help all Steemit users. Learn why here!

@fabiyamada suggested I ask you about getting the Unity-built game to play on a web page. Is that part of what Unity can do or must you create special code to have the game play on a web page rather than as a downloaded game?

Coin Marketplace

STEEM 0.25
TRX 0.20
JST 0.035
BTC 95284.46
ETH 3462.33
USDT 1.00
SBD 3.49