Showing posts with label Games. Show all posts
Showing posts with label Games. Show all posts

26/09/2021

[Unity] Fury Farm

A sample 3D shooter game made with Unity.

Get the code from the repo or play online.

The animals have gone mad, defend your farm from their rage.

Controls:

AD - move left/right

SPACE - shoot

R - restart level

Q - quit

Interesting notes:

  • FindObjectOfType<OBJECT_NAME>(); get an object in a script without binding it in input
  • "this" is actually gameObject within a script
  • InvokeRepeating("METHOD_NAME", START_DELAY, REPEAT_RATE); added to an Awake or Start method, will ensure the given method is called repeatedly according to configuration
  • Random.Range(MIN, MAX) gives a random float between MIN and MAX both inclusive
  • WebGL default screen size is 960x600, the game default aspect is "Free Aspect" (top left of Game tab), change in File->Build Settings->Player Settings the resolution for WebGL to match a different one and set the Game aspect to the same to test how would it look like on the user screen
  • Cooldown logic can be added by tracking a float variable and updating it with -Time.deltaTime every frame, then checking if its value is less than some threshold to allow the player to execute the action again

24/09/2021

[Unity] Fury Skies

A sample 3D plane flying project made with Unity.

Get the code from the repo or play online.

Much anticipated sequel to the exciting Fury Roads, it's time to elevate your rage to the skies.

Controls:

WS - pitch (up/down)

SPACE - turbo

X - invert pitch controls (down/up)

R - restart level

Q - quit

PrintScreen - take a screenshot of that beauty in action

Alt+F4 - close your browser and go take a walk with your mask on

CapsLock - bring that rage to the comments section

 

Interesting notes:

  • GameObject component inheritance seems to behave differently from OOP inheritance, not all parent Components are inherited by the children (but are accessible via GetComponentInParent)
  • Time.deltaTime can be used in transforms to equalize values between different systems running at different framerates
  • FixedUpdate should be used to update physics related stuff (eg movement)
  • 3D is weird: X axis = depth, Y axis = height, Z axis = width. So movement forward is on Z axis. Camera is not considered in the default transforms. I understand this is because Z axis is the direction the player is facing, making "forward" a Z change rather than X.
  • Instantiate(PREFAB_PARTICLE_OBJECT, transform.position, Quaternion.identity).Play(); will spawn the particle effects in the current object position. Invoke this before destroying whatever you collided with and get an explosion animation.
  • 3D particles are weird, provide a material, shape and color or you get pink cubes even if you change the startColor
  • Input.GetAxis("Vertical") gives the current player input on Y axis (even in 3D)
  • 3D is weird part2: right side view of an object in coordinates 0,0,0 is a camera with Y axis rotation -90 and X axis delta of +10

23/09/2021

[Unity] Fury Roads

A sample 3D car driving project made with Unity.

Get the code from the repo or play online.

How to play is in readme or in game menu. Hit the barrier, avoid the boulder, be fast, release the rage.

Interesting notes:

  • AudioSource.PlayOneShot: use this passing an AudioClip as input to play a sound file once when triggered
  • Input.GetKeyDown(KeyCode): use this to determine whether the user pressed a particular key and avoid multiple triggers if the key was pressed over multiple frames
  • GameObject.SetActive: parent can trigger child objects active/inactive with this, eg to swap models for same object on a certain event
  • LateUpdate is invoked after Update, so if you have a follow camera, update position there to avoid jerky movement
  • transform.Translate: move object (slide)
  • transform.Rotate: move object (rotate)
  • Vector3 has many static predefined vectors available eg: forward, up, one, zero
  • Can tag objects and then check whether interaction happened with an object type looking at its tag eg: collision.gameObject.CompareTag(TAG) will be true if this object collided with TAG object
  • Time.timeScale set to 0 stops game time, but can still read player inputs
  • SceneManager requires import (using) UnityEngine.SceneManagement

03/06/2021

[Java] MrJack text based videogame

MrJack is a nice boardgame for two players, an inspector and a thief, that take alternating actions trying to win within 8 turns. A full game takes 30 minutes to one hour usually.

The game features an hexagonal board with different cell types and 8 character tokens, each with a unique ability.

Players must carefully plan each move since luck is not the main factor in their success.

You can find FAQ, rules and reviews about it on boardgamegeek.

I propose a videogame implementation which is text based and uses ASCII art to represent the board, prompting players for actions via command line.

The first version 1.0.0 is fully playable and can be run as a Java application. You can find the full description as well as the source code in mrjack repository on my Github.

The code is released under a CreativeCommons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) licence.

I am NOT affiliated with HurricanGames and/or the creators of the board game and do NOT own copyrights to the game.

25/10/2019

[C++] Rock! Paper! Scissors! Fight!

This C++ exercise implements a full game of Rock, Paper, Scissors against an AI opponent. Check the Rock! Paper! Scissors! Fight! project on GitHub.

