User Tools

Site Tools


journal:spring2019:jruskauf:start

Josh's spring2019 Journal

Journals are the “Best thing ever”


Introduction

int life(int argc, char *argv){

    while(noSuccess)
    {
        tryAgain();
    
        if(Dead)
            break;
    }
    
    return(0);
}

comporg week13


May 1st, 2019

Nothing much to report other than i've been working on polishing the game up. Documentation, code condensing as long as it doesn't hurt the performance of the game. Messing around with screen refreshing now.

hpc0 week13


May 1st, 2019

Nothing to report, working on responses for EOCE

sysprog week13


May 1st, 2019

Working on documenting and cleaning up code for the SDL game. Then i'm going to get the title and end-game screens done. After that, probably not much. I'm almost done with what i wanted to get done, and it's been a really fun experience so far.

comporg break2


April 10th, 2019

According to all known laws of aviation,

there is no way a bee should be able to fly.

Its wings are too small to get its fat little body off the ground.

The bee, of course, flies anyway

because bees don't care what humans think is impossible.

Yellow, black. Yellow, black. Yellow, black. Yellow, black.

Ooh, black and yellow! Let's shake it up a little.

Barry! Breakfast is ready!

Ooming!

Hang on a second.

Hello?

- Barry? - Adam?

- Oan you believe this is happening? - I can't. I'll pick you up.

Looking sharp.

Use the stairs. Your father paid good money for those.

Sorry. I'm excited.

Here's the graduate. We're very proud of you, son.

A perfect report card, all B's.

Very proud.

Ma! I got a thing going here.

- You got lint on your fuzz. - Ow! That's me!

- Wave to us! We'll be in row 118,000. - Bye!

Barry, I told you, stop flying in the house!

- Hey, Adam. - Hey, Barry.

- Is that fuzz gel? - A little. Special day, graduation.

Never thought I'd make it.

Three days grade school, three days high school.

Those were awkward.

Three days college. I'm glad I took a day and hitchhiked around the hive.

You did come back different.

hpc0 break2


April 10th, 2019

- Hi, Barry. - Artie, growing a mustache? Looks good.

- Hear about Frankie? - Yeah.

- You going to the funeral? - No, I'm not going.

Everybody knows, sting someone, you die.

Don't waste it on a squirrel. Such a hothead.

I guess he could have just gotten out of the way.

I love this incorporating an amusement park into our day.

That's why we don't need vacations.

Boy, quite a bit of pomp… under the circumstances.

- Well, Adam, today we are men. - We are!

- Bee-men. - Amen!

Hallelujah!

Students, faculty, distinguished bees,

please welcome Dean Buzzwell.

Welcome, New Hive Oity graduating class of…

…9:15.

That concludes our ceremonies.

And begins your career at Honex Industries!

Will we pick ourjob today?

I heard it's just orientation.

Heads up! Here we go.

Keep your hands and antennas inside the tram at all times.

- Wonder what it'll be like? - A little scary.

sysprog break2


April 10th, 2019

Welcome to Honex, a division of Honesco

and a part of the Hexagon Group.

This is it!

Wow.

Wow.

We know that you, as a bee, have worked your whole life

to get to the point where you can work for your whole life.

Honey begins when our valiant Pollen Jocks bring the nectar to the hive.

Our top-secret formula

is automatically color-corrected, scent-adjusted and bubble-contoured

into this soothing sweet syrup

with its distinctive golden glow you know as…

Honey!

- That girl was hot. - She's my cousin!

- She is? - Yes, we're all cousins.

- Right. You're right. - At Honex, we constantly strive

to improve every aspect of bee existence.

These bees are stress-testing a new helmet technology.

- What do you think he makes? - Not enough.

Here we have our latest advancement, the Krelman.

- What does that do? - Oatches that little strand of honey

that hangs after you pour it. Saves us millions.

Oan anyone work on the Krelman?

Of course. Most bee jobs are small ones. But bees know

that every small job, if it's done well, means a lot.

But choose carefully

because you'll stay in the job you pick for the rest of your life.

The same job the rest of your life? I didn't know that.

What's the difference?

You'll be happy to know that bees, as a species, haven't had one day off

in 27 million years.

comporg week12


April 24th, 2019

