An Experiment in Flash.

So I’ve been learning a bit of Flash/ActionScrpit 3 recently. I wanted to do this so that I could easily make games that can reach a wider audience.

I started off in flash learning the basics and getting used to things like Event Handlers. I’ve found the language laid out well and quite nice to work with so far.

I’ve started making a few basic physics simulations using flash. I’ll put a few examples below.

Collisions with mass

When a large ball and a small one collide, the smaller one will bounce off much quicker than the large. Press enter until you get a tiny ball and you’ll see how you can knock it flying easily with a larger one.

Full Screen

Springs

Another thing that I looked into was the use of springs. I can see how these can be extremely effective and can be used in a lot of different areas of games. For now I’ve just made this simple collection of springs that only activate when close to each other. I believe this type of thing is known as a Node Garden.

Full Screen

A*

I’ve recently been working on A* pathfinding. I’ve done a bit of a write up here in the projects section of this site.

I’ll most lightly be using this pretty soon in a Tower Defence game that I plan on making in the next couple of days.

 

 

Improved Mandelbrot renderer.

It’s been a while since I’ve posted about my Mandelbrot set renderer and there’s been a few improvements done to it.

I have changed the colouring scheme so that the set looks more interesting as you look around it. Here’s a video showing the movement and the changing colours.

With the added navigation you can see the infinite detail that there is in the Mandelbrot Set. The new colour scheme is relative to the number of iterations so the deeper you zoom the more the colours change.

Another change that I have made is that it uses OpenML to thread the main loop that generates the set. This has given it a performance boost of about 50%. This is much needed for how performance intensive it is to generate the set at a high iterations. Here’s a zoom to the depth that a double precision float is accurate to.

You can see from the video the FPS is still very low but still just about usable. My next aim is to have this running in OpenGL. Using the power of a graphics will give it a significant performance boost.

 

Programming Fractals.

Recently I have been working on a project the renders the Mandolbrot Set. This is a very interesting project to me as it is both low-level programming and looking at efficiency.

I was inspired to start this project when watching a program about the creator of Pixar when he first programmed a simple yet effective solution to creating realistic looking mountains back in the 80′s.

The Mandelbrot Set.

Mandelbrot Set.

The Mandelbrot Set has a few interesting properties, the most interesting of all being that its edge is infinite. This means that there is an infinite amount of different patterns hidden in the image above. By zooming in to a small portion of the set you can see how much amazing detail there is.

Here is a portion of the set zoomed in, you can see what I mean by infinite detail.

This is not even very far zoomed in.

This image took a fairly long time to render (by today’s impatient standards at least), maybe about 5 minutes. But this is using the SetPixel() function in GDI+. This is a very inefeshent way for drawing pixels to the screen and is soaking up all of the time. You can see in the video below how long it takes using SetPixel. The rendering in this video is rendering at a lower level of detail so the bands in between each layer can be seen.

At  the point of writing this I have not long implemented using the LockBits() to change the individual pixels of a bitmap then draw the whole image to the screen. This is far more efficient and cuts the render time down buy quite a lot as you can see in the next video.

I have now added movement to the program allowing to user to scroll around at a set level of magnification and at a low detail. Then when needed the user can right-click to render with a high level of detail. This is pretty cool and works well.

The next thing that I want to do is improve the speed that it renders again. I am going the long way around to get the gradient effect. As you can see in each video, the whole image has to be generated many times to create the end result. The colour of the pixel is determined by the number of iterations it has taken to check to see if that pixel is part of the Mandelbrot set. It is a simple case of rearranging the way the program is set out to get this number with out having to generate the whole image with different levels of detail and combining them together.

 

Full-screen Windowed Games.

I, like many people these days, have more than one monitor. And this is great for everything. Having more than one monitor makes you more productive and makes multitasking a breeze with the extra screen area.

There is a problem when playing a game full-screen however, the game will minimise when it looses focus. This makes the game take a while to maximise again when it regains focus, an absolute pain and making having another monitor useless.

Most games offer an option to run in a window. This stops the focus issue as the game will continue to run. The problem with this is that if you are to set the games resolution to the full size of the screen the border will push the bottom of the window off the monitor.

Border in the way.

A few source engine games have the option of Full-Screen No Border. This is exactly the solution to the issue.

If you are playing a game that does not offer this mode there is a solution! It is called ShiftWindow and can force the position of a window to be above the top of a monitor.

ShiftWindow

ShiftWindow

You can download ShiftWindow from its website here.

Once you have downloaded and installed it you may need to run it as an Administrator.

When it is open click the first “Grab” button and get the window title of your game.

Next in the “Shift to” section of the window select Coordinates radio button and the “Set size client area” check box.

Click the Trigger it button and you’re done!

This should automatically set the window to be full-screen with the borders hidden off-screen.  You can now tab in and out like a windowed game, but have the joys of full-screen!

I hope that this tutorial was helpful, any questions leave a comment below.

Dan

Google Chrome OS Experiment.

As usual now that I am back at my Mothers house I have become tech support.

My sister has a very slow laptop running Windows XP. It had good 1GB memory with a Intel Atom 1.6Ghz  and for a hard drive it has an old 16GB SSD.

My first solution to try to fix the problem was to just do a fresh install of XP, this took hours just to install because of the slow SSD but once it was in there it was still crushingly slow.