22/03/2018

[Windows] Blood Bowl 2 offline league manager

If you are a fan of Blood Bowl and purchased either Blood Bowl 2 or Blood Bowl 2: Legendary Edition on PC, you might be - as many others - extremely disappointed at the lack of an offline (hotseat) league option.

This command line tool provides capability to edit - AT YOUR OWN RISK - the SQLite database where team and player information is stored so that, with a bit of paper tracking, you can update the stats after a friendly match.

This tool is not a cheat/trainer!, it only allows you to edit offline team data, much like the "Custom team" feature of the Legendary Edition, except that feature is only usable at team creation.
This tool is based on the rules found in the Blood Bowl Living Rulebook version 6 and might NOT reflect the actual rules implemented in the game - yet, since I saw some rule tables in the DB, and need to investigate further there..

This tool is an alpha version!, it works without hiccups - but its a barebone tool with some open todos and limitations and the user experience can be further improved, but it works as a starting point if you, like me, crave this feature! :)

You can find the BBManager project on my GitHub and download the compiled jar as well.

Please refer to the project README to find out how to use the tool.

13/09/2011

Legend of Dragoon fix disc 2 freeze after Lenus & Regole battle

ENGLISH: please refer to supercheats, quick summary: beat the battle without ever going Dragoon

ITALIANO:
The Legend of Dragoon é uno di quei giochi che non risentono dell’etá. Purtroppo, se si prova a giocarlo su una qualsiasi console che non sia la ormai rara PlayStation 1 (PS2, PS3, PSP o usando  l’emulatore PSX), per qualche motivo dopo la battaglia contro Lenus e Regole verso la fine del disco 2, lo schermo diventa nero ed il gioco va in freeze senza possibilitá di recupero.


04/03/2010

Frets on Fire per Windows 7 con FoFiX

Frets on Fire è un clone gratuito dei vari Guitar Hero/Rock Band ed ha l'aspetto interessante di permettere agli utenti di inserire qualsiasi canzone questi vogliano "suonare" nel gioco, il problema è che ha un supporto scarso per Windows Vista/7.
Fortunatamente esiste una mod, FoFiX che lavora alla perfezione. Su mediafire è presente la versione 3.121 con tema Rock Band 2 che aspetta solo di essere scaricata.

28/09/2009

Resident Evil 5 crash/black screen fix ATI video card

WARNING: This fix only works with ATI video cards.

 

Resident Evil 5 is a great game imho, but has some issues. The most annoying ones are random crashes and black screens during in-game video. In order to fix those problems you just need to downgrade your graphic card drivers, which you can download at oldapps. I use the 8.6 ones and everything works fine even with AA enabled.

I dunno if the same procedure works with Nvidia cards as well because I don’t own one..

 

Hope this helps :)

 

ATTENZIONE: Questo fix funziona solo con schede video ATI.

 

Resident Evil 5 è un gran gioco secondo me, ma ha dei problemi. I più fastidiosi sono crash casuali e schermate nere durante i video in-game. Per risolvere questi problemi basta semplicemente installare una versione meno recente dei driver video, che potete scaricare da oldapps. Io uso gli 8.6 e tutto funziona alla perfezione anche con l’AA abilitato.

 

Non so se la stessa cosa vale anche per le schede Nvidia perchè non ne ho..

 

Spero sia d’aiuto :)

04/04/2009

Recuperare salvataggi Gears of War PC

Se avete già perduto i salvataggi, potete ricominciare direttamente dal checkpoint più vicino a dove eravate semplicemente seguendo questi passi:

- Recatevi in cartelladoveaveteinstallatoilgioco\WarGame\Checkpoints
- Cercate il .sav più vicino a dove eravate (aprendo i .sav con un qualsiasi editor di testo, cercate la stringa: sp_*nome mappa*, per capire a quale checkpoint si riferisce)
- Rinominate checkpoint0.sav in checkpoint0.sav.old e rinominate il checkpoint dove eravate come checkpoint0.sav
- Ricominciate il gioco selezionando "nuova battaglia" ed invece di iniziare nelle prigioni inizierete al punto dove eravate.

Una volta raggiunto il prossimo punto di sosta potrete rimettere tutto a posto come prima. Se il gioco crasha controllate di non aver duplicato erroneamente un file invece di rinominarlo semplicemente.

Per salvare ogni volta i vostri progressi invece recatevi in:

c:\documents and settings\vostronome\impostazioni locali\dati applicazioni\Microsoft\XLive\Content\
continuate ad aprire tutte le cartelle che trovate da qui in poi finchè non arrivate a trovare un file chiamato 4D530842.gpd, che è il vostro savegame. Copiatevelo da qualche parte e la prossima volta che perderete tutto basterà rimetterlo a posto per recuperare il tutto.