Saturday, August 20, 2011

Project Idea: Event Driven 2D Game Engine, maybe 3D?

Scripting languages have really taken off, a lot of frameworks have come out for scripting languages that are extremely innovative and easy to use. Scripting, whether it be embedded in C code or on its own, is truly the future in programming I believe.

However, there's one set back, speed. Script languages have to be interpreted, which can be up to 100 times slower than machine code. However thinking back to embedded scripting, its used to basically configure or customize and application. Rather than doing the heavy lifting, the script tells the application how to do certain things, resulting in minimal performance loss. You can go even further with this idea and make frameworks/engines that utilize event driven systems to minimize computation done using the scripts.

My idea is to utilize this idea to make a game engine that will not only be very easy to use, but also bares little to no performance loss. The idea is simple, you define event handlers in your scripting language and loading objects, then the main loop and geometry work is done in the compiled machine code.

Heres an idea of how it works:

  • Load function is sent to the engine and called
    • Obj1 obj2 and obj3 are loaded
  • Event handler function is sent to the engine
    • When W is pressed Obj1 decreases on the y axis by 5
    • When S is pressed increases by 5
    • When D is pressed Obj1 increases on the x axis by 5
    • When A is pressed decrease by 5
    • The methods used to move Obj1 are functions in C
  • Music Handler is sent to engine
    • Obj3 is played on loop till Obj1 and Obj2 collided, notified via trigger.
  • Collision handler is set for Obj1 and Obj2
    • When Obj1 collides with Obj2, Obj1 can no longer move in that direction.
    • Will trigger Music Handler to stop.
    • Collision is detected using Bouncing Box in C
The idea is to do as much of the processing in C and leave the scripting language to make the decisions. Think of it this way, C is the body, Script is the brain. I realize this has been done, but not with the same goals in mind. I think it would be very innovative to create an engine that will only use script language eventfully.

I'll post more ideas on this engine as I go, maybe I'll even write a Doc or API structure. Who knows, maybe I'll do it.

Friday, August 19, 2011

Getting a perfect pastry

I know a lot of people don't make there pastry, but I'm personally a big fan of Slow Food and I respect others who feel the same. Things just taste better when they aren't made on a manufacturing line, and I don't think anyone will argue otherwise.

Anyway, I've been working on making Puff Pastry for a while now, and I've had a lot of experience with pie crust and choux pastry(cream puffs). In my knowledge of puff pastry, and pastries in general I've gathered a good sum of tips and tricks to get the pastry just right.

Here are some tips and tricks that you can use for just about any pastry:


  • Add acid to the dough. Acid shortens the gluten strands and weakens the network for a lighter delicate pastry, and prevents the toughness from working the dough.
  • Replace half your water with Vodka. First off Gluten doesn't form in alcohol, making your pastry more tender and light, second alcohol evaporates faster than water giving your pastry more rise. I learned this from a pie recipe, however you can use this for puff pastry and phillo also.
  • Use soft flours. Use 1 part soft flour, 3 part all purpose, this gives you a lower gluten level but keeps enough to hold the pastry together.
  • Cut off the edge or pokes a few holes. When your pastry bakes the water vaporizes, if it has no escape from the pastry it will settle again and your pastry will be doughy in the middle. Poke a few holes around the edge with a fork.
  • Keep the dough cold! If you let the dough warm up while you are working it the fat will melt and blend with your flour, thus not rising.
  • Let the pastry rest. After working the pastry give it a while to rest so the gluten network can settle.
  • Don't over work the dough. If you work the dough you develop the gluten network, and your pastry gets tough.
  • Parchment paper is your friend. Parchment paper makes removing your pastry from the pan a breeze, and you can easily slide the paper off and use it too cool your product, also makes cleaning up much easier. Parchment paper is good for a lot of things, if you bake, get some.

Wednesday, August 17, 2011

Menu for today

Just figured I'd get some culinary stuff posted, so here goes.

Today, after a long day at work, I come home with a craving for one of my favorites, Chicken Marsala. If you don't know what Chicken Marsala is you might want to rush over to your nearest Italian Bistro and check the menu.Its a wonderful dish.

Also for dessert I made some Apple Turn Overs, which came out just right. Topped with a sprinkle of vanilla sugar that melts together to give the top a nice crunchy sweet note.

Anyway on with the recipes!

Chicken Marsala:
NOTE: This is a rough estimate of what I use, this is all eye ball measurements. I always ad-lib it.

Yield: 1 serving

