Tuesday, 30 June 2015

tutorials are great...

Got a picture box with a 10x10 square drawn on it.
Now trying to build some code around putting that same small square in a random spot within the picture box.
need to rework the current code somehow to get the second (and subsequent) squares drawn.
Going to mull over this for the night and see if I can make some more sense out of it tomorrow.

More than expected

So I've been reading up on a few things, trying to decide how best to approach the idea I have.
Unity, sounded like a good place to start, but I felt quickly overwhelmed by the complexity that was offered.
I was toying with the idea of using a massive layout table for creating the game grid/map.  Also, at the same time, knowing that it probably wasn't the best approach.
What does it mean to create a map, in the context of a game.
Apparently, it means a whole lot more than I was expecting. I am reasonably comfortable building up the game code, the logic for  the elements that I want.  But putting graphics into it has always seemed so daunting.
So I got thinking about the types of games I have enjoyed, and the kind of thing that I feel would be achievable for a single coder. 
Generating a random map would, to my mind, be a great way of prolonging the game experience.  No two maps the same, replayable.  That kind of thing  - Angband, and other rougle-likes, or Gnomoria.
I am pretty terrible at drawing, so rather than bug my partner to do all my icons/sprites and what not, why not 'simply' code the whole thing.
Well in my naivety, I thought that it would be a simple process.  I was wrong on so many levels.
I stared at the screen last night simply not knowing where to start.  The sample code I had was good.  But I wanted to understand how to build it up myself without simply a copy/paste of someone elses code.
At the core of this issue is that I feel I still don't know enough of the basics to do the 'simple' thing of drawing a randomly generated map.   My confusion is still there but at a higher level.  I at least can understand that I was trying to take a running jump and not simply a step.
Going to try to take it easy tonight and pull back toward something that I can achieve more quickly. I wont be losing sight of what I want to do, but I need smaller pieces at this point in time.

Friday, 26 June 2015

To frap or not to frap

In a somewhat exhibitionist way, I am contemplating using FRAPS to show the action, so to speak, of my dinky little program.  There is only so much that a screen capture can do.  PLus for me it helps to give me an idea of how things are progressing.
I'll probably look into it over the weekend.

Wednesday, 24 June 2015

Bugger that.

After careful consideration, I have decided to completely ditch the idea of radio buttons.
This is a monster and it needs something epic to defeat.

or to put a different way...

Tinkering

Progress tonight:
  1. Added 'Buy' button with some error checking
  2. A panel with some radio buttons.
  3. Wired them all up to a label that changes text value with different selection
Near term plan:
  1. check box to alternate between 'classical' trade and radio button trade
  2. implement background code for 10 trade items.
  3. contemplate the meaning of life

Tuesday, 23 June 2015

Another Begining...

Trying my hand at C#.

Resisted for such a long time about Windows and MS.

Tried Code Warrior for Mac in the lat 1990's, poked around with Cocoa in the 2000's, peeked at NetBeans, Java, ActionScript for Flash, and Lazarus.  Incrementally finding something that has both decent support and an environment that I feel I can be successful at coding.

I am not a programmer.

I am a microbiologist that has an interest in coding.
I'm ok with maths.  My background is in food safety risk assessment, stochastic modelling.

My code examples are what works for me, not the best possible code.

Lazarus was like going back to early coding days.  It reminded me of the adventure game my friend coded for his 286 in DOS.Thoroughly enjoyed relearning Pascal, writing relatively plain language code in and IDE that just seemed to WORK. 

Until it stopped working.

For reasons completely unknown to me the project I was working on, just stopped working.  Something about stack failure... compiled fine, but now my new forms wouldn't load without a crash.

It went from, one evening I was making some progress with new features, learning a little more, and feeling like I could actually do this without going prematurely mad.
Closed down the project and computer with a light heart.

Next evening... compiles and crashes.  Quick net search found other people with the same problem.  Tried half a dozen 'fixes', none of which did what I wanted, i.e. fix the problem.  One of the 'helpful' solutions was to download the Lazarus source and compile it myself., using some, for me, obscure references to compiling options.

For goodness sake!

It put me back into the place from which I came -
"I've read a couple books on C, done all the code examples, made a dinky game in command line, now for a simple windowed GUI remake... WTF I can't even get this freaking button to work!"

However, now after questioning my very being and accepting that yes I am OK with MS products and using their IDE and the free license is also a good idea.  I am rebuilding (for the 4th time*) my dinky game in MS Visual Studio 2013 in C#.

Advantages for me are coming to this with at least some idea of what I want to do, how to do it, familiarity with the basics of the language, having used a couple different IDE's before and a willingness to learn something new and calling it quits if it stops being fun.

Since my partner is not impressed with my (currently) three button game with a whole bunch of maths involved, I am telling you dear reader instead.

I should go to bed and prepare for another exciting day of microbiology tomorrow.  All the while waiting impatiently for the time to come to add a few more lines of code and a new feature to the creature I'm trying to build.




*The other times were:
Cocoa
Flash
Lazarus