What would I take back, if I could?

I haven't been blogging as much as I used to, so I decided to give Plinky a try to try and get some ideas flowing. They might not be gaming or tech related but it will at least keep some content flowing. Thanks goes to my friend Trapper Markelz who I noticed was using the service, and I decided to give it a try.

regret. nothing.

I honestly cannot think of something I would take back. Don't get me wrong I have made mistakes in my past – who hasn't? However I think every one of those mistakes was one step on the journey of who I am today. You can spend your life wondering 'what if…' and try and figure out what would have been different or you can learn from your mistakes and use that knowledge to continue to take that next step forward. Always remember – if you actually could go back and fix a mistake, that doesn't mean that your new path won't have different, possibly worse mistakes further down the road.

Powered by Plinky

Hosting your next MVC app with cytanium

Cytanium is a site that provides the ability of best testing Microsoft Web Matrix. At least during the beta period its a free sign up, and free hosting that includes 10G of monthly bandwidth. You can host PHP as well as .NET (and MVC!) sites. You can download and work with the web matrix software which i haven’t got around to looking into yet, a quick look it seems to give you some templates for starting sites as well as deployment types. I am going to throw together a quick MVC site and go through the steps of pushing it to my Cytanium beta account from Visual Studio 2010 – just one of the many ways to publish your site. This tutorial assumes you are relatively new or a complete beginner to MVC – so those of you with more experience might find yourself skipping over a few bits. Part 1 of this tutorial will be simply creating our

First of all you want to register for your site with cytanium. The beta account comes with a single domain that you can work with, and since we are working with ASP.NET MVC2 – we are going to want to configure the site to be a .NET 4.0 site. In your control panel select web sites, select the actual site and then the extension tab and update Asp.net to 4.0 integrated.

Now onto visual studio. Fire up visual studio and create a new blank ASP.NET MVC application. This will start us with a mostly blank solution to work from.

To get us up and running we are going to take this blank solution add a quick controller and publish our site. In a future posting we can take this example and expand upon it by adding database functionality and other enhancements.

With our current blank solution if you were to debug the solution you would get a .NET error page, since the solution is empty with no controllers to work with. So lets fix that right now, and add a simple controller. Using the stereotypical “HelloWorld” approach we will make our “HelloController”.

Your controller starts out as the following:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;

namespace SampleApp.Controllers
{
    public class HelloController : Controller
    {
        //
        // GET: /Hello/

        public ActionResult Index()
        {
            return View();
        }

    }
}

We’ll update the Index action to simply pass in our message to the view.

        public ActionResult Index()
        {
            ViewData["Message"] = "Hello World!";
            return View();
        }

If you were to hit debug at this point we would still get our .NET error page, EVEN if you try and route the request to the proper controller (/Hello/) because we have not set up the view yet – so let’s get that out of the way. Right click on the “View()” in our Index action and select “Add View” just leave the default name “Index” and since we didn’t create a master page uncheck the “Select Master Page” checkbox. Your new view will be created and on your screen to edit

Our final step in creating our simple site is we want to display the data provided from the controller in our view. So in the empty div in the the controller we simply want to add in the proper code to display the “Message” we provided in the controller above.

        <%=ViewData["Message"] %>

If you debug your solution you will still get an error page – however if you route your request to our controller by adding /Hello to the url in our browser you will have a working page with the message we included in the controller. At this point we have a working (extremely bare bones) site that we could push up to our cytanium hosting. We might want to make one final tweak so that the route page actually loads this controller – because our visitors are not going to know to load /Hello in order to view the real site. You can do this by simply updating our routes by editing Global.asax.

Visual Studio all ready did the work for us if we had named our controller “Home”, but since we didn’t and do not have a “Home” controller we can simply tweak it to fit our needs. We need to modify the route shown here

            routes.MapRoute(
                "Default", // Route name
                "{controller}/{action}/{id}", // URL with parameters
                new { controller = "Home", action = "Index", id = UrlParameter.Optional } // Parameter defaults
            );

We simply need to update “Home” to be “Hello”

            routes.MapRoute(
                "Default", // Route name
                "{controller}/{action}/{id}", // URL with parameters
                new { controller = "Hello", action = "Index", id = UrlParameter.Optional } // Parameter defaults
            );

