2018-08-03 00:26:30 Posted by RetroZelda

Revenge Project - A New Game Jam

As I pound away on my keyboard at work as December creeps closer and closer, I had a lovely mental distraction as I was invited to partake in a 48 hour game jam with 3 other lovely and gifted people from work. The jam was with Playcrafting and with Alley powered by Verizon. Those of you who know me know that I live for game jams; game jams are THE BEST! So, of course I had a good time! It was also super great to be able to work with people at work who I normally don't work with directly. Overall, the experience was amazing. And yes, I broke the chain of a new project each month, but I think I'm doing well for myself regardless! The game we made is a 1 vs 100 bullet hell called Revenge Project. You take control of a robot, and you must defeat 100 other robots. You. Will. DIE! But, upon your death, you will rewind and fight against the ghosts of your previous lives in order to defeat all the enemies. The focus of the jam was to create something that can only be run on a high end PC, and with our mass amount of updating enemies, bullets, and ghosts, we have done just that. Because I did the programming, and the core feature is the gameplay recording and playback, I will briefly talk about the high level method that I came up with. I don't want to get too technical because it was a game jam ad so I only had so many hours to come up with a light and efficient method to achieve this. In order to get a consistent recording of each life for playback, I needed to do 3 main things: record data as accurately as possible; keep each recording's data as small as possible for each recording tick; and ensure that fetching the data is both fast and accurate. Limited by the data structures that C# provides(We used unity), I opted to store recorded data in hashtables and arrays. Each hash was a calculation of the time that the recording step occurred, so contiguous recording blocks would stay contiguous when stored into the array for each hash entry. I would then cache the previously found recording data location so subsequent fetches would start around the same block of time. This gave me a direct hit into the proper time bucket so I can utilize prefetch caching to find 2 recordings that would "e;sandwich"e; the time of the playback. This provided me a, worst case, 30 index loop for time lookup. This worked beautifully for a recording where there's 1 block of data each frame. I could then calculate a lamda of the desired time and handle calculating the playback position for any time passed in. The other main issue was memory for each recording block. In this game, I needed to record 3 main things: position, orientation, and shoot events. I packed the data into 32 bytes(3 floats for position, 4 floats for orientation, and 1 byte for trigger pressure, and the rest for hash lookup help to not waste padding). Nothing fancy, and pretty small. Over time, memory will grow and so having the quick lookups with the small recording blocks was really nice. With recording out of the way, the last thing I will mention is the number of updating objects. There are 100 enemies(or more depending on if you utilize the console command listed in the readme) that are all running basic AI logic, with unity,s basic navigation system running the pathfinding. Since you can have enemies attacking ghosts all over, we needed all enemies to be running the ai. It is very basic, and utilizes the collision system to trigger changes in behavior. Then, because we wanted a bullet hell feel) each enemy will be shooting bullets FAST. Each ghost that is playing back will be shooting FAST! You, as the player, WILL BE SHOOTING FAST!! So many bullets!!! SO MANY OBJECTS! Its a blast! Overall the game is fun to play, its hard, and it runs as expected for the tech and the time we had to put into it. I am quite proud of it, and I hope you enjoy it. Oh, and here is a link to the game. You will need a controller to have the best experience of play. Enjoy :) https://drive.google.com/open?id=1QGYtNoXSDz470CXFL5EEoRopLAFeEClv Ciao fur niao

2018-05-06 22:42:34 Posted by RetroZelda

Craigslist Jukebox

As i continue down 2018, I have attempted to work on 1 micro project a month. It is already May, but I finally got to a point with April's project that I can close it and move on... I'm still ignoring the fact that there wasn't anything in March. For my latest project, I created a small html parsing library that I didnt know what to do with. Create a bot? To what end could I, or anyone, benefit from a bot? Instead, I decided on the most pointless idea: Scrape craigslist ads to generate music. So, I created a basic chiptune-like system that would generate songs from these scraped ads. After porting to C# and implementing inside unity, this is what I have created. For each ad, it will determine if it will use a major or minor scale. Then, it will decide on a heptatonic scale from a western diatonic scale pattern where, if minor, will be in its "natural minor" form. Once the scale's tonic gets decided, a 1 octave table gets created for each frequency of notes based on an 88 key piano. The final octave gets decided in a range of +2 and -2 from the 4th octave of the piano - this range is fairly arbitrary because certain waveforms at higher pitches sound.... terribly screechy. Finally, the ad will generate the actual phrasing of the song based on 2, 4, 8, or 16 4/4 measure phrases in 2 forms: a bridge and a melody. A bridge is a beat-only phrase that can be 2 or 4 measures that will set a new beat style for the melody phrase - which can be 8 or 16 measures. Beats are hard set to ensure some level of sanity when listening. As of right now, there are 6 possible beat patterns that I created. The melody is generated based on each character in every word of the ad posting. In simple terms: 1 character means 1 note. There are exceptions based on ad length and the algorithm used to ensure songs wont be too long - which could take waaay tooooo looooong to generate. But, each note is essentially an index into the scale table that was generated(or a rest), and a note's time step(quarter, eighth, sixteenth, etc), and the notes final length as a subset of the time step. There are 4 audio layers that are used in each song: Low, Mid, High, Melody. Low, Mid, and High are reserved for beats, and melody is for the actual song melody. This gives me 4 channels of audio of which that I wanted to set. Each layer is given its own waveform pattern. I have utilized the classic 8-bit waveform patterns for simplicity: Sin, Sawtooth, Triangle, and Square, and then I played around and found that adding a Concave and Convex Triangle adds a nice variety. Each note is compiled into the raw sample data that is sent to your audio hardware to be played. This is where using unity has it's advantages because I can just treat the raw data as if it is an uncompressed wav and just fill the buffer with the data and hit play. The sample rate used is 44100hz and I generate sound waves based on the speed of sound in air at 68 degrees at sea level - this is what the temperature was outside according to google at the time :) I published this on the play store so I dont have to host it, and because i wanted to so shut up ;) Anyway, you can download it to your android device here: https://play.google.com/store/apps/details?id=com.retrozelda.jukebox. I'll open source the project at some point soon so you can delve into the randomness that is my mind. Just make sure to ignore the poor UI design - it wasn't my focus :p References: Background wave display Speed of sound Piano Notes Wave Generation Tools: Testing wave patterns Creating different beat types