Currently have a powerup working. An S appears in the center of the screen after 1000 frames. It slows down the other player by 2 pixels per frame, so instead of moving at 3 ppf, they move at 1 ppf until 100 frames have passed. After that powerup expires, it will reappear after someone dies or draws. Possibly will include another powerup, but at the moment i'm working on a way to completely redraw the background without having weird graphical artifacts.

hpc0 week12


April 24th, 2019

Nothing much happening here. Currently working on a rough draft for the hpc0 responses in a word document. I don't want them to be rushed half assed things, i want them to be good responses indicative of my efforts in this class.

sysprog week12


April 24th, 2019

Learned about forking children, ranks, and threads. All very interesting and useful things. I would be interested in now adding annoying music to my DDR game, or at the very least annoying sound effects. However, currently i have the main game loop working nice and buttery smooth, with proper scoring, and even some visual effects.

comporg week11


April 17th, 2019

Plans for the game: Get powerup(s) into the game. Likely going to be a speed changer/invincibility powerup. Possible single player mode with rudimentary AI? Title screen and end-game screen proper. Replace the life counter with an actual bar/draining heart sprite to make it look better. Possibly add random obstacles to the arena.

hpc0 week11


April 17th, 2019

The puzzles were fun, i sadly didn't get around to doing the bonus problems, but i felt that doing the practice was a good makeup. The actual graded puzzles were fairly easy, didn't take me that long to do once i got around to sitting down and doing them. I found some neat tricks that are hard to put into words, but hopefully i'll be able to share them with the class once i get back to class.

sysprog week11


April 17th, 2019

Game Progress: I got the lists working completely, able to scale it up to 40 elements per list so far. I've now got hit detection working as well, and i'm working on doing some polishing. Going to add a score/timer counter, as well as possible background effects/sound, but at the moment i've got a fully randomised arrow generator. I know it's halfway decent because i'm absolutely ass at my own game.

comporg week10


April 10th, 2019

NES game is fully playable and running. Was able to redraw background with the LANCER logo on the very top, so it stays as a static sprite. Haven't quite figured out how to make a proper title screen, but i found a work around. Got score display in each corner and then a W or L depending on if the player won or lost. It's fast paced, simple, and fairly lightweight. Only 28k!.

hpc0 week10


April 10th, 2019

I am currently working on responses for the EOCE, trying to remember examples of things i really liked and am interested in. I honestly can't say i'm an expert at anything, perhaps asking questions? Idk, but right now i am working on a “joke” website for a streamer i'm currently watching. A jokey click-bait style website that is meant to house jokes from his streams. I'm currently making it so it will run off my Raspberry Pi while i'm not currently using it.

sysprog week10


April 10th, 2019

Have begun to write unborked code for the DDR clone. I have currently made list and node structs that properly work. I also found that i can store more than one type of data inside of an struct, so no more single variables like we had in DATA. I was also able to put an SDL_Surface data type into it as well, so i can have a sprite associated with each node!

comporg week9


March 27, 2019

Game: Haven't done much lately. Mostly refining code, trying to make things run smoother, trying out different things with hit detection and how it handles it. Also thinking about how i want to handle a title screen, or rather, title sprites. I'd like to be able to make something that can fade in and out, and have a little “flashing” start command. Game stops when the start button is pressed, and you can change the palette of your sprite by pressing select. Hopefully i'll be able to do more work over the break.

hpc0 week9


March 27, 2019

Raspberry Pi/Wiimote stuff: Plan to take the raspberry pi breadboards back home over break to mess around with them. Plan to take them apart and put them back together in a cleaner manner. Possibly buying another raspberry pi to do some networking practice between them. Perhaps i'll set up my own little website i'll use more or less like a portfolio for jobs i want to apply to. Something that will run off the 5ghz internet i've got hooked up back home. Also, i might try and see about setting up that raspberry pi stuff for the wiimotes at home. I'd like to see how well that would work.

sysprog week9


March 27, 2019

Rythm Game: Currently have full hit detection working along with an “arrow” to currently show the direction that you are pointing in terms of a sprite. Have proper hit detection for the different “areas” on the sprite. For each sprite direction, i'm detecting the first sprite in each “stack”, and whether they're hit or missed, they're popped off. This prevents the entire “stack” from being subjected to the hit detection.

comporg week8


March 20, 2019