Hit debug and you will see that now when loading the root url our message is all ready displayed. Now we are ready to take the next step and actually publish this site to cytanium! Cytanium was nice enough to email you an email with a vast number of ways to push your site to your hosting plan when you activated your account. I have been using the visual studio publish feature so far, and what I will be explaining in this (and possible future posts). One huge benefit to this is the ability to do web.config transforms. So when you have a local, staging, test, and production environment you can easily update all the settings in your web.config for each of those servers without having to hand edit them for each server…etc. It’s and awesome feature to leverage in my opinion.

Now to prepare our solution for publishing we want to select “Release” from our build menu (its not required, but generally you want to push any live site in a release mode obviously). There are some configuration settings in the project properties that we can review at a later time, however using the defaults (and a project without a database to transfer) we are able to simply take the next step and configure our publish settings using the details provided in that setup email from cytanium .

Then in solution explorer right click on the “Sample App” project node and select properties, this will give us the configuration settings for the project – and where we need to configure our publishing settings. Once this tabbed view is loaded, you want to select the “Package/Publish Web” tab.

The following was provided to us in our activation email

Visual Studio 2010

Publish method: Web Deploy
Service URL: https://webmatrix01.cytanium.com:8172/MsDeploy.axd
Site/application: davidlarrabee.webmatrix01.cytanium.com
Allow untrusted certificate (check)
User name: ***************
Password: ***************

Fill out your service url, site/application, username and password. Make sure you also check the “Allow untrusted certificate” checkbox. Hit the publish button, and if all goes well you should receive a successful message AND your new site will be live at the cytanium url provided in the “Site/application” item above.

1 Month, 46 miles, and almost 20 pounds later

Well this isn’t my normal blogging material. Normally I post about programming or gaming in some way shape or form, and rarely I post random things about whats going on in my life in general as well I guess. Though most of that’s things we are doing as a family and I post it over there.

However I recently tipped the scales at 190lbs, which is probably the heaviest I have ever been and decided I was going to try and thin back down. My game plan was to eat a bit healthier and at least try and exercise a bit more. I decided to try out running, because my wife has been a runner for quite a while, and I have never really been able to much of a runner.

After I ran today I wasn’t sure I had made much progress. I still don’t think I am adding that much distance or speed onto my running – but I am making pretty good progress on my original goal. As of today I am down to about 170. So that means i shed off 20 pounds this month (possibly 25, i really cant remember if i started at 190 or 195).

I signed up for a 5K race in October – I surely won’t win – but with luck I will be able to actually finish it. Will I ever be a marathon runner like my neighbor? (hes running his 13th this year) – probably not, but I guess you never know…

Move your Kinect

Well I am catching up some E3 stuff, and after seeing the new name for Project Natal “Kinect” it got me thinking. I don’t know if its me getting old or what – but I am really not that interested in these motion based games and controllers. Who knows they might be pretty fun, but I am still on the school of thought that I want a gamepad to play with and that’s that. I do have to say that the new name is definitely better to market the product. The fact that it will need a seperate power adapter and rumored to be $150 means I probably wont end up picking one anyway. It will be interesting to see the games that come out and if any of them will be enough for me to pick one up. On a plus side, it looks like it will have a bit more support in the way of games than the Xbox 360 Live Vision Camera, so it’s more likely to stick around – then again the Xbox did have that HD DVD player, and we all know how well that worked out for them.

And Now Something Different

Anyone that actually knows me, knows that I have never been much of a reader. However because of our recent trip to the Turks and Caicos, I figured I would pick up something to read for the flights – as well as possibly while relaxing on the beach. I picked up a copy of The Zombie Survival Guide: Complete Protection from the Living Dead by Max Brooks. It was probably the first book I have finished in any recent time.
The book is a pretty comical read – and quite detailed. At times it seems a bit repetitive, but it kept me interested enough to make it to the end. If only a zombie invasion did take over while I was away – I would have totally been prepared. Well I guess not, as I would have been landing without any of the proper tools – but I might have been at least been able to leverage some of the survival skills provided.

Is this the start of reading on a more regular basis?  That is reading things other than programming and tech books for reference.  We’ll see, I am all ready keeping an eye on World War Z: An Oral History of the Zombie War
by the same author as it was suggested to me by a friend after he saw me mentioning the other book.

Always late to the party