So onto Chrome OS. All my sister really uses her laptop for is Facebook music and chatting to friends. This is exactly what Chrome OS is designed for – Light internet applications.

To begin I downloaded the Chrome OS Flow from this website: http://chromeos.hexxeh.net/ In torrent form. Unfortunately is wasn’t very well seeded so it took quite a while but once I for it I put it onto a memory stick using this Imaging Program.

Clicky clicky clicky

Click to go to website.

Once I booted from the memory stick on the laptop I already had a version of Chrome OS working. Things seemed to work fine from the memory stick. To install to the hard drive I opened up a terminal by pressing Ctr+alt+T and typed “Install”.


Boom. Installed to the local Hard drive.

It boots nice and fast. You can be on browsing the web in well under a minute even on this low spec hardware. The interface is all tabbed based even if you are opening a new “window”. The windows slides in from the right of the screen over the top of the previous. The interface is nicely polished and works well. You sign into the laptop as if you were signing into a gmail account and then you seem to be automatically signed into any Google services.

There is the option to sign into the OS using a guest account. This is just the same but it runs in  incognito mode so nothing is retained on the laptop once you sign out or turn it off.

Chrome OS isn’t much more than a web browser but it is nice and light even running on this 3 year old netbook I found myself browsing the web with no slowdown at all. They have done a really good with Chrome OS and it has breathed new life into this old machine.

Parallax Scrolling / New Project

So I looking into Parallax Scrolling the otherday and it turns out that it’s pretty easy to implement. This is what I cooked up in an hour or so. Please excuse the rubbish art in it. Each layer is an object that’s added to a list and updated automatically so to add a new layer it takes one line of code that has the speed/direction that it moves and the name of the file to move. Nice and simple.

As well as this I’ve thought up a cool project to work on over the summer. This is kind of the start to it but only a tiny part. I’m going to use the simple game frame work that I made for my Games Design module last semester and expand that, that’ll save me a lot of time.

More to come on that project soon when I have it better planned out on paper.

Screen Dimmer Deluxe

So I was watching a film on my laptop with a screen plugged into it.

Annoying thing about my laptop is that if you close the lid the trackpad tries to scroll up and down after a while. So I can’t close the lid without the volume of the film going up and down randomly.

So I quickly made this screen dimmer program. Maybe others will find it helpful.

You need the .net framework for it to run.

 

Click to Download

Click to Download

EDIT

The source code was requested so here it is :) .

Click to download source.

 

 

Here comes the sun.

It’s been a very hard semester at university but I’ve finally finished everything and all of my exams are out of the way.

I’ve got some plans for games to work on over the summer. One is a simple tower defence. This seemed ideal as the art work could be simple and I could do it myself.

The second is a much more interesting idea that still needs a lot of work. I think that this project will take up a lot of my summer, I’ve started to draw up some plans for it but I can’t wait to start work on it properly.

I’m going to be staying in Derby for a few more weeks yet. I don’t really know what to do with myself once my tenancy has ended for this house. I’ve been applying to a few places for my placement year so hopefully I’ll be able to move straight to where ever I’m going to be working.

Peace

New Batch of Updates.

Hallo again!

It is the end of the first week back at Uni and I’m feeling optimistic about the up-coming term. I have had lectures for each of my subjects mostly just describing what I’ll be doing for the next 3 months.

We have four main modules running this term.

Applied Game Development (AGD).

I think that this year AGD will be my favourite module. The main focus of the module is to be working as a team and has been designed to mimic working in a real development studio as close as possible.

We have been given the task of creating a game in a team of 9 before Easter, the game has to be a management style game like SimCity so there are a lot of options available for us. The tools that we have to use are UDK, as a platform to build the game in, then SVN and Hansoft for source control and project management.

The team are made up of 5 Programmers and 4 Artists. The Programmers have been picked randomly from across the year and will be paired up with Artists next week. I’m quite happy with the Programmers that are in my team so far. I know two of them and I’m sure that they’ll do their fare share of the work, but I do not know about the other two. One of them I’ve seen around and the other is a known waister who somehow did not use UDK last year, so that will make things interesting.

The teams have been deliberately put together so that there are people of different levels to simulate what it would be like in a real game studio. This is something that I have been looking forward to for a long time as I really enjoy working in a team towards a goal. The structure of the teams will be 1 Tech Designer, 1 Lead Artist and 1 Producer. It is very early in the project so far but I would definitely like to take the role of ether the Tech Designer or particularly the Producer as I want to manage the team and make sure that the project gets done.

Mobile Devices.

Mobile Devices is the first proper introduction to Java that I have had. After the first weeks excercises have come out it seems pretty straight forward so far, not that dissimilar from C#. Next week should be much more interesting as we’ll be doing inheritance and more interesting things with it so that’s something I’m looking forward to.

The most exciting thing about mobile devices is that there will be development on Android and as I have a shiny new Android phone it’ll be a great module for me.

Interactive 3D Graphics Programming.

In this module we use DirectX and building on what we did last year in Introduction to 3D make a basic game engine. This is very interesting to me as it is quite low-down programming that will give me a much deeper understanding of the processes that do things like get input from the user, putting in sounds at a low level and most interesting of all the physics simulation.

Overall I’m really looking forward  to this upcoming term.

Dan.