Raspberry Pi breadboard: \

 
[-]    [+]   
 |      |
 -R-    |
    |   |
    [led]

NOT

[-] [+]   
 |   |
 R   |
 |   |
 [led]

The first option is correct, as the vertical pinning on the board will bypass the resistor in the second diagram, therefore putting more voltage/amperage through the LED than we want. By moving right or left one pin on the breadboard, we force the current to go through the resistor.

The binary counter was a tough nut to crack in terms of using bitwise operators, but i was able to get the program to be very lightweight. One or two loops and a single line of code drove the entire operation, without any “basic” arithmetic. Worked on it with my dad, but i still learned a lot from the experience.

hpc0 week8


March 20th, 2019

found some fixes for the lag in my game, but i will probably gut the code and rework it from the ground up. No math in the if statements, it does not make for happy assembly code. No changing variables if we can help it. Static variables are the way to go, especially for hit-detection math.

Shoutout to Jimito for letting me bounce ideas off of him and take a glance at his code. Really helped me with the hit-detection problems i'd been having.

sysprog week8


March 20th, 2019

Worked on the raspberry pi's, got the breadboards up and running. Mostly messed around with the buzzers, producing different patterns and tones with Matt's help. Also began to work on getting the raspberry pi's set up in the right way. Will detail more of the bug fixing/hardware stuff.

SDL game: Finally nailed down the concept. DDR style game based around Cheeky russian memes. Center sprite with four boxes at each of the cardinal directions, allows for four-way input with the arrow keys for timed rythm gameplay.

comporg week6


March 6, 2019

Goals accomplished:

= Finished hit detection. Properly detects both “walking” and “sprinting” speeds, and also what direction the sprites are facing.

= Score tally has been implemented. Upper corner of the screen. Top Left for player 1, top right for player 2. Goes up to 99 as default.

in progress:

= Working on powerup effects and spawning. Likely a central area with a timer, but a rotating “gate” in which you need to access it from in order to get the powerup.

hpc0 week6


March 6, 2019

RaspberryPi: Got my own raspberry pi finally up and running. Have all the required SDL libraries and NES dev tools except for a sprite editor. Will look for one compatible with the raspberry pi over the weekend. Raspbien was a pain in the but regarding CC65, as it didn't properly show up on the apt-cache list. Was on the Raspbien package-list archive, but was being weird. Downloaded a binary file and got it up and running.

sysprog week6


March 6, 2019

Game Concepts:

STALKER : Rogue-lite metroid-vania style game. Might have to use custom sprites, but will look for free usage ones. Would include multiples levels, powerups, collectibles, bossfights, etc.

LANDER : Moon-planet-asteroid lander game. Physics based fun! Just a simple game, but with semi-random terrain generation, could be fun.

BUNKER : Web-browser like shooter. Fight waves upon waves of the same enemy! Would be mainly based on mouse-detection, semi-random bullet spread, weapon upgrades, etc.

comporg week5


February 28, 2019

Found bug with hit detection, don't know what the exact problem is, but found a way around it.

player1.x > player2.x + SPRITE_WIDTH  //This does not work, causes a soft-lock and possible graphical glitching for a moment.

player1.x - SPRITE_WIDTH > player2.x  //This is the way that works, at least when working withing player1's input checking.

Game Concept:

Lancer, a game about lancing your buddies in a medieval arena! Basically, 2 sprites fight each other, only can “lance” each other on the sides and back of the sprite. Powerups and obstacles will be handled after i get the main movement and attacking worked out, and then a stretch goal is multiple arenas and possibly a platformer mode like niddhog.

hpc0 week5


February 28, 2019

Been working on making my raspberry Pi work from my dorm, got it up and running just after the break was finished. I can now do programming on SDL and the NES ROMs from my dorm! This will hopefully allow me to tinker more with the SDL and NES stuff in my free time, in addition to my current dives into articles and youtube videos.

Installed man pages on the system i built for class, bsdgames, and reinstalled apache2 since i couldn't find a direct way to get cherokee as a web server. Will play with it more from my raspberry pi, as it's a debian based OS.

sysprog week5


February 28, 2019

Game concept:

HUNK - play as the masked soldier of the Umbrella corporation in this side-scrolling shooter. You have to try and reach the end in the allotted time while avoiding zombies and other B.O.W.s. A little fun arcade-y game that's a tribute to the “4th Survivor” mode in Resident Evil 2