2018-01-28 20:53:49 Posted by RetroZelda

Experimental Jams

In the past 30 or so days, I have done 2 game jams. One of them was because I was bored and I wanted to experiment with various mobile APIs for a future project I hope to develop. and the second was global game jam 2018! The global game jam is where Full Frontal comes together(or in this years' case, remotes together harharhar) to try out a core mechanic for a game and usually fail to further expand on it. As I start doing more and more of these mini projects, I plan to keep pushing myself to keep a "e;shippable"e; quality towards my own work - in a programming sense. I realize that trying to think design wastes time(rhyming is still cool!) when I can think architecture and stretch my logic and my personal code libraries. This is why I have started pushing small jams to the google play store. It pushes me to ensure things keep a higher quality and will leave with with code that I can reuse in the future. One and done code can be fun, but in my eyes, it cant develop my skills and evolve as I strive to do. So when i complete a project, idea, or expiriment, i can have to live with the embarrassment that maybe what I wrote is terrible and it will push me more. Anyway.... You can find the developer page by searching RetroZelda(you should know this by now), or check it out here: https://play.google.com/store/apps/developer?id=RetroZelda So far I have 2 small jams in 2 months. Maybe I wont break the Game Jam Chain this year... and no... I dont think streaker will get a release... ciao fur niao

2017-08-15 22:48:07 Posted by RetroZelda

Unity on Linux

So, about 9 months ago, I decided to change the OS of my main dev machine at home to Ubuntu 16.10 with the goal of mastering a new OS, learning what I can about linux as a dev machine, and to help with some cross-platform development. Essentially, I wanted a new challenge for programming that didnt involve having a million different gcc environments on windows because that just became a mess. So, with a lost of my programming projects utilizing Unity, I reached a point where I needed to have multiple instances of unity inside of Ubuntu. Installing everything was fine, but it was always a pain to launch each version. So I developed a bash script that helps me load up any installed unity version through a single console command. Its a small script, but helps dramatically with launching projects, so I decided it should be shared. I have it attached to this post. To install, do the following: - Place the script inside /bin (or wherever you keep your custom scripts) - run command: sudo chmod +x /bin/unity_editor - Install unity versions via the installation script to /opt - Ensure the unity install folder is named similar to Unity-*Version*. Example: Unity-5.6.1. Now, you can execute the script by running: unity-editor *version*. So, if you have Unity-5.6.1, you will run: unity-editor 5.6.1. If you run without a version set, it will list out all version you have available on your machine. This helps me out greatly, and I hope it will help you out too.

2017-08-15 22:58:52 Posted by RetroZelda

RetroLib - My Unity code tools

Over my time developing games and expirimenting with different things inside Unity, I have found that I would use functionality over and over again. To keep my own changes to these files, I decided to create a project that held them all. Over time, more and more changes would occure and I would have to manually merge these changes across multiple projects(right now, I have 5 that still need updated.... if I get back to them :P). So, with this issue, I decided to push everything onto github. Why github and not bitbucket? Well, I dont have much on my github, so I decided to keep using bitbucket for my projects, and github for my libraries. The github page is located here: https://github.com/RetroZelda/retrolib-unity. The core usage of everything should be documented, with some examples for the more useful portions. Keep in mind, some of this code was initially created back in Unity4 days, and some(the FSM and event system) was originally created in Java for Nyanimals(the source of that can be found on my bitbucket). I had since moved those to C# and into unity, and I have developed it to be much easier to setup. I also have the FSM ported to UE4! But, I have lost that code in the seemingly endless void that is my projects folder(i have 93 folder in there, with some subfolders holding more projects...). These are mostly all personal projects, or contract/freelance projects that I have worked on over the years(ranging from Unity, UE4, my own engines, homebrew stuff for 3DS and saturn, windows tools, etc etc). Anyway... TLDR: New Unity library has been published on github here: https://github.com/RetroZelda/retrolib-unity And I also have the first version attached to this post for the lazies, but please refer to github for the latest version.

0 1 2 3 4 5 6 7 8 Next-->