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

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.

2015-08-02 14:59:51 Posted by RetroZelda

Nyanimals Early Alpha - Abandoned but not Forgotton

I have decided to start showing more of my "at home" work publicly on here. It will keep this place fresh with projects that I may or may not have stopped; have an area explaining a project I list on a resume, talk about in person, or even a way to share source code to share how my programming has evolved throughout time; and allow me to bore you with more of my poor grammatical posts with terrible misspellings and typing habits. In my previous post, I mentioned I was doing stuff within Unreal Engine 4. Well, None of that is going to be shown yet. Although It is at a point where a demo release is close, I will be talking about my previous endeavor that has been on and off for a few years now... I present you, the early alpha version of the virtual pet Nyanimals. Since the time when I first played with the Chao in the Sonic Adventure games, I have always wanted to create a virtual pet. At the time I started the project, I wanted to get in with engine development AND I wanted to know the ins and out of Android programming. So, I started talking with a friend and we started in. The engine its self has gone through many iterations of its architectural structure and had become an unmanageable mess. That is, until I decided to completely restructure everything. The code That I will provide publicly is the power behind the game, and the engine just kind of runs. That doesnt say much, but before this revamp literally everything was coupled. It was gross. It still is kinda gross, but I have since abandoned this project in light of other things, so it is what it is. The engine consists of an OpenGL ES 2.0 renderer, simple 2D sprite animations, basic 2D collision, object managers/factories, screen touch input handling, sensor handling, and early work for Facebook SDK integration and server data exchanging. The actual game is run by my FSMLibrary state machine. This state machine is the most powerful thing I think I have ever written. It is small, but it is the master of all. It handles game states, AI states, game substates, etc. The FSMLibrary was originally written in Java for android, but I have ports for it in C# and C++. Alongside the FSMLibrary, I have created an event system called Storybook. Storybook and FSMLibrary are recommended to be used together, but dont have to be. It is a powerful event system setup similar to the FSMLibrary, and it also has ports in C, C++, and C#. Since I started writing this, I have decided to just make the repo for nyanimals public. The repo contains multiple branches for particular systems that were being worked on. And please note: This project was half about my passion for games, and half about learning the ins and outs of Andoid, Java, source control, and various other programming-related tasks. So, with that said, you will see gross code of things I had done early on, and gross things with how I transitioned old ways into new ways. But, it is public and so feel free to fork the repo, and add a minigame, or anything really. I welcome it. Without further adoooooo: Repository: https://bitbucket.org/RetroZelda/nyanimals-a-mobile-pet builds: http://retrozelda.com/nyanimalbuilds/ You can also download a build from this post or in the games section on the side.

2015-08-02 15:06:23 Posted by RetroZelda

Wow Addon - SaveMe

Last weekend, I decided to take my usage of LUA to the a more practical area, so I wrote a small wow addon. A plugin to ElvUI to ping your party/raid frames for an external Cool down. Nothing Special. So why is this practical? Why would I make this? Well, basically I've been raiding in WoW a lot. End game PVE is my favorite part of any MMO, and Blizzard does it right. I can generally get away with my lack of coordination between my different senses while in most heroic bosses, but as I am stepping into the world of mythic, I need to play my pally to its full potential - a DPS support. With the most available external cooldowns, the pally is a great asset to have in a raid in any roll. Although. for me and my coordination, I need assistance. That is where this addon would come into play. When, lets say a tank, is going to be taking a lot of damage from something, thowing something on him/her is the the best interest of him/her, the healer, and the raid overall. If I miss my oportunity, or I'm not seeing that they need the help, they can ping the entire party/raid. This ping(/sm or /saveme) will ping the ElvUI party/raid frames and make their player frame flash. This would be picked up by my eye and will let me know to send something their way. Its perfect, right? Wrong. The main thing holding this addon back is that it is a plugin of ElvUI. Not too much of a big deal because a lot of players use this addon. It is also not really wanted in my guild, and probably not many others, but I made it for the sake of making it and to continue to stretch my programming into other areas besides compilable languages and my own frameworks for systems(in this case, the ElvUI and WoW Addon API). so its pretty much a lose win win situation, and thats cool with me! Anyway, tl;dr... Download is at Curse. Enjoy! http://www.curse.com/addons/wow/elveui_saveme

0 1 2 3 Next-->