Friday, January 12, 2024

Hexademical

 I want to blog about something I've been really fascinated with since nearly the beginning of my life, but still don't understand today:

Hexadecimal!

The hope is that I'll blog today and laugh about it in some years when I actually know what I'm talking about. When i was a kid, I used a gameshark device for the Playstation one to mess with the data that was already in videogames. Final Fantasy tactics, in particular, taught me something really important regarding database structures and I didn't even realize it at the time, or maybe the nature of bytes (again, I'm still figuring it out). A user would reach into the container for characters and modify each slot. Ramza, the main character, was represented by 00, 01, 02, for his three sprite forms. Delita was 04, 05, 06 until you reached 09, Dycedarg. At 09, the next sequence would be 0A (the 11th character) while 0C (the 13th slot) held one of my favorite princess characters (haha). 0F was the 15th character.

The number 10 would represent the #16th character, then 20 # 32, and 30 #48, and if you're lucky enough to understand a bit about hexadecimal, this is significant (but I certainly won't go on and say more without learning a little more myslef). What a cool tool though.


I'm currently really struggling with databases and needed to figure out an outlet after finding something heartwarming (at least for me), so here we go.

I've been trying to bulk insert data into a table using SQL Server Management Studio 19. It is a mess. I used Mockaroo to create data and have no idea why the .csv files are so horrible, but from the forums I'm reading that's pretty standard.

The last two days of my life have been errors, currently:

    Msg 4879, Level 16, State 1, Line 161

    Bulk load failed due to invalid column value in CSV data file C:\tmp\Campaign.csv in row 2, column 6.

BULK INSERT Campaign
FROM 'C:\tmp\Campaign.csv'
WITH (
    FORMAT = 'CSV',
    DATAFILETYPE = 'char',
    FIELDTERMINATOR =',',
    ROWTERMINATOR = '0x0a',
    FIRSTROW = 2 
);
GO

Insert hexadecimal again where you may have expected a \n to reprent the end of a row. I referenced the ROWTERMINATOR and found out something kind of worked from the Microsoft manual--they don't really explain why, but it works. I of course referenced the table:

ASCII Table

And I like their description better than anything I'd come up with, so here's this:


"ASCII was actually designed for use with teletypes and so the descriptions are somewhat obscure. If someone says they want your CV however in ASCII format, all this means is they want 'plain' text with no formatting such as tabs, bold or underscoring - the raw format that any computer can understand. This is usually so they can easily import the file into their own applications without issues. Notepad.exe creates ASCII text, or in MS Word you can save a file as 'text only'"

Pretty neat, and refencing the "LF" (you'll see this on your VS code indicating how line breaks work!) was a pretty chance occurence. Now I have to figure out why SSMS is trying to read my clearly empty sixth column in my Campaign sheet, but whatever. You should see the Talend portion; it's a total wreck. I think I hate Java and don't even have the merit yet to say so, but if it ends up working somehow, I'll update that too.

>' See ya!

Thursday, January 4, 2024

Notes on SQL

Quick note today-- I'm wrapping up on an SQL / ETL bootcamp and wanted to mention on my coding journey that I think others will understand.

A hurdle I've had to get over is that immediate panic when something goes wrong. I fall prey to wanting to be perfect all the time. I'm using a tutorial from Alex the Analyst in the example--he's amazing, but from a pedagogical point of view doesn't quite foster strong foundational learning--best to use the manual and learn something yourself though. Alex can't do that for you, and almost nobody can do that for you.


So without the right questions to ask, do you even know how to get out of this mess? You probably do. But I did not and didn't know the prompt to ask ChatGPT, nobody to ask, and needed to sift through the SQL manual again, exactly how people learning new technology have to figure things out. It was the USE [database] portion that was missing, and everything else turned out to be just fine without my panic.


This kind of dumb, level one thing happens to me regularly. Sometimes 2 months into a new language I'll forget the simplest step, and review all my Youtubers only to realize they don't have the answer covered.

So this post is about learning to use user manuals. Making sure that you go through at least some of it on your own, and make sure you foster some of that curiosity and self-exploration as if you are an explorer.

Also one last funny thing. Small assignment for class to create a database diagram example. Love this kind of design thing, hate that I don't know of a program that makes it easy to both visualize AND customize the work, so I just draw it with a free program and then customize it with Paint (lol, I know, it'll get better).


>'
Okay, see ya!




Monday, January 1, 2024

Happy New Year! Working with Godot, Considering the Value of Low-Definition Sprites

I have been thinking long and hard about what kind of style my terrible first game should be in, and I've decided to draw it in chibi pixels, just like my old sprites from RPG Maker.


Some friends have commented, "He's so cute!" Which I actually really appreciate so much that it's changed the direction from where I thought I might go with this platformer. There's something psychologically magical about poor graphics which forces the player to fill in any gaps and imagine what the objects and characters would look like if they were life-sized. I haven't decided whether or not I'd include full scale character portraits as they leave less to the imagination:

Also, drawing this gal took me like 4 hours. It's a lot to consider while DALL-E or Microsoft Design may churn something like this out in mere moments!

As for coding this time, I've realized that Godot includes quite a lot of built-in scripts for designing a game. I'm working with 2D graphics at the moment, and I find it neat that they've implemented jump physics and gravity into the script templates. You can see from the screencap below that Godot provides the developer with speed and jump velocity.




That's all for today. I'm meeting with my friends later today to discus different mechanics in games; we've been refining our ideas to think of what would be an interesting game to start out with and what would be required to implement that.