Jump to content

Post what you're doing right now

Recommended Posts

We're out of rice now. :(

 

OT: Programming. I haven't had a wave of motivation this strong in so long, but that's what happens when you finally learn how to use aspects of programming you didn't understand before and realize that this shit CHANGES EVERYTHING.

 

Anyone who's learning programming: look up how to use delegates. They're confusing at first but once you understand it, that shit is DIVINE. I'd say intermediate level stuff. You gotta at least understand how functions work comfortably.

Retired Forum Moderator

Share this post


Link to post
OT: Programming. I haven't had a wave of motivation this strong in so long, but that's what happens when you finally learn how to use aspects of programming you didn't understand before and realize that this shit CHANGES EVERYTHING.

I don't think I've ever had that happen before. Even though I try to follow the KISS principle I often overthink a script if I'm writing it from scratch. When I was just learning how to use Unity I didn't know that PlayerPrefs existed so I ended up importing all these different libraries so I could save data to XML. It worked but it was a mess and I felt stupid after I learned about PlayerPrefs. I went through all that trouble for nothing.

 

My thought processes largely goes like this. I visualize the script I want to write. Then I write down everything I think I need which usually results in the script being overdone. Lastly a couple weeks later I figure out a way to make it more simple and basically rewrite the whole damn thing again.

 

OT: Learning how to draw 2D pixel animations.

I'm not saying I started the fire. But I most certain poured gasoline on it.

Share this post


Link to post

I don't think I've ever had that happen before. Even though I try to follow the KISS principle I often overthink a script if I'm writing it from scratch. When I was just learning how to use Unity I didn't know that PlayerPrefs existed so I ended up importing all these different libraries so I could save data to XML. It worked but it was a mess and I felt stupid after I learned about PlayerPrefs. I went through all that trouble for nothing.

 

My thought processes largely goes like this. I visualize the script I want to write. Then I write down everything I think I need which usually results in the script being overdone. Lastly a couple weeks later I figure out a way to make it more simple and basically rewrite the whole damn thing again.

 

OT: Learning how to draw 2D pixel animations.

I actually don't use either playerprefs or xml since one has limited control and the other isn't secure(save editing is basically made possible by anyone with a raw text editor or browser. aka literally everyone lol) I instead use binary formatters, and if you want complicated, try messing with that nightmare. I must have done it 3 or 4 times now and I still have to look it up to remember the name and ordering of all the nonsense that goes into making that happen.

 

Though I think the absolute laziest save/load I've ever done was yesterday for my visual basic class. We don't even need to save and load data I just wanted it in my button controlled text adventure. I essentially took every single important variable in the game, converted all the values to string, stitched all the strings together to create 1 super long one, with each variable separated by "|" and saved it to a plain old text document. The loading it I pull the string back out, chop it into pieces using "|" as the cutting guides, stuck them all in an array, converted them all BACK to their original types, and then redistributed them back out to their points of origin before refreshing the form. It's even better because the save file is so volatile that one wrong move and the entire game stops working if you hit the load button. XD

 

I like to call systems like these Glue n' Prayers cuz that's what's holding it all together.

 

OT: eating chips and brainstorming better ways to handle room navigation data in a text game like this because honestly I really don't want to have to deal with a Select statement that's already 800 lines long and not even a 4th finished.

Retired Forum Moderator

Share this post


Link to post

I actually don't use either playerprefs or xml since one has limited control and the other isn't secure(save editing is basically made possible by anyone with a raw text editor or browser. aka literally everyone lol) I instead use binary formatters, and if you want complicated, try messing with that nightmare. I must have done it 3 or 4 times now and I still have to look it up to remember the name and ordering of all the nonsense that goes into making that happen.

Have you considered using the PlayerPrefsX script by Eric Haines? It adds a ton of functionality to PlayerPrefs and it's what I using currently using to save my values. I highly recommend you take a look at it.

 

http://wiki.unity3d.com/index.php/ArrayPrefs2

 

Though I think the absolute laziest save/load I've ever done was yesterday for my visual basic class. We don't even need to save and load data I just wanted it in my button controlled text adventure. I essentially took every single important variable in the game, converted all the values to string, stitched all the strings together to create 1 super long one, with each variable separated by "|" and saved it to a plain old text document. The loading it I pull the string back out, chop it into pieces using "|" as the cutting guides, stuck them all in an array, converted them all BACK to their original types, and then redistributed them back out to their points of origin before refreshing the form. It's even better because the save file is so volatile that one wrong move and the entire game stops working if you hit the load button. XD

 

I like to call systems like these Glue n' Prayers cuz that's what's holding it all together.

:lol: Oh my god, why? Importing XML libraries into Unity was a pain but it wasn't that bad.

I'm not saying I started the fire. But I most certain poured gasoline on it.

Share this post


Link to post

Have you considered using the PlayerPrefsX script by Eric Haines? It adds a ton of functionality to PlayerPrefs and it's what I using currently using to save my values. I highly recommend you take a look at it.

 

http://wiki.unity3d.com/index.php/ArrayPrefs2

 

Huh, no I've never heard of that. I'll look into it.

 

:lol: Oh my god, why? Importing XML libraries into Unity was a pain but it wasn't that bad.

 

It's actually pretty straightforward. It's basically:

stringOne = String.Join("|", new stringArray() {Value1.ToString, Value2.ToString, Value3.ToString, etc.})
Computer.FileSystem.WriteAllText("Save.txt", stringOne, true/false)

Where true/false is whether to append to the file contents or replace them

 

And then loading would be

stringArray() = Computer.FileSystem.ReadAllText("Save.txt").Split("|")
Integer.TryParse(stringArray[0], Value1)
Boolean.TryParse(stringArray[1], Value2)
Double.TryParse(stringArray[2], Value3)

And so on. It's just super easy to break since anyone and their dog can edit a txt file.

 

The save ends up looking like this:

 

jHqYLlw.png

 

 

OT: Working on that text adventure. I don't like how navigation is handled currently so Imma change that.

Retired Forum Moderator

Share this post


Link to post

the near insurmountable task of trying to catch rarity online

the name's riley

Share this post


Link to post

Sorry, been really busy lately. :x

 

ot: At school after midterms. Test is over and I did pretty well but god knows when I can go home since my laptop decided now would be the perfect time for a major update that's taken an hour to get 30 percent done.

 

How has Microsoft not yet gotten it through their mile thick skull yet that nonrescheduable updates are VERY BAD?

 

I just want to go home and sleep :(

Retired Forum Moderator

Share this post


Link to post

Making music.

"Ross, this is nothing. WHAT YOU NEED to be playing is S***flinger 5000." - Ross Scott talking about himself.

-------

PM me if you have any questions or concerns! :D

Share this post


Link to post
Post binge after being offline for a while.

 

Countering your post binging.

Quote

"We don't call them loot boxes", they're 'surprise mechanics'" - EA

 

Share this post


Link to post

Sitting on my mate's couch wondering what to do now. XD

"Ross, this is nothing. WHAT YOU NEED to be playing is S***flinger 5000." - Ross Scott talking about himself.

-------

PM me if you have any questions or concerns! :D

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in the community.

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


×
×
  • Create New...

This website uses cookies, as do most websites since the 90s. By using this site, you consent to cookies. We have to say this or we get in trouble. Learn more.