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.
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.
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 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 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.
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.
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.
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
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.
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.
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.
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.
EDIT
The source code was requested so here it is
.
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
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.
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 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.
Hello!
I’m finally back in Derby and I’ve been reunited with my beloved computer. (I love you computer)
I’ve been in my house a couple of hours now and it’s still freezing in my room. It’s so cold in fact that a bottle of shampoo in here has frozen solid.
After turning on the heating the radiator in my room still remained cold. This was much less than ideal especially as the other radiators in the house are warm. So I went down into the basement and turned the two radiators down there from zero to the “*” symbol for frost protection and they gurgled into life. No kidding, by the time I got back to my room the radiator was HOT. YESSSSSSSS WARMTH. I’ve had a cold room all of this academic year and finally I’ll be warm and won’t have to sleep in hoodies!
For New Years Eve I went all the way down the country to Plymouth for a night out and stayed with my friend from college Aaron Trout. It was a really good night out with some friends from Bridgwater and I plan on having a house party in a few days as a kind of late new years party.
I have plenty to get on with at the moment, witch is good. I’ve got a few projects that I’ve been wanting to work on since finishing Uni at the end of December. Nothing too big really just some ideas for screen savers and little tools nothing too major. I’ve not made a screen saver before so it’ll be interesting to see how that’s done when I get to it.
I’m currently revising for an exam that I have tomorrow for Introduction to 3D. I’m not totally sure what I need to revise so I’m pretty much just going through lecture slides and (re-)taking notes. Some one said that we may have to describe the stages that our md3 model render goes through to draw the model to the screen. So for that I’ll pretty much just have to go through my code so it is fresh in my mind. I’m not exactly feeling totally prepared but I never really do for exams. I understand most of the theory all the way through so I should be okay
.
Catch you later.
Dan