Monday, July 18, 2011

Barely on time again!

Dreaded Items
   So as many of you who have been following me for awhile understand that I am by no means a master programmer. That's perhaps one of the things I enjoy most about this project...I've learned so much about programming since the start of this game. Sometimes however, you learn that you simply did foolish things. This week was one of those weeks. 
   Since the University introduced tradeskills, I've naturally had to start implementing a new tradeskill window. That in itself was easy. It took me a bit of debugging but I got it working in a jiffy for the cooking tradeskill. It worked well until I got to one area...my item code. I almost vomited on my own screen in disgust, I don't know what the hell I was thinking. Here's how it used to work:
  • When you select an item, it sends the string (with the item name to a function). That returns a number which is relative to the item's code. Yes, it's a bit silly but if that was all that happened it wouldn't be too bad.
  • Next a subroutine would take that item code and for some reason regenerate the item name for use in further applications (??? why did I do this...it's like I added an extra step for fun).
  • Next, when setting an item to a button, it would once again reference a list of item strings gotten by the function in the first button and then translate it into a number again (???) and tag it to the item buttons.
  • Buying / Selling / Dropping items required the game to perform the first two bullets each time.

I don't even think I can make sense of what I did, it still confuses me and I don't even know if what I typed above even remotely explains it well enough. The good news is I have learned a lot, I simply made a class that stores all of the item info in a handy variable relative to the item selected. Simply select an item and all the data is stored for my use very easily. Is there an easier way to do it? Maybe, but I'll go there later when I become wiser. Anyways, rewriting the item system took me a very short amount of time, figuring out what the hell I did to make items work prior took a long time. The good news is that it's easy as cake now to add items. What prompted me to rewrite this system was when I was programming additional items in last night, it took me about an hour to figure out how to do so...that was the final straw.


So what does that all mean for the game?
   It just got easier for me to program. I'm just adding events now with ease :D. I've made some good progress on the university but I still have a bit to go. Unfortunately the item debacle slowed me down a bit but I still think I'm mostly on track. Since I have a free night, I plan to get a huge chunk if not all of the university done after this post. 
    Kreeves can attest to (hopefully) how easy it is to make an event, he added one of the game's first user submitted content which will add an additional event to players outside of your apartment. I wanted to tip my cap to him for finishing up the event. User Submitted Content (USC) will not speed up the development of the game any, but it can give you a chance to add your own unique events to Pornicle. If you are ever interested please e-mail me (my address is on this site). USC is independent of the planned game content but again is not only greatly appreciated but I hope that together it will help us flesh out the game even more.

Random Screenshots!

I thought I'd give you all some random screenshots!

Pornicle now has days of the week...sadly the month names need to change as they are all 30 days by design.

Quick shot of the cooking window.

"Attend a class" action.

Learning to cook can be fun ^_^



17 comments:

  1. Interesting image choice for cooking classes.

    (Read as: WHY DOESN'T EVERY COLLEGE HAVE NAKED COOKING AS A CLASS?!)

    Delightfully shameless plug for yourself there on the taco cooking option, I love it!


    Not to be a huge pain in the ass but what are we looking at in terms of timeframe for an RC of all this?

    ReplyDelete
  2. Well, I still think I'm doing fairly well as far as timing. I want .20a out for private testing by the end of July, but that may be slightly late. .30a shouldn't be that hard to work up to, I just need to program the combat system and outside events. If it takes me too long to implement the combat system (even though it's only planned to be partially implemented) I will forgo that and implement it at some point into the bug testing. The point is to stagger the releases so there are huge increases in content for you all, not torture you with waiting too much. The design goal has always been to make each major release a huge improvement from the last so as long as I can get most of it ready by the end of August we should be good to go :)

    I know waiting sucks, but it will be worth it :p

    ReplyDelete
  3. Exotic ingredients? Oh lawdy, I wonder what those might be.

    Also, apartment is still elusive and is spelled incorrectly >_>.

    ReplyDelete
  4. Yikes Seip, I fixed the spelling. I sadly have some sort of problem with double consonants. Words like erection my brain wants to spell errection for some reason (same with apartment)

    ReplyDelete
  5. Tacoking: this would be explained if you're secretly a pirate. "Arrrr, me hearties, wharrrr is the aparrrrtment?"

    ReplyDelete
  6. "Yarr, wharr be my errection?! That be a fine piece o' booty!"

    I'm sorry for that post, really I am.

    ReplyDelete
  7. looks good so far keep up the good work

    ReplyDelete
  8. What do they say...oh yes, "To err is human" :p

    I couldn't help it.

    ReplyDelete
  9. Yarr harr fiddle di dee, being a pirate is alright to be. Do what you want cause a pirate is free

    ReplyDelete
  10. You are a pirate!

    ReplyDelete
  11. You want to understand what your code does in a week? Use lots of documentation in your code, it will make everything better.

    ReplyDelete
  12. can someone explain code or point me some were , not that im doing anything with it i just want to know mostly cuz im curious and i was wondering how hard it was for u guys :3

    ReplyDelete
  13. www.woodger.ca/vbsamp.htm

    Now imagine say, 2000+ lines of that. Possibly for just one event.

    I've done C++ and a little Actionscript and this is giving me nightmares already. Not to mention I use JavaScript almost all the time in my job.

    Flashbacks man, flashbacks.

    ReplyDelete
  14. The game itself is over 12,500 lines of code by now :p. Events themselves are text files though.

    @Dark Master: I purposefully store my documentation on the side, disconnected from my code. I figure that way if anyone tries to understand my code they will get a headache not only because I'm a novice and don't do things the right way all the time, but also because it's not documented in the code :p

    ReplyDelete
  15. Okay so my estimation was a little off.

    ReplyDelete
  16. Curious question. If weight gain or loss is implemented, even if toggled as an option in the game menu, would cooking be associated?

    ReplyDelete
  17. Yes, the plan is that eating certain foods will make you gain or lose weight :)

    ReplyDelete

Total Visitors