Well I haven’t blogged anything in a bit – so might as do one of my famous “i haven’t blogged in a while, how about I just do a brain dump of information going on right now in my life” kind of posts. I spent a good amount of the night playing around with some new technology that I either haven’t used much, or at all. Not stuff that just came out mind you (again late to the party!). Just working with a git repository and a ruby on rails project I picked up – which I always like to get my hands on some RoR.
The title is somewhat fitting, it came to me as I just finished my first night playing the Starcraft II Beta. I finally decided to pre-order it like most people I know. I always liked playing starcraft, mostly the campaign because I just get SPANKED when playing multiplayer. I just don’t dedicate the time like most of the online players – this is true for most online games (COD, Halo, etc). However there is probably a bit of the ‘I am not really that good either’ mixed in there as well, lets be honest.
Speaking of betas I also played only a handful of the Halo Reach beta so far – one game made me laugh because one of my team-mates gamertags was ‘TheBetaSucks‘. This made me laugh for a number of reasons

  • First he went through the trouble of making said gamertag
  • Second possibly paying for said gamertag to play as gold status (though probably a free card
  • and finally if you feel that strongly, why are you still playing it?

Either way my hat goes off to you for giving me a chuckle that night.
In any event here is when I turn the tables on you – my loyal readers (assuming you do in fact exist and are not ALL web crawler bots…). Leave some comments on the following questions I post to you.

  • Do you have the Starcraft 2 Beta? What do you think of it?
  • Do you have the Halo Reach Beta? What do you think of it?
  • Considering my lack of posts, do you have anything that you would like me to throw out there? Maybe some sort of blog posts showcasing some (probably relatively simple) XNA things? Maybe some random jQuery things that I have done recently for work? Or something else completely random – like a daily digest of what I had for dinner (tonight it was home made honey mustard chicken wings for the record).

More Megacosm!

Figured I would cut another video that was a more recent build of the game. Here is a few rounds of 2 player multiplayer over xbox live – enjoy!

A look into my world

Well most anyone that reads this probably all ready knows that I like to dabble with XNA. A few guys at work wanted to get together and enter the Dream Build Play contest this year, so we are giving it a shot – however time is running out!

Here is a short clip of the state of the game not long ago, just so you can actually see what I have been up to. I cannot take credit for the art or tunes, that’s all Mr Tim Castagna over at www.tk-games.com (well except the fancy smancy star cursor – I did that!).

For those of you chomping at the bit, here you go I present you with a few moments of Megacosm. Hopefully look for a more polished video, and state of the game soon!

XNA Dragable Selection Utility

The game I have been working on lately had a need to select multiple items at one time.  Something pretty common in the RTS world, especially on the PC platform.  It’s almost second nature to simply click and drag to select multiple items on the screen in those kind of games – and in everyday computer use I suppose.

So I wanted something similar, however for the most part the game is targeted for the Xbox under the Xbox Indie Games umbrella.  That is not to say that the same functionality couldn’t be driven by the controller of course.  Or you could go the direction of something like Halo Wars – which had more of a larger selection bubble that you just spanned over the units.  Either way it got me thinking, and realized that at least at first glance I wasn’t exactly sure how they even accomplished this kind of thing in games like stracraft, etc. I still don’t know exactly how they do it, but after toying around a bit last night I got what I think is a pretty good representation of it.

On the surface it seems simple enough especially to a user that is just used to the ability to do such a thing – but it probably made me think a bit more than anything I have done recently in XNA.

Insert Witty Title Here

It feels like ages since I posted (yet again).  Actually about 2 months – which is quite a while really.  I don’t have any real excuses either, just nothing really going on that’s super amazing to post about I guess.  Christmas has passed, the kids really loved it this year, and my son is getting to the point that he really likes playing games with me.  So I picked up Super Mario Wii a week ago or so.  We have been playing most nights, usually quitting when ever we got to a castle, or at least a save point and picking up the next day.  Granted he really still hasn’t gotten the wii mote controls, so its mostly me playing and him falling and dying….alot, but hes having fun doing it, and we are having some quality time together – so thats all that matters in the end.

Work has been pretty busy, nothing out of the ordinary since I started there I guess, but definitely keeps me busy most of the day.  At night I am doing the same as I have always done, messing around with code – sometimes its ASP.NET MVC, sometimes it’s just playing around with the new features of Windows 7, sometimes its some work for some of my consulting clients, but most of the time its probably been XNA – a few guys from work actually want to work on an indie game for the Dream Build Play 2010 contest, so giving that a shot, the games that are entered in that each year are down right amazing, so it might quite a task to win – but its fun to give it a shot, and who knows it might better prepare for the development of a new game.

Well I guess this will qualify of my obligatory post to keep this blog alive for now, I might have to work on something new to keep things fresh here….

Previous Entries
Get Adobe Flash playerPlugin by wpburn.com wordpress themes