Controls: UP, DOWN, LEFT, RIGHT, JUMP, MELEE, SHOOT, SPRINT

Weapons: Fist, Knife, Pistol, Shotgun, Submachine Gun

Items: Ammo (Pistol, Shotgun, Submachine Gun), Health (Herb, Spray)

Enemies: Zombies, lots of zombies.

comporg week4


February 13th, 2019

Continuing to play around with the sprites, learning how many can appear on a given frame, how you call the sprites, flipping/rotating/changing color palettes on demand, etc. You can only draw 8 sprites at a time, but to get more on the screen you can “flip” the priority of the sprites being drawn. Take Castlevania for example, often times there are up to about ten or twelve sprites on the screen. Belmont, monsters, candlesticks, his whip (a separate sprite), and any projectiles. When there are this many sprites on the screen, we can see a noticeable flicker with things like the candle sticks, Belmont's shoulder (closest to the whip), and some slower enemies. This is done to all sprites that are either static (Candlesticks) or slow enemies (Ghouls, fishmen, etc). However, this is not done to the majority of belmont, his whip, fast characters, or background sprites. This is because they are the sprites most often used in judging what to do, and when to do it. Therefore, those sprites are almost always drawn, while lesser needed sprites are often flipped.

hpc0 week4


February 13th, 2019

Possible project for the future:

*DOOM Lan Lair, or the DLL. Load Doom onto each machine, install the multiplayer mod, and have the back table set up as a free for all DOOM arena, or possibly install a co-op multiplayer mod/map/WAD that i found awhile back.

*SNES/N64 emulator, for all your metroid and StarFox needs.

*Raspberry Pi emulator cube, for the enjoyment of NES/Atari/DOS/ETC

sysprog week4


February 13th, 2019

Some interesting code that lets you play with the CD drives, might be an interesting thing to test out on one of the HPC0 computers. Could allow for some interesting game mechanics, such as having to periodically close the CD drive otherwise you start to lose life points, score, time, etc.

SDL_Init(SDL_INIT_CDROM);
 
int NumDrives = SDL_CDNumDrives();
 
if(NumDrives <= 0) {
//No drives available
}
 
int Track = 1;
SDL_CD* CDDrive = SDL_CDOpen(0); //Open first Drive
 
if(CDDrive == NULL) {
//Bad drive
}
 
if(CD_INDRIVE(SDL_CDStatus(CDDrive))) {
    SDL_CDPlayTracks(CDDrive, Track, 0, Track+1, 0); //Play first track
}
 
while(SDL_CDStatus(CDDrive) == CD_PLAYING) {
    SDL_Delay(1000); //Wait
}
 
SDL_CDEject(CDDrive); //All done

comporg week3

Sprites are stored in a grid that goes from 0x00 to 0x16 on the X axis and Y axis. This allows for 254 “block” to be accessed. Each block can hold an 8×8 pixel “sprite”, or in many cases a part of a larger sprite. These blocks can be referenced either in their current orientation, flipped, or rotated. These sprites can then be formed into micros and macros to make larger sprites, but without using up valuable visual memory. Then these sprites are placed onto the screen, with 0,0 being the top left corner of the screen. This is important to remember if we want to orient something in the middle of the screen, as we will have to place the sprites by using their upper left corner as a reference for placement. Colors of said sprites can also be manipulated and changed, and sometimes even cycled using loops.

January 31, 2019

hpc0 week3


February 6th, 2019

Building a computer:

*obtain case *obtain power supply (test with power tester) *obtain motherboard *obtain CPU (Preferably quad core) *obtain RAM (8 gb preferably, at least 4 gb) *obtain hard drive(s) (solid state or disk, preferably above 100 gb) *obtain video card *obtain heat sink *obtain other hardware (CD drives, floppy drives, etc)

After connecting everything together, get a monitor and keyboard and test to see if the computer boots. If the light is on in the motherboard, take out and plug back in the RAM and CPU. There have been connection issues with those pieces of hardware in class. If it still does not boot, and does not beep at you, try swapping the video cards and/or video cables.