Ingredients:
  • 1 boneless chicken breast
  • 3-4oz. Marsala Cooking Wine
  • Pinch of Salt(preferred sea salt)
  • 1 small/med shallot
  • 3tbsp butter (can sub some butter for olive oil for flavor)
  • 1 clove garlic
  • 1 cup mushrooms(whichever you prefer)
  • 1tsp honey(optional, thickens and sweetens)

Directions:
   You're going to want to start with trimming any fat off the chicken breast, then using a meat tenderizer to pound the breast to a little under 1cm thick(8mm or the width of your pinky). Now place a large sauce pan on the stove over med heat, melt the butter on the pan. Now add the chicken breast. Cook both sides evenly till a meat thermometer reads 170F.

   Don't discard your chicken pan just yet, this is a pan sauce. You want to keep all the fats and flavors from the chicken in your dish. So in the same pan you cooked the chicken, add finely diced or minced shallots, press the garlic into the pan, add diced mushrooms, add honey, then pour in marsala. Let reduce on medium till the sauce thickens.

Place your chicken on a plate, then pour the mushrooms and sauce over the top of your chicken.

Serves well over pasta, risotto, greens and potatos, or just by itself.

Apple Turn Overs:
  • 1 sheet of puff pastry dough(instructions will be below, or you can buy pre-made)
  • 3-4 tart apples
  • 1tbsp of spiced rum(optional, for those who got a little captain in them)
  • 1tsp of cinnamon
  • dash of nutmeg
  • 2tbsp of butter
  • 1/4 cup of brown sugar

Directions:
   Preheat oven to 425F.

   Skin and dice your apples into about 1cm cubes. Melt butter in sauce pan over medium heat, add rum, add apples. Cook about 2 min, then add brown sugar, stir and cook till rum reduces and the mixture thickens.

   Roll your puff pastry out to about 3-4mm thick, put filling in the center and fold in half and seal the edge to make an envelop of pastry filled with apple. Place turn overs on a baking sheet, and put in the oven till the tops get golden brown.

NOTE: You can add vanilla sugar or regular sugar to the top before baking, or add a frosting glaze after baking for extra aesthetics and taste.

Puff Pastry:

ingredients:
  • 1cup of butter
  • 2 1/2 cups of flour(soft flour works best)
  • 1tsp lemon juice(optional, weakens glutens for nicer pastry)
  • 1/2 cup of cold water or less
  • 1/2tsp sugar
  • 1/2tsp salt

Directions:
   Mix your flour sugar and salt. Mix your lemon in with your water. Slowly mix water into the flour till the flour is moist enough to hold together but still shaggy. Without working the dough too much for the dough into a ball.

Flatten butter into a disk 1cm thick between 2 pieces of parchment paper. Chill the butter till it gets stiff

Roll the dough out to about 4mm thickness, place butter disk in the center, and fold the dough around the butter. Roll flat again, without letting the butter mix into the dough or poking out of the dough. Chill dough for 5 min, as this prevents the butter from poking through, very important.

Fold the dough twice, one fold overlapping the other(like a brochure), roll flat, chill 5 min. Repeat this 6 times, or however many times your dish requires.

You can freeze this dough and use it later. I like to roll it up with parchment paper and freeze it for whenever I need it.

Saturday, August 13, 2011

A poem

"Who are we
who are you
who am I

What are we
What are you
What am I

Where are we
Where are you
Where am I"

The purpose doesn't seem to be there, but I assure you its not a bunch of words that sound nice together. The purpose not only strikes the point "Who are we and what are we here for" but rather deeper, "what are you in contrast to myself, and what are we in contrast to you, and in contrast to myself". Each person believes they bare difference from another, and each person has a different purpose. Though our purpose is all defined by personality, so who we are is what we are. Then finally raising the question where are we, and where are you, taking this more figuratively. I believe we all exist at different levels of consciousness, and this greatly goes towards who we are, and how we compare to others.

I love minimalism, though some see it as a lazy mans art, I see the opposite. After all "Its not how much is said, its whats being said".

Welcome to my blog!

Well this is my first posts on my hopefully one day viewed blog. I guess I should tell you(if thats anyone) whats gonna go down here. First off I'll be posting my adventures in the culinary world here, and recipes and techniques that I used, as well as all the pictures of the dishes I made. Secondly, my ideas and thoughts in technology, project I'm working on, and coding advice, as well as some other tech advice or reviews. Thirdly, some Music taste of mine, playing tips and techniques, cadences for songs I've composed, tips on composing, and so forth. Lastly, my thoughts in other subjects that interest me, maybe some things I've written as well(poetry, short stories, etc).