If installing a new OS, get to the boot screen by button prompt immediately after starting the computer. This is where you'll be accessing the drive from which you are going to be booting the installer from. Once you locate the drive you want in the hard-disk drive section of BOOT, push it to the top and then save/exit. AFter that, the computer should boot into the installer.

sysprog week3


February 6th, 2019

Sprites: Spritesheets are useful, as you can do some weird/hacky things with them. Say we have a ghost, and it has 3 different idle states. Instead of having the ghost in each state stored in memory, we can break up the sprites into sections. We can then condense these sections down into ones that can be orientated and reverse to create other parts of the ghost, and condense those down into one sprite. Then, we isolate the area of the sprite that is moving. WE can then split that up in a similar fashion for each frame and condense it down. For things like static objects, we can have a set of 8 sprites that can then be combined into micros, a set orientation/placement of multiple sprites, and then for reoccuring objects such as platforms they can then be stored as macros of micros.

comporg week2


January 24th, 2019

Confined RAM, 2kib, only packs of 256-bytes at a time, split into eight pages with a two byte identifier.

Addressing limitations, SMB rom 41 kb.

movl - move long
movq - move quad
call - system call

clc - forcibly turns a carry into a 0

lda - load accumulator - takes from memory and puts into a register
sta - store accumulator - takes from register and stores in memory

clear_ram/clear_oam - used to set an initial state; prevent garbage values

NTSC - North America
PAL - Europe

PPU_ADDRESS: 2 bytes, 16 bit, shift 8 bits to the right to access higher byte (ppu_addr >> 8)

hpc0 week2


January 31st, 2019

Deconstructing a PC:

Start with the case; how do we open said case?  Are there any screws we need to worry about?

Then move on to power supply; disconnect it from all relevant hardware before removing it entirely.  Make sure it is unplugged before you attempt any of this.

Then move onto hard drive; is it solid state or magnetic disk?  Make sure to disconnect the data cable (Likely a SATA connection), then remove it from the rack mount.  Also, keep in mind how its mounted, as there may be an easier way to mount it.

Next, move onto the Video Card(s); likely is bolted directly to the case, so remove screws first.  Then make sure to unlatch it from the plastic base and pull straight up.

Moving onto RAM.  Remove either the two/four cards of ram by unlocking them using the levers at the sides of each card, then pull straight up.

Then, remove the heat sink and fan above the CPU; careful not to get thermal paste everywhere.

Remove CPU by unlatching the metal lever and then removing it from the metal restraint.  Wipe thermal paste off so we can tell what model/core it is.

Next, disconnect any other wires to motherboard and remove it.  Generally 9 screws are used to secure it.

Lastly, remove any extra hardware.  CD/Floppy Disk drives mainly, if they are present.

TIPS: Keep everything orderly; Always know where your screwdriver is (Phillips Head is the most used); Keep screws with the hardware they came from if it can be helped.

sysprog week2


January 31st, 2019

Are fonts kind of useless? Maybe, but we can do a lot of fun things with them. We can count how many steps our cat takes in each direction, or how many times the Unix Students ask where the public directory is. Even though Matt hates Fonts, we don't hate fonts either. Especially Comic Sans. Comic Sans is the best font in the world, and should be used for everything, ESPECIALLY GOVERNMENT DOCUMENTATION.

comporg week 1


January 22nd, 2019

Logic Gates: IF/AND/OR/NAND/NOR/XNAND/XNOR

8bit
16bit

Hertz,Hz: cycles per second

Execution of an instruction
[F]etch: grab instruction
[D]ecode: what was grabbed?
[E]xecute: activate instructions
[S]tore: 

Transistor: Solid state switch

Row Hammer: accessing memory close to what you want and writing to it at a speed that causes electrical bleedthrough, overwriting memory.

Clock Speed vs. Bus Speed: How many possible operations vs. What is visibly being accomplished

CISC: complex instruction set code (computer german-speak)
RISC: Reduced instruction set code (Predicted computer german-speak)

-----
[ALU] Arithmatic Logic Unit
[RA ] Register Array
[CU ] Control Unit
-|||-

MOS 6502: Used in old gaming systems/computers (commodore, NES, Atari, etc)

hpc0 week 1


January 23rd, 2019



sysprog week 1


January 22nd, 2019





journal/spring2019/jruskauf/start.txt · Last modified: 2019/01/21 12:06 (external edit)