<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-25717179</id><updated>2012-02-16T06:30:46.340-08:00</updated><title type='text'>Dune II: The remake</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://dune-ii.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/25717179/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://dune-ii.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Toolmaker</name><uri>http://www.blogger.com/profile/15938868073830687692</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>71</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-25717179.post-7107144850577188171</id><published>2009-03-29T13:01:00.001-07:00</published><updated>2009-03-29T13:17:26.502-07:00</updated><title type='text'>Dune II allowed as college project!</title><content type='html'>After much deliberation at my college, I managed to get it accepted as a project that will provide me with some grades that I need. There are 336 hours scheduled for Dune(Which comes down to 42 full days, or 1.5 month of work fulltime).&lt;br /&gt;&lt;br /&gt;This should give me plenty of time to actually get anything done on the project. However, after reviewing the old code and an attempt to get it to compile again under Visual Studio 2008 on Windows 7, I have decided that certain parts of the game are utterly useless. Managed DirectX support appears to be dropped by Microsoft, and is replaced with XNA.&lt;br /&gt;&lt;br /&gt;Because of this, and the insane difficulty I had with integrating a network component into the game, I've decided that I'm going to &lt;span style="font-weight: bold;"&gt;partially&lt;/span&gt; re-write Dune. I will completely replace the rendering layer with XNA, and I will start bottom up this time. Instead of working on the game logic at first, I will start out with the networking engine, and build a game on top of that. This allows me to focus on writing a solid network component first, and then slowly integrate parts from the game into the simulation.&lt;br /&gt;&lt;br /&gt;However, since I spoke of a partial re-write, you might wonder what I will re-use. Well, I will re-use all the logic components I've written till so far. I will still use many of the components from the original engine(Such as the manager for gamestates, tasks) and try to port as many things over to XNA. One of the first things on the list is the Window Manager because I'm going to need it on short term.&lt;br /&gt;&lt;br /&gt;I started testing out some code on networking and NAT punchthrough last monday using the latest Lidgren Network Library, and I must say, it's great! I wrote a little test application that creates a P2P network with 1 host and 2 clients, and I was able to generate a solid, working p2p network. They all saw each other, and it could connect over a home router and a corporate firewall(Microsoft ISA). The codebase I know have, is derived from that, and has a working lobby that recognizes new players, sends game settings around and at the moment, I'm working on setting up an actual simulation, that will start out by running a few rounds, and the host sending 1 to 2 orders around to all clients, have the clients execute these and then have them send the results back.&lt;br /&gt;&lt;br /&gt;I'll report back later. I hope to have some screenshots by then too.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/25717179-7107144850577188171?l=dune-ii.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dune-ii.blogspot.com/feeds/7107144850577188171/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=25717179&amp;postID=7107144850577188171' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/25717179/posts/default/7107144850577188171'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/25717179/posts/default/7107144850577188171'/><link rel='alternate' type='text/html' href='http://dune-ii.blogspot.com/2009/03/dune-ii-allowed-as-college-project.html' title='Dune II allowed as college project!'/><author><name>Toolmaker</name><uri>http://www.blogger.com/profile/15938868073830687692</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-25717179.post-1027070925057637683</id><published>2008-06-06T00:46:00.000-07:00</published><updated>2008-06-06T01:57:06.161-07:00</updated><title type='text'>Synchronisation bug in the server...</title><content type='html'>Well well, what a surprise! More updates on Dune :).&lt;br /&gt;&lt;br /&gt;I've coded a bit on Dune in the past few days. Not an awful lot, because I had other things aswell, but I managed to code up a few bits on the train while traveling to/from college.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Units are moving again&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Yes, first thing I did was re-enable the controls to move units and scroll around the map. Sure, they don't actually send stuff over the network, but units are moving, and I found a few bugs in there related to the MCV(ie, MCV can attack, but isn't supposed to). I intend to fix this first, before actually buffering the calls to order units around.&lt;br /&gt;&lt;br /&gt;I also need to build the turn-system for the packets. I guess I should buffer up the commands first, and then actually start working on the system that collects the packets from other sources and hands down the orders to the correct player.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;DebugConsole is now a real UI object&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;I updated the DebugConsole, because it didn't quite behave like I wanted it to behave. It was the first 'UI' control I built, and wasn't based on the later written UI system. In other words, it was a dirty hack that rendered itself to a texture and constantly drew the texture when needed. Obviously, that was faster than the current approach, but made it more difficult to make the console support features like real UI objects, such as resizes and adding of sub-controls.&lt;br /&gt;&lt;br /&gt;I think the next iteration of the console replaces the current code with a Textfield / Textbox in which I draw the text, and a 2nd textfield / textbox to type in. That would make it much easier to add in support for scrollbars, and other various snazzy features. But, that doesn't have an awful lot of priority at the moment.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Synchronisation bug!&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;And of course the bug I mentioned in the title. I have a really weird bug in the Server code related to loading. It's a few days old, and I've been trying several times to patch this up, but it didn't quite work.&lt;br /&gt;&lt;br /&gt;The problem is as follows: When I enter the NetworkPlayState, this will create a new state called NetworkLoadingState which is responsible for loading all assets and synchronising all the clients with each other so that each game starts around the same time. However, when the server is behind on loading than the client(On my machine that is. The game having the focus will load slightly faster than the background window), it will be done loading by the time all the clients are done loading too. It will see that everyone is done, and trigger the OnStartGame event, which in that case, will report that the server hasn't completed loading yet. This will mean the client will push a new NetworkLoadingState onto the stack and voila, the game will start throwing exceptions.&lt;br /&gt;&lt;br /&gt;I have no idea yet on how I'm going to solve this. I'm considering the just ditch the current asynch approach, get rid of the events of the events and start using blocking functions instead, to make sure things will run in proper order. Alternatively, I might just build in a 1 second delay on the server side to prevent this from happening, but that would be a dirty hack I rather avoid. First step is to figure out where it actually goes wrong, and then find a way to solve the issue neatly, without fudging up my code too much.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/25717179-1027070925057637683?l=dune-ii.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dune-ii.blogspot.com/feeds/1027070925057637683/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=25717179&amp;postID=1027070925057637683' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/25717179/posts/default/1027070925057637683'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/25717179/posts/default/1027070925057637683'/><link rel='alternate' type='text/html' href='http://dune-ii.blogspot.com/2008/06/synchronisation-bug-in-server.html' title='Synchronisation bug in the server...'/><author><name>Toolmaker</name><uri>http://www.blogger.com/profile/15938868073830687692</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-25717179.post-2209415949753960587</id><published>2008-06-02T13:59:00.000-07:00</published><updated>2008-06-02T14:11:05.176-07:00</updated><title type='text'>Unexpected progress!</title><content type='html'>Some people probably gave up on me(or Dune or both), but don't worry, I haven't given up yet. It's just that I've been way too busy with other things in my life(Which got twisted upside. But I didn't move in with my auntie and uncle in Bel Air).&lt;br /&gt;&lt;br /&gt;Last friday, I had my laptop with me and I was like, what if I open up Dune and start coding for a bit again? And so it happened. I coded, and debugged the code I had written, and debugged more, and yelled at my laptop. I really had to look back at older code to see how far I was, and how I solved certain issues. And to be honest, I solved quite a lot of things in a clever way.&lt;br /&gt;&lt;br /&gt;Last weekend, I managed to finish up the lobby / loading / synchronizing part. It now successfully manages to synchronize all the data between the lobby/clients, and then starts the game, including units. Each player gets an auto-assigned starting location when they connect(At the moment, since I haven't added in start points to the maps yet). After the game is done loading, it shows everything like a regular single-player game, except the controls are currently disabled.&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp0.blogger.com/_rHpdClQ34VY/SERg1j8A9GI/AAAAAAAAAE8/z-dRpTVjrVY/s1600-h/lobby-server.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://bp0.blogger.com/_rHpdClQ34VY/SERg1j8A9GI/AAAAAAAAAE8/z-dRpTVjrVY/s320/lobby-server.png" alt="" id="BLOGGER_PHOTO_ID_5207393542443431010" border="0" /&gt;&lt;/a&gt;&lt;span style="font-size:85%;"&gt;Lobby-server awaiting another player to join. Player numbers are currently fixed.&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp3.blogger.com/_rHpdClQ34VY/SERg1T8A9FI/AAAAAAAAAE0/sir5VmnnDdU/s1600-h/lobby-load.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://bp3.blogger.com/_rHpdClQ34VY/SERg1T8A9FI/AAAAAAAAAE0/sir5VmnnDdU/s320/lobby-load.png" alt="" id="BLOGGER_PHOTO_ID_5207393538148463698" border="0" /&gt;&lt;/a&gt;&lt;span style="font-size:85%;"&gt;Minor bug with the sidebar during loading. Still need to fix that, but it's not too important at the moment.&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp1.blogger.com/_rHpdClQ34VY/SERg1z8A9HI/AAAAAAAAAFE/a92wl2lwEOE/s1600-h/network-play.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://bp1.blogger.com/_rHpdClQ34VY/SERg1z8A9HI/AAAAAAAAAFE/a92wl2lwEOE/s320/network-play.png" alt="" id="BLOGGER_PHOTO_ID_5207393546738398322" border="0" /&gt;&lt;/a&gt;&lt;span style="font-size:85%;"&gt;And we're live! This shows up on both sides.&lt;br /&gt;&lt;/span&gt;&lt;div style="text-align: left;"&gt;&lt;span style="font-size:100%;"&gt;&lt;br /&gt;Next step is to re-enable the player controls. But instead of immediatly executing all the actions, I need to buffer them, send them to the server and have the server distribute this to all clients again. I already isolated the calls which I need to buffer, so I only need to build the mechanism to actually buffer them, broadcast them around and execute them when needed. Still need to figure out how I'm going to do that.&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/25717179-2209415949753960587?l=dune-ii.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dune-ii.blogspot.com/feeds/2209415949753960587/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=25717179&amp;postID=2209415949753960587' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/25717179/posts/default/2209415949753960587'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/25717179/posts/default/2209415949753960587'/><link rel='alternate' type='text/html' href='http://dune-ii.blogspot.com/2008/06/unexpected-progress.html' title='Unexpected progress!'/><author><name>Toolmaker</name><uri>http://www.blogger.com/profile/15938868073830687692</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://bp0.blogger.com/_rHpdClQ34VY/SERg1j8A9GI/AAAAAAAAAE8/z-dRpTVjrVY/s72-c/lobby-server.png' height='72' width='72'/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-25717179.post-665936886165642589</id><published>2008-01-02T09:08:00.000-08:00</published><updated>2008-01-02T09:20:13.624-08:00</updated><title type='text'>Happy new year! (And progress updates)</title><content type='html'>Happy new year! May 2008 be a good year!&lt;br /&gt;&lt;br /&gt;As in updates: I've managed to complete the loading of all assets and the game actually ends up being started. So, the next step is to place some units on the map and start building the turn system.&lt;br /&gt;&lt;br /&gt;I'm not entirely sure on how I'm going to implement the turn-system yet. I intended to send a StartTurn &lt;turn&gt; &lt;command&gt; to all clients, which then starts each turn. But, as lag increases, the game would hang for a short period of time with this system(Perhaps not even noticeable). So I could send them out sooner, but that would mean I could miss packets with commands in them. Not sending StartTurn packets is even worse, as the game would continue to run(And go out of synch) when the connection is temporarily congested. Not a good thing either.&lt;br /&gt;&lt;br /&gt;I think I need to experiment with this a bit, and when I have a good working alpha test release, do some real testing with 2 or 3 people to see how it works out.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/25717179-665936886165642589?l=dune-ii.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dune-ii.blogspot.com/feeds/665936886165642589/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=25717179&amp;postID=665936886165642589' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/25717179/posts/default/665936886165642589'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/25717179/posts/default/665936886165642589'/><link rel='alternate' type='text/html' href='http://dune-ii.blogspot.com/2008/01/happy-new-year-and-progress-updates.html' title='Happy new year! (And progress updates)'/><author><name>Toolmaker</name><uri>http://www.blogger.com/profile/15938868073830687692</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-25717179.post-1056117207802735529</id><published>2007-12-17T11:32:00.000-08:00</published><updated>2007-12-17T11:43:21.289-08:00</updated><title type='text'>I hate coursework...</title><content type='html'>There's a small delay in finishing up all the Game handshaking and getting the initial scene up. I'm currently occupied with a load of coursework which I have to finish because I screwed over a bunch of courses last year and the year before.&lt;br /&gt;&lt;br /&gt;Really stupid, but if I want to start my graduation by the end of the college year, I better get all these courses patched up. And because of that, I have less time to work on Dune.&lt;br /&gt;&lt;br /&gt;But, I found out I also have to re-do Network Programming(Why I failed that course is still a complete mystery to me), so I'm going to &lt;span style="font-style: italic;"&gt;attempt&lt;/span&gt; to convince the professor to allow me to submit the network code of Dune. Mainly because it's more cooler than writing lame ass chat server(Using UDP and RMI), but also because it gives him a really cool example to show during classes.&lt;br /&gt;&lt;br /&gt;So, I need to finish 1 more assignment for data structures / algorithms(Write an AVL Tree), and then I can submit all the code. One down so to say.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/25717179-1056117207802735529?l=dune-ii.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dune-ii.blogspot.com/feeds/1056117207802735529/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=25717179&amp;postID=1056117207802735529' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/25717179/posts/default/1056117207802735529'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/25717179/posts/default/1056117207802735529'/><link rel='alternate' type='text/html' href='http://dune-ii.blogspot.com/2007/12/i-hate-coursework.html' title='I hate coursework...'/><author><name>Toolmaker</name><uri>http://www.blogger.com/profile/15938868073830687692</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-25717179.post-3482018601070152961</id><published>2007-12-12T11:44:00.000-08:00</published><updated>2007-12-12T14:22:30.972-08:00</updated><title type='text'>I need to re-think my class structure a bit...</title><content type='html'>I was reviewing my network code in the train on my way home today, and I came to the conclusion that I should think it over a little bit before I start expanding the code.&lt;br /&gt;&lt;br /&gt;At the moment, on both the hosting and the connecting side, I have either a Server or Client as Task. The task is placed into the TaskManager and therefor updated each frame. Both the Server and the Client implement various properties via an interface(INetworkConnection). This is the connection status, connected players, etc. This is fine.&lt;br /&gt;&lt;br /&gt;However, I also need to receive information back FROM the Task, such as when a new client connects, or when the user interface needs to update information. For this, the INetworkConnection is insufficient, because I need various events which come either from the lobby or the game. Such as PlayerConnect, PlayerForfeit, etc. It's a really bad idea to go from lobby -&gt; Server/Client -&gt; LobbyState. Messages would be re-routed via the INetworkConnection, which would slow things down AND clutter the INetworkConnection interface with too much useless crap.&lt;br /&gt;&lt;br /&gt;I intend to counter this by creating ILobby and IGame interfaces, which the LobbyServer/LobbyClient and GameServer/GameClient would implement. These interfaces could then contain the function specific things for the lobby/game(such as a joining player for the lobby, and a forfeiting player for the game).&lt;br /&gt;&lt;br /&gt;Using this system would probably be more efficient in terms of code maintenance than cramming it all into 1 gigantic interface. It would also prevent the Server/Client task from having to add GameStates, which keeps the seperation of UI / Logic intact.&lt;br /&gt;&lt;br /&gt;I should have some in-screen screenshots soon, altho I probably need at least till sunday to buffer up all the player interaction with the game and send these commands over the network to the server. I need to change quite some code in the PlayerInput.cs file(Which basically contains all the code related to interaction from player to  game).&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/25717179-3482018601070152961?l=dune-ii.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dune-ii.blogspot.com/feeds/3482018601070152961/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=25717179&amp;postID=3482018601070152961' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/25717179/posts/default/3482018601070152961'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/25717179/posts/default/3482018601070152961'/><link rel='alternate' type='text/html' href='http://dune-ii.blogspot.com/2007/12/i-need-to-re-think-my-class-structure.html' title='I need to re-think my class structure a bit...'/><author><name>Toolmaker</name><uri>http://www.blogger.com/profile/15938868073830687692</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-25717179.post-8156317805218695076</id><published>2007-12-07T14:46:00.000-08:00</published><updated>2007-12-07T15:39:07.236-08:00</updated><title type='text'>Background loading of assets</title><content type='html'>Before I wanted to start out with the actual networking part, I wanted a way to load the assets from disk in the background, and before the game was actually running. This to prevent slowdowns in the network simulation when a new building/unit was constructed and the asset had to be loaded from disk.&lt;br /&gt;&lt;br /&gt;In order to do this, I wanted a nice front-end(A progressbar to display the loading progress) and a back-end: A background thread which did the loading and put each asset into the TextureManager.&lt;br /&gt;&lt;br /&gt;I started out with the ProgressBar, as the asset pre-loader was half done. It just needed to be modified to be able to work in a thread.&lt;br /&gt;&lt;br /&gt;The progressbar is just another Control for my game. It basically draws it's outline, and based on a Value it shows a nice (blue) bar. I initially had a problem with the outlines not showing up. But, this is related to the way how D3DSprite and D3DXLine render. I solved the issue by doing a Sprite.End() RenderLine Sprite.Begin(), but that cuts down on performance, so I need a better way. I reported it as a 'tweak' in mantis, so I don't forget about it.&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp1.blogger.com/_rHpdClQ34VY/R1nV5LB2DGI/AAAAAAAAAEk/gFqav-Nl5U8/s1600-h/loading.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://bp1.blogger.com/_rHpdClQ34VY/R1nV5LB2DGI/AAAAAAAAAEk/gFqav-Nl5U8/s320/loading.png" alt="" id="BLOGGER_PHOTO_ID_5141375627809918050" border="0" /&gt;&lt;/a&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-size:78%;"&gt;Loading, please wait...&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;The background asset loader was also heavily modified. I initially wanted to try and run it while performing my normal gamestate functionality, but I found out it's way too slow for that. The change was that when I constructed the Preloader, it would parse the list of assets to load and store these, and then with a call to LoadNext() it would take the next asset from the list and load it. So, I shoved that into my BackgroundLoader class, and all was done. The BackgroundLoader is a thread that keeps running until all loading is done, and once it loads the next asset, it will increase a counter, so I can poll how many assets are done and then update the progress bar.&lt;br /&gt;&lt;br /&gt;However, I was quite shocked when I tested out the background loading process. It's slow as hell! It took 94 seconds in debug build and 87 seconds in release build to load all 58 assets in just 2 colors. Image how long it'll take when you're playing with 6 friends...&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp3.blogger.com/_rHpdClQ34VY/R1nV5rB2DHI/AAAAAAAAAEs/Xxcl7xytLRs/s1600-h/slowpoke.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://bp3.blogger.com/_rHpdClQ34VY/R1nV5rB2DHI/AAAAAAAAAEs/Xxcl7xytLRs/s320/slowpoke.png" alt="" id="BLOGGER_PHOTO_ID_5141375636399852658" border="0" /&gt;&lt;/a&gt;&lt;span style="font-size:78%;"&gt;Slowpoke is slow :(&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;So yea, background loading is in, except it's terribly slow. In fact, it's so slow, it's unusable to develop the network play with, because having to wait ~1.5 minute before being able to test something out is too much for me.&lt;br /&gt;&lt;br /&gt;For the coming tests(The actual network gameplay), I'll be testing with a reduced preload set, just a handfull of units / buildings.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/25717179-8156317805218695076?l=dune-ii.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dune-ii.blogspot.com/feeds/8156317805218695076/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=25717179&amp;postID=8156317805218695076' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/25717179/posts/default/8156317805218695076'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/25717179/posts/default/8156317805218695076'/><link rel='alternate' type='text/html' href='http://dune-ii.blogspot.com/2007/12/background-loading-of-assets.html' title='Background loading of assets'/><author><name>Toolmaker</name><uri>http://www.blogger.com/profile/15938868073830687692</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://bp1.blogger.com/_rHpdClQ34VY/R1nV5LB2DGI/AAAAAAAAAEk/gFqav-Nl5U8/s72-c/loading.png' height='72' width='72'/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-25717179.post-8137685321022807021</id><published>2007-12-04T16:33:00.000-08:00</published><updated>2007-12-05T08:37:00.334-08:00</updated><title type='text'>A peak into Dune's protocol</title><content type='html'>I'm currently happily coding away at the Lobby for the game. Most of the code is in now, with the exception of colors / factions / map. I'll add in which map will be loaded soon to the host as a command line switch (&lt;span style="font-style: italic;"&gt;dune -host 2 -name Host -map mp_test.map&lt;/span&gt;). I also added in most of the code for the LobbyClient. When connecting to the server, it will display a nice "Connecting..." text and when handshaking between client/server has been completed, it will show the same text as the lobby(ie, &lt;span style="font-style: italic;"&gt;n&lt;/span&gt; out of &lt;span style="font-style: italic;"&gt;m&lt;/span&gt; connected players).&lt;br /&gt;&lt;br /&gt;Now, let's dive into the messaging system:&lt;br /&gt;&lt;br /&gt;I decided to cut up the system into small, manageable components. This means there's a Server, LobbyServer and GameServer. The Server object manages the connections and routes the messages to the sub-system. The responsibility of the LobbyServer / GameServer should be obvious.&lt;br /&gt;&lt;br /&gt;Because I wanted to seperate out the systems, the first byte in a message is the 'targeted' sub-system. The 2nd byte is the message and the 3rd and beyond bytes are message specific:&lt;br /&gt;1 byte               1 byte              n bytes&lt;br /&gt;[Sub-System] [Message] [Message Specific Data]&lt;br /&gt;&lt;br /&gt;There are no fields in my messages which specify the length of data. Because Lidgren handles all the low-level stuff, it will wrap my data into UDP packets, and reading data back is as simple as msg.ReadString() / msg.ReadByte(). No need to check for correct length, or if all the data is valid: Lidgren does that terrible work for me.&lt;br /&gt;&lt;br /&gt;The pro of my system, is that I don't get insanely long switch statements to handle all the messages. This is how my 'main' message pump looks on the server:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp3.blogger.com/_rHpdClQ34VY/R1bRLbB2DEI/AAAAAAAAAEU/k0KUMz3v0ng/s1600-h/messagepump.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://bp3.blogger.com/_rHpdClQ34VY/R1bRLbB2DEI/AAAAAAAAAEU/k0KUMz3v0ng/s320/messagepump.png" alt="" id="BLOGGER_PHOTO_ID_5140526018854259778" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;It's quite simple, and adding new sub-systems is a matter of seconds.&lt;br /&gt;&lt;br /&gt;The ProcessMessage() then reads the next byte in the message, which contains the message, which is used to pass it to the correct handler. That looks like this:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp1.blogger.com/_rHpdClQ34VY/R1bRL7B2DFI/AAAAAAAAAEc/JXYN9wL4v5Y/s1600-h/ProcessMessage.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://bp1.blogger.com/_rHpdClQ34VY/R1bRL7B2DFI/AAAAAAAAAEc/JXYN9wL4v5Y/s320/ProcessMessage.png" alt="" id="BLOGGER_PHOTO_ID_5140526027444194386" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;How each message is composed isn't really that important. I can give you the exact details, but it sounds more boring than interesting.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/25717179-8137685321022807021?l=dune-ii.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dune-ii.blogspot.com/feeds/8137685321022807021/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=25717179&amp;postID=8137685321022807021' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/25717179/posts/default/8137685321022807021'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/25717179/posts/default/8137685321022807021'/><link rel='alternate' type='text/html' href='http://dune-ii.blogspot.com/2007/12/peak-into-dunes-protocol.html' title='A peak into Dune&apos;s protocol'/><author><name>Toolmaker</name><uri>http://www.blogger.com/profile/15938868073830687692</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://bp3.blogger.com/_rHpdClQ34VY/R1bRLbB2DEI/AAAAAAAAAEU/k0KUMz3v0ng/s72-c/messagepump.png' height='72' width='72'/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-25717179.post-5078600931973955748</id><published>2007-12-03T14:22:00.000-08:00</published><updated>2007-12-03T14:30:30.913-08:00</updated><title type='text'>We get signal!</title><content type='html'>H&lt;span style="" lang="EN-US"&gt;mmm, I think I used this title before… Not sure. And who cares anyway? It’s Sunday evening 22:45 now, almost time to get some shut eye before heading off to work. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;    &lt;p class="MsoNoSpacing"&gt;&lt;span style="" lang="EN-US"&gt;&lt;o:p&gt;&lt;/o:p&gt;Before diving into my bed, I’ll write up some nice post on my progress on the Dune Networking Components, and post it when my internet connection is back up again. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;    &lt;p class="MsoNoSpacing"&gt;&lt;span style="" lang="EN-US"&gt;At the moment, I can connect clients to the in-game lobby. It will accept their connection, and once it receives a handshake, it will return their player ID, and a list of all connected players. This needs to be expanded with a faction and a color, but that isn’t in yet.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;    &lt;p class="MsoNoSpacing"&gt;&lt;span style="" lang="EN-US"&gt;This is how the Lobby looks like server side:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp2.blogger.com/_rHpdClQ34VY/R1SCErB2DDI/AAAAAAAAAEM/pR0gCTVPQ3Y/s1600-R/lobby.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://bp2.blogger.com/_rHpdClQ34VY/R1SCErB2DDI/AAAAAAAAAEM/4mM9wsoPjPE/s320/lobby.png" alt="" id="BLOGGER_PHOTO_ID_5139876091518127154" border="0" /&gt;&lt;/a&gt;        &lt;p class="MsoNoSpacing"&gt;&lt;span style="" lang="EN-US"&gt;Looks pretty sweet eh(I think I broke my FPS counter… There is no way in hell that runs at 35 FPS)? Well, it’s far from done, but I’ll get to that later on. This is what the basic lobby still needs:&lt;/span&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;Handling of disconnects&lt;/li&gt;&lt;li&gt;Player colors&lt;/li&gt;&lt;li&gt;Player factions&lt;/li&gt;&lt;/ul&gt;There are more things required for the lobby, such as map selection, game options(Starting credits, starting units, how do we handle starting points(fixed / random), spice blooms, etc.). But for the sake of simplicity, I don't add those in. It would only complicate things while I want to get basic networking up and running.&lt;br /&gt;   &lt;p class="MsoNoSpacing"&gt;&lt;span style="" lang="EN-US"&gt;Don’t get me started on the client side… That one just connects and sends the handshake. Nothing else yet. That's next up. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;    &lt;p class="MsoNoSpacing"&gt;&lt;span style="" lang="EN-US"&gt;For the networking library I’m using the Lidgren Network Library. It’s pretty awesome if you’re working in .NET. It’s extremely easy to use and does all sorts of things for you, such as internal clock synch, message re-sending, etc. Speaking of which, I should see if there's a new version out the library. The version I'm using is a few months old. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;    &lt;p class="MsoNoSpacing"&gt;&lt;span style="" lang="EN-US"&gt;No technical details to explain to you guys yet, so you have to wait a bit longer. The cool technical details come when I start working on synchronizing the simulations.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/25717179-5078600931973955748?l=dune-ii.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dune-ii.blogspot.com/feeds/5078600931973955748/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=25717179&amp;postID=5078600931973955748' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/25717179/posts/default/5078600931973955748'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/25717179/posts/default/5078600931973955748'/><link rel='alternate' type='text/html' href='http://dune-ii.blogspot.com/2007/12/we-get-signal.html' title='We get signal!'/><author><name>Toolmaker</name><uri>http://www.blogger.com/profile/15938868073830687692</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://bp2.blogger.com/_rHpdClQ34VY/R1SCErB2DDI/AAAAAAAAAEM/4mM9wsoPjPE/s72-c/lobby.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-25717179.post-8654635450982738935</id><published>2007-12-03T14:13:00.000-08:00</published><updated>2007-12-03T14:20:55.662-08:00</updated><title type='text'>Let's get connected!</title><content type='html'>&lt;p class="MsoNoSpacing"&gt;&lt;span style="" lang="EN-US"&gt;It’s been a good month(!!!) since I did a update on the devlog. So I figured I’d give you guys a new update on how things are going. The updates are going in a bit weird way this time, because I made an oopsie with my internet bill(I accidently forgot to pay a month, and they put a nice “&lt;i style=""&gt;Please pay us and you get internet access again kthx&lt;/i&gt;” banner whenever I browse to any website.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;    &lt;p class="MsoNoSpacing"&gt;&lt;span style="" lang="EN-US"&gt;&lt;o:p&gt;&lt;/o:p&gt;That’s the annoyance with all the moving around, you miss a bill and then they shut you off. However, they put a filter on my line at Friday afternoon 18:30, 30 minutes after closing their billing department. If they did it an hour earlier, I’d fix them up the bill immediately and there wouldn’t have been a problem.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;    &lt;p class="MsoNoSpacing"&gt;&lt;span style="" lang="EN-US"&gt;&lt;o:p&gt;&lt;/o:p&gt;But, this is good news for Dune. As I can’t waste my time on the internet, I decided to start coding up the network components for Dune. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;span style="font-weight: bold;font-size:130%;" &gt;Design&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;As opposed to earlier posts, I decided to actually go with a Client / Server setup instead of a star setup. The P2P star is difficult to set up and I couldn’t figure out a way to be 100% be sure all clients would have the correct amount of data to make sure they don’t go out of synch.&lt;br /&gt;&lt;br /&gt;Downside in my current approach is that the host will have to have at least &lt;span style="font-style: italic;"&gt;n&lt;/span&gt; times as much bandwidth as regular players, where &lt;span style="font-style: italic;"&gt;n&lt;/span&gt; is the amount of players – 1. But, in a time of broadband, I doubt that’ll be a problem.&lt;br /&gt;&lt;br /&gt;I still intend to go with the turn-based approach: Each set of commands is send 1 (or 2) turns ahead of the current one. Turns are executed at a determined interval(for instance, 200ms) on authority of the server. So, when turn 1 is running, and the server knows all the clients have received the commands required to execute turn 2, it’ll send a &lt;span style="font-style: italic;"&gt;StartTurn 2&lt;/span&gt;&lt;turn&gt;&lt;clock&gt;. However, this will mean, that if 1 client has a roundtrip time above the turn-length, the game will start to lag at some point. In order to prevent this, I intend to add some form for heuristic to automatically adapt the turn-time based on client pings. However, this won’t do magic, because if pings are above 300 ~ 400ms, turns will take too long and players will notice lag between commanding a unit and actually executing it.&lt;turn&gt;&lt;clock&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;&lt;span style="font-weight: bold;"&gt;Implementation&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;At the moment, I’m implementing the basic server / client code. The server runs as a Task in the game, as it needs to be updated at least once per frame. Next to it the client runs its normal simulation at the moment.&lt;br /&gt;&lt;br /&gt;I’m still doubting if I give the server its own simulation: That would mean the hosting player would run the game twice: Its own copy, and a server copy. On slow machines, this would mean it would lag(Or to be more precise, run at low FPS).&lt;br /&gt;&lt;br /&gt;However, I could hand the Server task a reference to the client simulation and use that as a base. It could generate checksums of that and request checksums from other clients to compare and kick out-of-synch players. But, that’s too far ahead.&lt;br /&gt;&lt;br /&gt;I intend to write the code that hosts a basic lobby and let’s other clients connect. No graphical goodness tho, just basic command line stuff like:&lt;br /&gt;dune2.exe –host 2 –name &lt;playername&gt; or dune2.exe –join &lt;ip&gt; -name &lt;playername&gt;&lt;br /&gt;&lt;br /&gt;Once a client can connect to the server I can add the code to start a game and just show the same scenario on both game instances. I think that’s a challenge on its own already.&lt;/playername&gt;&lt;/ip&gt;&lt;/playername&gt;&lt;/clock&gt;&lt;/turn&gt;&lt;/clock&gt;&lt;/turn&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/25717179-8654635450982738935?l=dune-ii.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dune-ii.blogspot.com/feeds/8654635450982738935/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=25717179&amp;postID=8654635450982738935' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/25717179/posts/default/8654635450982738935'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/25717179/posts/default/8654635450982738935'/><link rel='alternate' type='text/html' href='http://dune-ii.blogspot.com/2007/12/lets-get-connected.html' title='Let&apos;s get connected!'/><author><name>Toolmaker</name><uri>http://www.blogger.com/profile/15938868073830687692</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-25717179.post-7265030803287280388</id><published>2007-10-25T03:34:00.000-07:00</published><updated>2007-10-25T10:27:42.160-07:00</updated><title type='text'>Updates!</title><content type='html'>So, let's explain what I'm up to all this time.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Personal situation&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;Last summer I landed a job as System Administrator at a company. The company itself had about 150 employees, and my job was assisting the sitting sys. admin to keep the servers up and running, fixing issues, etc. While the job was fun at the start, it become pretty boring in the long run. Esp. when the main sys. admin was on vacation, I had almost nothing to do. But, I needed the money to pay for college coming year. This was one of the reasons I stopped development on Dune: I came home from work after around 18:30, had to make dinner, eat and clean up again. By the time everything was done, the last thing I wanted to do was code.&lt;br /&gt;&lt;br /&gt;Eventually, when classes started again, I worked there for 2 days a week, as it was a nice solid income. However, after a few weeks, I got an e-mail from a professor, with a job pamphlet. An acquaintance of the prof was looking for a student who wanted to do some C++ / OpenGL development on an existing CAM software package. So I called the guy, went in for a job interview and got hired.&lt;br /&gt;&lt;br /&gt;So, right now, I'm working 2 days in the week as C++ programmer on CAM software. The software itself loads a CAD model on which the user can then do several operations to prepare the model to be cut out in wood, plastic or metal. Editing the model has to be done in CAD software, so the transformations are mostly simple ones. A pro of this job is that it pays 50% more of my old job, which is even better.&lt;br /&gt;&lt;br /&gt;I also have a load of school assignments to do, which have a higher priority than Dune has.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Dune 2: The remake&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;I never intended to permanently cancel the project, I just didn't have any time to work on it. The downside of hobby projects eh? Anyway, I intend to continue development in the coming months and pick up where I left off: The networking engine.&lt;br /&gt;&lt;br /&gt;Last night, I was considering my options on what I could do to get it working across the internet. Initially, I intended to go with a Star Topology network using UDP. Each client would connect over TCP to the host, which would then assign a port number to the client. Using NAT Punchthrough, the client would then connect to the host over UDP over the assigned port, and disconnect. The other clients would then connect to the client as the port would still be open. However, this is quite complex, and I do not know if it works. Since UDP is connectionless, the UDP port &lt;span style="font-style: italic;"&gt;should&lt;/span&gt; stay opened in a router for a short time span, even after "disconnecting". However, I would need to test this to verify that it actually does.&lt;br /&gt;&lt;br /&gt;If it won't work, I'll to go with a traditional client/server approach. However, I still intend to go with the same approach as AOE, go with turns, etc. However, this would be a problem in a P2P setup, because how do I ensure that each player executes the same commands?&lt;br /&gt;&lt;br /&gt;For instance, consider player 1 moving units 10 and 11. These orders will be send around the network to be executed for gameturn n. Each client will respond back to player 1 that they received the orders. But, how do the other clients know that all the other clients have received the order aswell? If one client does not have these orders, and all clients execute the turn, this client will run out of sync, and gets kicked. So, I need to work out a little bit on how we're going to do this. I could technically let each client send a hash / CRC of all received commands from the other clients to the 'host', which then determines which commands get executed and which get re-scheduled for the next turn.&lt;br /&gt;&lt;br /&gt;As you see, lots of thinking to do. I should make a few diagrams of this, as it's quite confusing in words only.&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;span style="font-weight: bold;"&gt;&lt;span style="font-weight: bold;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/25717179-7265030803287280388?l=dune-ii.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dune-ii.blogspot.com/feeds/7265030803287280388/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=25717179&amp;postID=7265030803287280388' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/25717179/posts/default/7265030803287280388'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/25717179/posts/default/7265030803287280388'/><link rel='alternate' type='text/html' href='http://dune-ii.blogspot.com/2007/10/updates.html' title='Updates!'/><author><name>Toolmaker</name><uri>http://www.blogger.com/profile/15938868073830687692</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-25717179.post-1930221883786489145</id><published>2007-10-24T15:58:00.000-07:00</published><updated>2007-10-24T16:04:57.788-07:00</updated><title type='text'>More info tomorrow!</title><content type='html'>I'm writing this in my bathrobe as I'm preparing for bed, but I got quite some ideas. I intend to work these out a little bit more tomorrow(Technically today, but it's tomorrow since I haven't slept yet :P) in a blog post, and try to examine the different possible solutions. Especially geared towards the networking engine.&lt;br /&gt;&lt;br /&gt;I shall also try to explain my current personal situation and the amount of time I have at hand to work on the project, because I also need work 16 hours a week, and have class.&lt;br /&gt;&lt;br /&gt;On a sidenote, someone commented that I used the term "fans", and said some of them are interested onlookers. I never meant this in the way of, "wooo, I got sum fans lol!", just as a little joke / term to described people interested in the project. But, the onlookers and die-hard Toolmaker fans(The ones having my name tatoo'd all over their body), rest assured, I shall try to work on the game a bit :). Good night for now.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/25717179-1930221883786489145?l=dune-ii.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dune-ii.blogspot.com/feeds/1930221883786489145/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=25717179&amp;postID=1930221883786489145' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/25717179/posts/default/1930221883786489145'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/25717179/posts/default/1930221883786489145'/><link rel='alternate' type='text/html' href='http://dune-ii.blogspot.com/2007/10/more-info-tomorrow.html' title='More info tomorrow!'/><author><name>Toolmaker</name><uri>http://www.blogger.com/profile/15938868073830687692</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-25717179.post-8721265857550989561</id><published>2007-10-23T02:37:00.000-07:00</published><updated>2007-10-23T02:46:46.397-07:00</updated><title type='text'>Not dead yet!</title><content type='html'>Sorry guys! I have been really busy with a lot of things, so I couldn't spend any time working on Dune.&lt;br /&gt;&lt;br /&gt;Last summer I worked the entire summer(I needed the money to get through this college year) and when I got home, I didn't really feel like coding anymore, even tho it was a system administrator job. After summer vacation was over I dived into school and got covered in work.&lt;br /&gt;&lt;br /&gt;I recently started a new job as C++ programmer, for 2 days in the week besides to school. I didn't do a lot of coding for the past few months, so perhaps this will get me rolling again. I feel like coding a bit on Dune later this week. I don't have an awful lot to do this week.&lt;br /&gt;&lt;br /&gt;Again, sorry for the lack of updates and the lack of progress. I know my "fans" are watching :D&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/25717179-8721265857550989561?l=dune-ii.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dune-ii.blogspot.com/feeds/8721265857550989561/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=25717179&amp;postID=8721265857550989561' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/25717179/posts/default/8721265857550989561'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/25717179/posts/default/8721265857550989561'/><link rel='alternate' type='text/html' href='http://dune-ii.blogspot.com/2007/10/not-dead-yet.html' title='Not dead yet!'/><author><name>Toolmaker</name><uri>http://www.blogger.com/profile/15938868073830687692</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-25717179.post-2723197288502315219</id><published>2007-07-20T00:31:00.000-07:00</published><updated>2007-07-20T01:33:35.560-07:00</updated><title type='text'>Networking</title><content type='html'>I've started to look into the networking code for Dune. While I'm currently still in a phase of trying things out in a sandbox environment, I will work on the networking code from now on. Once that's in, I will add the other missing features in Dune.&lt;br /&gt;&lt;br /&gt;I initially read a few articles on other (commercial) RTS games and how they did their networking. For instance, Age Of Empires used a Peer-to-peer setup to communicate with all the other players. The game was a perfect simulation on each client. They accomplished this by make the game 'turn-based'. The player input would be registered, packed up and send to all clients. Each action would be executed in a turn, and when the data was send out to all the other clients, it used current turn + 2. So, when the current turn was 1000, and the player wanted a villager to go and chop down a tree, the actual ordering would happen in turn 1002. Since turns only lasted 200ms each, the player wouldn't even notice the delay between clicking and seeing the action.&lt;br /&gt;&lt;br /&gt;However, in such systems, it's problematic when lag is 500ms: A packet send with orders scheduled for turn 1002 would arrive during turn 1003. AOE would adopt to this by either halt the game(In severe cases), or stretch up the time needed for each turn. In the case of 500ms lag, it would increase the turn time to 250 or 275ms, giving each packet more time to arrive.&lt;br /&gt;&lt;br /&gt;This seemed to work well(I tried AOE2 to test it out) and it ran like a charm. So, I wanted to implement a similar to that of AOE2. However, setting up a P2P network between clients is a pain in the ass. Esp. when you take NAT into consideration. The system would have to work like this:&lt;br /&gt;- Each client connects to host&lt;br /&gt;- On start game, the host opens a series of new ports, one for each client.&lt;br /&gt;- Each client connects to this port and disconnects directly&lt;br /&gt;For each client:&lt;br /&gt;- The host sends all other clients to which other client they should connect by handing out the IP and port number.&lt;br /&gt;- The clients connect to the other player since the NAT port is now opened up&lt;br /&gt;&lt;br /&gt;- Host is done when all players are connected to eachother.&lt;br /&gt;&lt;br /&gt;It's quite complex, and I'm not sure if it would even work. Perhaps I should give it another shot and try to set it up. Once it works, it should work like a charm.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/25717179-2723197288502315219?l=dune-ii.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dune-ii.blogspot.com/feeds/2723197288502315219/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=25717179&amp;postID=2723197288502315219' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/25717179/posts/default/2723197288502315219'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/25717179/posts/default/2723197288502315219'/><link rel='alternate' type='text/html' href='http://dune-ii.blogspot.com/2007/07/networking.html' title='Networking'/><author><name>Toolmaker</name><uri>http://www.blogger.com/profile/15938868073830687692</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-25717179.post-3754480307149281124</id><published>2007-07-14T14:32:00.000-07:00</published><updated>2007-07-14T14:41:43.671-07:00</updated><title type='text'>Bugtracker update #2</title><content type='html'>It's been a while since I updated... I've been really busy. Since the summer vacation begun, I found myself a summer job. Right now I'm a system administrator at a large company. My job is to check out how Windows Vista will fit in the existing environment and how the group policies behave in them, since Vista doesn't eat the older formats. I also have to take over the responsibilities of the other system administrator when he's off on vacation.&lt;br /&gt;&lt;br /&gt;I just continued with experimenting with bug trackers. I tried to install Trac, and failed. The reason: It seems it can create an sqlite database, but no matter where I try to create it, it just fails. If I create it in the root of the C drive, it fails with the error Access Denied, and if I use an existing directory, it screams that I can't create a new directory(Well duh!). So I gave up.&lt;br /&gt;&lt;br /&gt;One of the biggest downsides of Trac is that it requires quite a lot of external dependencies. In order to run, you either need a running Apache configuration with CGI / FastCGI / mod_python installed. You need sqlite(Since MySQL is very experimental. And to be honest, I don't like to run experimental stuff on my development environment).&lt;br /&gt;&lt;br /&gt;So: Bugzilla is left. I've decided not to install / try any paid trackers, since those are outside my budget anyway.&lt;br /&gt;&lt;br /&gt;One a sidenote: I did have some more time with Mantis this week. Even tho it lacks SVN integration, it's still a pretty nice system. I like it, and if Bugzilla doesn't behave better, I'll go with Mantis and setup a SVN integration system. I can't remember the name right now, but it's capable of glueing Mantis / Bugzilla to SVN.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/25717179-3754480307149281124?l=dune-ii.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dune-ii.blogspot.com/feeds/3754480307149281124/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=25717179&amp;postID=3754480307149281124' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/25717179/posts/default/3754480307149281124'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/25717179/posts/default/3754480307149281124'/><link rel='alternate' type='text/html' href='http://dune-ii.blogspot.com/2007/07/bugtracker-update-2.html' title='Bugtracker update #2'/><author><name>Toolmaker</name><uri>http://www.blogger.com/profile/15938868073830687692</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-25717179.post-6928114727833700057</id><published>2007-07-10T11:39:00.000-07:00</published><updated>2007-07-10T12:20:49.309-07:00</updated><title type='text'>Bugtracker update #1</title><content type='html'>I haven't done a whole lot of research on bugtrackers in the past days, but that's because I've been doing some other things aswell(Like snowboarding the entire day. Yes, in the middle of the summer.). However, I can do some reporting on things I've done.&lt;br /&gt;&lt;br /&gt;First of all, I installed Mantis. Since I already had an instance of Apache running, I could just install PHP for it, install MySQL and voila, done. After that I added a few bugs to the system to see how it works and looks.&lt;br /&gt;&lt;br /&gt;A few downsides of Mantis:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Documentation on the site is lacking&lt;/li&gt;&lt;li&gt;The My View is kinda cluttered&lt;/li&gt;&lt;li&gt;Not possible to assign a bug directly to a developer while reporting it(Actually, you can, but you need an advanced report for that)&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;But, it also has a few nice features:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;Easy to install(Just open the index page)&lt;/li&gt;&lt;li&gt;Detailed report information&lt;/li&gt;&lt;li&gt;Multiple projects in 1 database&lt;/li&gt;&lt;li&gt;Projects can be made (in)visible to certain users, users can have roles in projects&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;So far, I like Mantis. But, I still have to look into a glue system to glue it into SVN(Which is out there), since it's pretty nice to be able to link repos updates directly to bugs.&lt;/p&gt;&lt;p&gt;I also made a start with installing Trac, but that requires quite some more work...&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/25717179-6928114727833700057?l=dune-ii.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dune-ii.blogspot.com/feeds/6928114727833700057/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=25717179&amp;postID=6928114727833700057' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/25717179/posts/default/6928114727833700057'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/25717179/posts/default/6928114727833700057'/><link rel='alternate' type='text/html' href='http://dune-ii.blogspot.com/2007/07/bugtracker-update-1.html' title='Bugtracker update #1'/><author><name>Toolmaker</name><uri>http://www.blogger.com/profile/15938868073830687692</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-25717179.post-7219256621258620</id><published>2007-07-07T13:35:00.000-07:00</published><updated>2007-07-07T15:49:35.932-07:00</updated><title type='text'>Counting the credits</title><content type='html'>I implemented the credits counter today. It's a simple little UI component that I managed to whip up in about 1.5 hours, including sexy 'animation'. After setting the credits, it compares the amount with the visible credits. In then calculates the difference between the 2 and divides that by 2(seconds). During each frame update, it multiplies the pre-calculated value with the deltatime and voila, you get to see an update animation.&lt;br /&gt;&lt;br /&gt;It's not exactly like the original, that seemed to rotate around, but that's too much work to implement for now.&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp1.blogger.com/_rHpdClQ34VY/Ro_8TiL-R3I/AAAAAAAAAEE/lSqbhRsrFXY/s1600-h/credits.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://bp1.blogger.com/_rHpdClQ34VY/Ro_8TiL-R3I/AAAAAAAAAEE/lSqbhRsrFXY/s320/credits.png" alt="" id="BLOGGER_PHOTO_ID_5084559916849317746" border="0" /&gt;&lt;/a&gt;&lt;span style="font-size:85%;"&gt;The credits counter in the top right&lt;br /&gt;&lt;/span&gt;&lt;div style="text-align: left;"&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-size:100%;"&gt;&lt;br /&gt;I'm also looking into using a bugtracker. Right now I'm using the SVN commit logs to document bugs, but that's not the most efficient way. So using a bugtracker might help with bugs that I intend to fix on a later date. As for now, I keep forgetting to document all the bugs, remember them AFTER the commit and write them down. And then lose the note with the bugs.&lt;br /&gt;&lt;br /&gt;So, I'm looking at Mantis and a few others, and I'll make my decision soon(probably tomorrow). After I fixed my server... Yes, fixed... I decided to remove a bunch of server roles which I installed for testing purposes. However, after I removed the Terminal Server role it had to reboot. After the reboot I could no longer login remotely, so I'm trying to fix that now.&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/25717179-7219256621258620?l=dune-ii.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dune-ii.blogspot.com/feeds/7219256621258620/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=25717179&amp;postID=7219256621258620' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/25717179/posts/default/7219256621258620'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/25717179/posts/default/7219256621258620'/><link rel='alternate' type='text/html' href='http://dune-ii.blogspot.com/2007/07/counting-credits.html' title='Counting the credits'/><author><name>Toolmaker</name><uri>http://www.blogger.com/profile/15938868073830687692</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://bp1.blogger.com/_rHpdClQ34VY/Ro_8TiL-R3I/AAAAAAAAAEE/lSqbhRsrFXY/s72-c/credits.png' height='72' width='72'/><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-25717179.post-4105867308349576080</id><published>2007-07-05T12:45:00.000-07:00</published><updated>2007-07-05T14:05:30.694-07:00</updated><title type='text'>Carry-alls and harvesters... An excellent combination</title><content type='html'>Today I added in all the goodness for carry-alls to pickup harvesters and deliver them into the refinery. It was quite some work to get that working, since I had to code in a few extra special cases(is this a harvester, does it have clearance for the refinery, is the landing area actually the refinery, etc.). But, now harvesters DO get picked up by a carry-all, if around, and they'll fly em into the refinery. And flying is SO much faster than driving :).&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp3.blogger.com/_rHpdClQ34VY/Ro1a9iL-R2I/AAAAAAAAAD8/FJAE-efQXpA/s1600-h/carry-harv.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://bp3.blogger.com/_rHpdClQ34VY/Ro1a9iL-R2I/AAAAAAAAAD8/FJAE-efQXpA/s320/carry-harv.png" alt="" id="BLOGGER_PHOTO_ID_5083819567566702434" border="0" /&gt;&lt;/a&gt;&lt;span style="font-size:85%;"&gt;Carry-all just picked up harvester enroute to spice field.&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;Also, a newly built refinery now will receive a free harvester, which is dropped off in style by a carry-all, which will depart immediatly after dropping off the harvester. After the carry-all leaves the onscreen boundaries, it will delete itself.&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp2.blogger.com/_rHpdClQ34VY/Ro1a9SL-R1I/AAAAAAAAAD0/ZuHbPdvsAWU/s1600-h/carry-harv2.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://bp2.blogger.com/_rHpdClQ34VY/Ro1a9SL-R1I/AAAAAAAAAD0/ZuHbPdvsAWU/s320/carry-harv2.png" alt="" id="BLOGGER_PHOTO_ID_5083819563271735122" border="0" /&gt;&lt;/a&gt;&lt;span style="font-size:85%;"&gt;Fully loaded harvester being returned to refinery&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;The carry-all which delivers the reinforcements into the field is a little special carry-all, namely a ReinforcementCarryall. I wrote a special class for it, since I didn't want to implement the code for leaving the field in the regular carry-all. That would really pollute the code. Also, this new Carry-all makes it possible to have regular reinforcement drops too, which is pretty sweet. Including stuffing 20 units into it.&lt;br /&gt;&lt;br /&gt;But, there's a little issue with the carry-alls right now: When a tile is used, it won't be able to drop off it's payload, and just keeps hanging there, until the tile becomes free. So, that's what I'm going to solve next: find a free tile and unload there.&lt;br /&gt;&lt;br /&gt;I already wrote a similar thing for the harvester to find spice tiles, so I'm considering to make it a general helper class and use a generic Comparable kind of thing. It's code that won't be called too often so speed isn't a really big issue here. And added goodness is that I can 'smear' out the search over multiple frames. In the case of finding a spice field which needs 200 steps to be found, it will cause severe lag. Being able to do this is say, 40 frames, it will only be 5 steps per frame, and therefor no big deal.&lt;br /&gt;&lt;br /&gt;After this works, I'm going to fix a little bug with the selection rendering, constructing and then finally implement the credit counter control.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/25717179-4105867308349576080?l=dune-ii.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dune-ii.blogspot.com/feeds/4105867308349576080/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=25717179&amp;postID=4105867308349576080' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/25717179/posts/default/4105867308349576080'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/25717179/posts/default/4105867308349576080'/><link rel='alternate' type='text/html' href='http://dune-ii.blogspot.com/2007/07/carry-alls-and-harvesters-excellent.html' title='Carry-alls and harvesters... An excellent combination'/><author><name>Toolmaker</name><uri>http://www.blogger.com/profile/15938868073830687692</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://bp3.blogger.com/_rHpdClQ34VY/Ro1a9iL-R2I/AAAAAAAAAD8/FJAE-efQXpA/s72-c/carry-harv.png' height='72' width='72'/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-25717179.post-7007757354764268508</id><published>2007-07-02T08:15:00.000-07:00</published><updated>2007-07-02T13:50:11.662-07:00</updated><title type='text'>Spice must flow!</title><content type='html'>And flow it will! I spent the weekend implementing harvesters and refineries. Right now, a harvester is capable to driving to a spice field, happily seperate the spice from the sand, find a refinery, drive back and enter the refinery. Once in, the refinery will empty the harvester, provide credits to the player and when the harvester is empty, it will deploy it.&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp3.blogger.com/_rHpdClQ34VY/RokZjiL-RxI/AAAAAAAAADU/0A5VP0d72Eg/s1600-h/harvref1.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://bp3.blogger.com/_rHpdClQ34VY/RokZjiL-RxI/AAAAAAAAADU/0A5VP0d72Eg/s320/harvref1.png" alt="" id="BLOGGER_PHOTO_ID_5082621752727455506" border="0" /&gt;&lt;/a&gt;&lt;span style="font-size:85%;"&gt;Our initial state: Idle harvester and refinery&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;Most of the harvesting  code is still the same as it was before, but I also changed quite a lot. Most of the changes are in the refinery, which now has a 'landing zone', the area where the harvester has to land in order for the spice to flow. Initially it used the building coordinates to find it's way into the refinery, but this meant the harvester would drive to the center of the building. Also, I updated the images concering the harvester and the animation, so they use up less VRAM(Altho it came with a dirty hack: I have to figure out in which directions to displace the animation, otherwise it looks dislocated)&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp1.blogger.com/_rHpdClQ34VY/RokZmCL-R0I/AAAAAAAAADs/3TlItSn5XI0/s1600-h/harvref4.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://bp1.blogger.com/_rHpdClQ34VY/RokZmCL-R0I/AAAAAAAAADs/3TlItSn5XI0/s320/harvref4.png" alt="" id="BLOGGER_PHOTO_ID_5082621795677128514" border="0" /&gt;&lt;/a&gt;&lt;span style="font-size:85%;"&gt;The harvester is collecting spice&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;When a harvester is full, it will request a list of all known refineries. It will traverse this list and attempt to find the most suitable refinery. That is, with the shortest queue or no queue at all. When it comes by an idle refinery, it will stop searching. When it has found a refinery, it will inform the refinery that it's enroute, lay out a path and start it's dangerous journey back home(Esp. when no carry-alls are around). The refinery will now start 'blinking' it's landing zone(when idle), or otherwise just queue up the harvester.&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp3.blogger.com/_rHpdClQ34VY/RokZkiL-RyI/AAAAAAAAADc/m_1NFoFQ37U/s1600-h/harvref2.PNG"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://bp3.blogger.com/_rHpdClQ34VY/RokZkiL-RyI/AAAAAAAAADc/m_1NFoFQ37U/s320/harvref2.PNG" alt="" id="BLOGGER_PHOTO_ID_5082621769907324706" border="0" /&gt;&lt;/a&gt;&lt;span style="font-size:85%;"&gt;Harvester returning to the refinery, which has a blinking landing pad&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;When the harvester has reached the refinery, it will wait for clearance. The clearance means the refinery is ready to receive the harvester and refine whatever goodness it brings. When the harvester receives it's clearance, it will roll onto the landing zone and remove itself from the scene. This is important, because it will otherwise keep rendering itself, which will look weird: A harvester ontop of a refinery with a harvester in it. The refinery stores the harvester internally, so when the refinery is destroyed, it will automatically destroy the harvester aswell.&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp2.blogger.com/_rHpdClQ34VY/RokZlSL-RzI/AAAAAAAAADk/KwcgXWYHGYU/s1600-h/harvref3.PNG"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://bp2.blogger.com/_rHpdClQ34VY/RokZlSL-RzI/AAAAAAAAADk/KwcgXWYHGYU/s320/harvref3.PNG" alt="" id="BLOGGER_PHOTO_ID_5082621782792226610" border="0" /&gt;&lt;/a&gt;&lt;span style="font-size:85%;"&gt;Refinery processing a harvester&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;It takes 35 seconds for a fully loaded harvester to unload(20 credits per second). When done, a harvester will ALWAYS be deployed, even when a carry-all is signaled to pick it up. This is done because it might take a while before the carry-all arrives, and when deployed, it gives other harvesters the chance to enter the refinery. This was something that annoyed me in the original game: When a harvester was waiting for a carry-all to arrive, it took a while, so other harvesters had to wait, while I was already low on cash.&lt;br /&gt;&lt;br /&gt;To do:&lt;br /&gt;- &lt;strike&gt;Have harvesters return back to the spice field&lt;/strike&gt;&lt;br /&gt;- Limit the number of tiles searched for new spice&lt;br /&gt;- Harvester spice dunes first, then normal spice&lt;br /&gt;- &lt;strike&gt;Fix bug related to tiles not being free'd&lt;/strike&gt;&lt;br /&gt;- Have a carry-all unload the harvester into the refinery&lt;br /&gt;- Have carry-alls bring a harvester to a newly placed refinery&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/25717179-7007757354764268508?l=dune-ii.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dune-ii.blogspot.com/feeds/7007757354764268508/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=25717179&amp;postID=7007757354764268508' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/25717179/posts/default/7007757354764268508'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/25717179/posts/default/7007757354764268508'/><link rel='alternate' type='text/html' href='http://dune-ii.blogspot.com/2007/07/spice-must-flow.html' title='Spice must flow!'/><author><name>Toolmaker</name><uri>http://www.blogger.com/profile/15938868073830687692</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://bp3.blogger.com/_rHpdClQ34VY/RokZjiL-RxI/AAAAAAAAADU/0A5VP0d72Eg/s72-c/harvref1.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-25717179.post-7540995379280530432</id><published>2007-06-22T06:37:00.000-07:00</published><updated>2007-06-22T06:46:02.741-07:00</updated><title type='text'>Epic debug sessions</title><content type='html'>I'm currently busy with some epic debug to fix a some major bugs in the movement code. It suffered from units running over other units, where the unit that was being ran over disappeared. It still rendered, but it no long accepted orders, could be selected, etc. I also had units that would not clear tiles they occupied properly, so that in some cases, tiles were still used while the unit was half a map further, which led to other units behaving strangely when driving. And last, units sometimes 'jumped' to other tiles and started vibrating. Yes, vibrating... No idea what  causes that.&lt;br /&gt;&lt;br /&gt;I fixed in the past week the run overs, which is nice. By fixing this, I haven't seen units warp since I fixed that, nor vibrate. So it seems that I only need to fix the clean up. I made a nice function which runs a check on the entire map and shows which tiles are used by what unit, and if this unit is actually positioned on that tile. And if not, it shows a [ERROR] tag. In combination with the debug log I hope to find out where it goes wrong.&lt;br /&gt;&lt;br /&gt;After this works, I'm gonna make units 'defend' themselfs from others. ie, if attacked, they'll start attacking their attacker.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/25717179-7540995379280530432?l=dune-ii.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dune-ii.blogspot.com/feeds/7540995379280530432/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=25717179&amp;postID=7540995379280530432' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/25717179/posts/default/7540995379280530432'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/25717179/posts/default/7540995379280530432'/><link rel='alternate' type='text/html' href='http://dune-ii.blogspot.com/2007/06/epic-debug-sessions.html' title='Epic debug sessions'/><author><name>Toolmaker</name><uri>http://www.blogger.com/profile/15938868073830687692</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-25717179.post-6904793421218867617</id><published>2007-06-11T11:56:00.000-07:00</published><updated>2007-06-11T12:25:29.712-07:00</updated><title type='text'>Let the vehicle construction begin!</title><content type='html'>I got unit construction in. Wasn't a lot of difficult work. It basically was adding an additional check to the techtree retrieval function, and if a tech item was a unit, place the icon in the Unit strip, and otherwise the building strip.&lt;br /&gt;&lt;br /&gt;The rest of the system is the same: The building asks the ConstructionManager if there's a job waiting for him, and if so, it takes the order and executes it. When done, it will now check what kind of object is done. If it's a unit, it will check if there's a free spot around the building, and if yes, it will deploy the vehicle there. When there are no more tiles free around the building, it will show a nice message in the debuglog telling me to implement carry-all's to pickup tanks from buildings(Which is actually really friendly).&lt;br /&gt;&lt;br /&gt;I still have to implement showing a deployment animation when a unit is deployed, but that's not that difficult. It's a matter of minutes to implement the additional class(ConstructionBuilding) and the code to trigger the animation.&lt;br /&gt;&lt;br /&gt;The next step is to give each unit / building a unique ID which is also linked to it's owner. I'm running into some nasty bugs, which makes debugging difficult if you got 20 units on the screen and 1 flips out...&lt;br /&gt;&lt;br /&gt;Bugs I have at the moment: When a unit runs into an obstacle along it's path, it will try to find a new route. If it can't find one(Because the blocking object is the end-tile), it suddenly changes it's position to 1 tile back and starts vibrating... Very odd.&lt;br /&gt;&lt;br /&gt;The other bug is related to units popping their states off the stack for no apparant reason. That only happens when moving in groups tho, so I need IDs to track them.&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp3.blogger.com/_rHpdClQ34VY/Rm2gA_2tVsI/AAAAAAAAADM/EX8Uku0-1KM/s1600-h/unit-build.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://bp3.blogger.com/_rHpdClQ34VY/Rm2gA_2tVsI/AAAAAAAAADM/EX8Uku0-1KM/s320/unit-build.png" alt="" id="BLOGGER_PHOTO_ID_5074888294117758658" border="0" /&gt;&lt;/a&gt;&lt;span style="font-size:85%;"&gt;Units after their construction&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;To do for next time:&lt;br /&gt;- Add IDs for units and buildings&lt;br /&gt;- Fix movement bug&lt;br /&gt;- Fix state popping bug&lt;br /&gt;- Add deployment animation&lt;br /&gt;- Add icon sorting to the construction bars. It's annoying to have the order change depending on how you build the buildings(Or if you lose your barracks half way) and the icons end up in the bottom.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/25717179-6904793421218867617?l=dune-ii.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dune-ii.blogspot.com/feeds/6904793421218867617/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=25717179&amp;postID=6904793421218867617' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/25717179/posts/default/6904793421218867617'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/25717179/posts/default/6904793421218867617'/><link rel='alternate' type='text/html' href='http://dune-ii.blogspot.com/2007/06/let-vehicle-construction-begin.html' title='Let the vehicle construction begin!'/><author><name>Toolmaker</name><uri>http://www.blogger.com/profile/15938868073830687692</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://bp3.blogger.com/_rHpdClQ34VY/Rm2gA_2tVsI/AAAAAAAAADM/EX8Uku0-1KM/s72-c/unit-build.png' height='72' width='72'/><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-25717179.post-8297068638372290748</id><published>2007-06-07T13:19:00.000-07:00</published><updated>2007-06-07T13:36:26.673-07:00</updated><title type='text'>Bug fixes, loads of them!</title><content type='html'>While technically still in development I hunted down and squashed a load of bugs in the past few days. Having a laptop and being able to work in the train is awesome. Every now and then I see people take a peak at my screen to see what I'm doing. Earlier this week there was a guy who just kept looking at my screen, and back outside, back to the screen, etc. Esp. when I fixed a little thingy and ran the game again to see how the changes worked out.&lt;br /&gt;&lt;br /&gt;First, the list of bugs I managed to strangle(For those not interested, skip down, there's imagery there).&lt;ul&gt;&lt;li&gt;&lt;font size="2"&gt;Fixed bug where buildings would be placed 1 tile to the left and 1 tile up &lt;/font&gt;&lt;/li&gt;&lt;li&gt;&lt;font size="2"&gt;Lowered scrolling threshold to be Tile.Size / 2(So scrolling only happens on the edges, instead of 1 complete tile) &lt;/font&gt;&lt;/li&gt;&lt;li&gt;&lt;font size="2"&gt;Fixed bug where you could order buildings to move/attack(Would cause crash) &lt;/font&gt;&lt;/li&gt;&lt;li&gt;&lt;font size="2"&gt;Dragselection rectangle / Building placement rect don't show up when hovering over UI components &lt;/font&gt;&lt;/li&gt;&lt;li&gt;&lt;font size="2"&gt;Renamed Radar to Outpost(Needed for Reflection to work) &lt;/font&gt;&lt;/li&gt;&lt;li&gt;&lt;font size="2"&gt;Fixed bug where placement rectangle would be rendered OVER UI components while while the mouse was outside the component&lt;/font&gt;&lt;/li&gt;&lt;li&gt;&lt;font size="2"&gt;Buildings can no longer be added to the building manager of a different owner &lt;/font&gt;&lt;/li&gt;&lt;li&gt;&lt;font size="2"&gt;Fixed debug log text &lt;/font&gt;&lt;/li&gt;&lt;li&gt;&lt;font size="2"&gt;Added a little bit more debug output&lt;/font&gt;&lt;/li&gt;&lt;li&gt;&lt;font size="2"&gt;Fixed an issue where the CheckMouseOver() function would read out of bounds &lt;/font&gt;&lt;/li&gt;&lt;li&gt;&lt;font size="2"&gt;Fixed an issue where the mouse handling code would respond to mouse clicks in the UI&lt;/font&gt; &lt;/li&gt;&lt;/ul&gt;As for the new feature: I added concrete slabs. Not very special as you can see below, but still, it's in. I think the next step to this is to allow buildings to build units. After that I think it's time for refineries to 'order' a harvester reinforcement.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp0.blogger.com/_rHpdClQ34VY/Rmhqhf2tVrI/AAAAAAAAADE/iBnDQI8o5Uo/s1600-h/slab.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://bp0.blogger.com/_rHpdClQ34VY/Rmhqhf2tVrI/AAAAAAAAADE/iBnDQI8o5Uo/s320/slab.png" alt="" id="BLOGGER_PHOTO_ID_5073422103952053938" border="0"&gt;&lt;/a&gt;&lt;br /&gt;I also noticed that the revision number updates weirdly... I have a pre-compile step which runs an svn lookup batch file to determine the revision of the repository, turn that into a sexy class with getter and store it all. However, it doesn't always(read never) run when compiling. Pretty weird, and annoying. Probably only runs on a full re-compile, so I usually just run the batch file manually after commiting my code. Not the best solution, but it works.&lt;br /&gt;&lt;br /&gt;I also started committing more often, since I used to do too much work between commits. If my laptop would either explode or get stolen, I would probably lose a week or 2 of work. Not really that appealing...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/25717179-8297068638372290748?l=dune-ii.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dune-ii.blogspot.com/feeds/8297068638372290748/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=25717179&amp;postID=8297068638372290748' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/25717179/posts/default/8297068638372290748'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/25717179/posts/default/8297068638372290748'/><link rel='alternate' type='text/html' href='http://dune-ii.blogspot.com/2007/06/bug-fixes-loads-of-them.html' title='Bug fixes, loads of them!'/><author><name>Toolmaker</name><uri>http://www.blogger.com/profile/15938868073830687692</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://bp0.blogger.com/_rHpdClQ34VY/Rmhqhf2tVrI/AAAAAAAAADE/iBnDQI8o5Uo/s72-c/slab.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-25717179.post-7113220303940512824</id><published>2007-06-06T06:22:00.000-07:00</published><updated>2007-06-06T08:47:59.535-07:00</updated><title type='text'>Building placement is in</title><content type='html'>In the past 2 days I put the code together for placing buildings on the map. While not completely done yet, I also found a few bugs in the code relating to writing to the debug console, finding items on the map and the techtree.&lt;br /&gt;&lt;br /&gt;I'll be going to fix these issues before adding in the construction of vehicles and implementing the credits counter. But after I cleaned up the input handling code.&lt;br /&gt;&lt;br /&gt;First some screenshots:&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp1.blogger.com/_rHpdClQ34VY/Rma4UP2tVoI/AAAAAAAAACs/MdAKRyLVWOk/s1600-h/build.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://bp1.blogger.com/_rHpdClQ34VY/Rma4UP2tVoI/AAAAAAAAACs/MdAKRyLVWOk/s320/build.png" alt="" id="BLOGGER_PHOTO_ID_5072944688272332418" border="0" /&gt;&lt;/a&gt;&lt;span style="font-size:85%;"&gt;Debug console display we started building a new WOR. Note the 'built by' bug.&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp2.blogger.com/_rHpdClQ34VY/Rma4Uf2tVpI/AAAAAAAAAC0/XnMKLE9WTd0/s1600-h/place.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://bp2.blogger.com/_rHpdClQ34VY/Rma4Uf2tVpI/AAAAAAAAAC0/XnMKLE9WTd0/s320/place.png" alt="" id="BLOGGER_PHOTO_ID_5072944692567299730" border="0" /&gt;&lt;/a&gt;&lt;span style="font-size:85%;"&gt;Placement of our new building not allowed here, see debug console for next error&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp2.blogger.com/_rHpdClQ34VY/Rma4Uf2tVqI/AAAAAAAAAC8/37yGRknMtLE/s1600-h/placed.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://bp2.blogger.com/_rHpdClQ34VY/Rma4Uf2tVqI/AAAAAAAAAC8/37yGRknMtLE/s320/placed.png" alt="" id="BLOGGER_PHOTO_ID_5072944692567299746" border="0" /&gt;&lt;/a&gt;&lt;span style="font-size:85%;"&gt;And voila, our new building is placed, including sexy deployment animations(Not included)&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;div style="text-align: left;"&gt;&lt;span style="font-size:100%;"&gt;The next step is moving all the input code into the LocalPlayer class. Hooray for .NET partial classes, since this will prevent my code from turning into a huge pile of steamy mess that could make even the most seasoned developer cry himself to sleep.&lt;br /&gt;&lt;br /&gt;After that, I will first fix all the bugs I've found till so far and then I'll implement the placement of concrete(yay!), the penalty of placing a building without concrete and construction of vehicles. If those work, I'm considering implement a basic network framework(!!!) and then start polishing up basic features. When these features are implemented (Which will take a while), I have a basic playable RTS.&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/25717179-7113220303940512824?l=dune-ii.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dune-ii.blogspot.com/feeds/7113220303940512824/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=25717179&amp;postID=7113220303940512824' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/25717179/posts/default/7113220303940512824'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/25717179/posts/default/7113220303940512824'/><link rel='alternate' type='text/html' href='http://dune-ii.blogspot.com/2007/06/building-placement-is-in.html' title='Building placement is in'/><author><name>Toolmaker</name><uri>http://www.blogger.com/profile/15938868073830687692</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://bp1.blogger.com/_rHpdClQ34VY/Rma4UP2tVoI/AAAAAAAAACs/MdAKRyLVWOk/s72-c/build.png' height='72' width='72'/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-25717179.post-4294767874391894771</id><published>2007-06-01T02:07:00.001-07:00</published><updated>2007-06-01T02:42:53.696-07:00</updated><title type='text'>Construction is in... Now building placement</title><content type='html'>Over the past few weeks I've slowly implemented construction of buildings. It's possible to now select a build icon from the sidebar and add it to a construction queue. Each building checks every update cycle(But only when idle) if there's a queued up item, it takes from the queue and starts 'building' it.&lt;br /&gt;&lt;br /&gt;When done, it informs the player object about it, which can then take the appropriate action. A human player will see a message / hear a sound and an AI will place it directly.&lt;br /&gt;&lt;br /&gt;I'm currently working on implementing the building placement. However, I still don't know how to fully implement it. I currently have a GameInputHandler which handles that part of the input(Do the picking, context sensitive cursor, etc.). But, I need to change it around to be less, messy.&lt;br /&gt;&lt;br /&gt;Also, I've been thinking about adding a feature for hearing impaired. One of my current projectmates for a college project is deaf, and one of his biggest issue with most RTS games is that he never gets a message about that his base is being raped. (He usually notices that he's getting his ass kicked when it's too late...) Well, there is a warning, but without working hearing, he can't hear it. So I want to add an optional screen message, which blinks in the middle of the screen. Simple to add, and usefull for those who can't use sounds or can't hear. Having people in your projectgroup which have a minor disability widens your view a bit.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/25717179-4294767874391894771?l=dune-ii.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dune-ii.blogspot.com/feeds/4294767874391894771/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=25717179&amp;postID=4294767874391894771' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/25717179/posts/default/4294767874391894771'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/25717179/posts/default/4294767874391894771'/><link rel='alternate' type='text/html' href='http://dune-ii.blogspot.com/2007/06/construction-is-in-now-building.html' title='Construction is in... Now building placement'/><author><name>Toolmaker</name><uri>http://www.blogger.com/profile/15938868073830687692</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-25717179.post-6937413334883756803</id><published>2007-05-16T01:15:00.000-07:00</published><updated>2007-05-16T01:23:41.648-07:00</updated><title type='text'>I am an idiot, srsly</title><content type='html'>I'm an idiot. A huge idiot. Remember how I reported about rolling out 2 Draytek Vigor 2800G routers? Turns out I ordered the wrong routers. A 400 euro mistake.&lt;br /&gt;&lt;br /&gt;The routers I ordered come with a built-in modem, and all snazzy features that the router has, are done on the WAN interface(The modem). But, Versatel doesn't allow their customers to replace the modem with one of their own and the new line that was in the new office was an SDSL line. So none of the routers can be used.&lt;br /&gt;&lt;br /&gt;I'm trying to order the Vigor 2910 now, which is used to cable(And therefor, has a WAN interface where an RJ-45 plug fits in). I'll contact a reseller to see if it works on the SDSL line and Versatel, and if so, see if I can get a hold of them today and roll them on tomorrow(Which was supposed to be a day off)...&lt;br /&gt;&lt;br /&gt;Idiot...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/25717179-6937413334883756803?l=dune-ii.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dune-ii.blogspot.com/feeds/6937413334883756803/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=25717179&amp;postID=6937413334883756803' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/25717179/posts/default/6937413334883756803'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/25717179/posts/default/6937413334883756803'/><link rel='alternate' type='text/html' href='http://dune-ii.blogspot.com/2007/05/i-am-idiot-srsly.html' title='I am an idiot, srsly'/><author><name>Toolmaker</name><uri>http://www.blogger.com/profile/15938868073830687692</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-25717179.post-5914164889640607689</id><published>2007-05-14T14:57:00.000-07:00</published><updated>2007-05-14T15:03:57.521-07:00</updated><title type='text'>Problem solved, and the lack of updates</title><content type='html'>I'll kick off with some good news: I solved the issues with the weird rendering of vertices. I got the advice to toggle some of the important and basic D3D feats off/on to make sure it all didn't get messed up.&lt;br /&gt;&lt;br /&gt;I decided to walk the list of D3D renderstates and pick the ones I knew and change them to be off. This was lightning, Z-Buffer, CullMode and FillMode. Turns out, the z-buffer was the problem. So now i know where the problem lies, I can continue to work on the issues at hand.&lt;br /&gt;&lt;br /&gt;However, there is a reason for the lack of updates: I'm very busy at the moment with school and my business. For school we have program a robot, and most of the hardware of the bot was dead. So we got new hardware, and need to update all the code to work with the new hardware, re-write all the PIC controllers(They burned out, and no source was avaliable) and implement new features too. And I got a few clients that demand my attention aswell.&lt;br /&gt;&lt;br /&gt;Tomorrow I will be delivering 2 Draytek Vigor 2800G to a client. And these things are pretty sweet. They support up to 32 simultaneous VPN connections, protocol blocking, content filtering, url filtering and they're wireless too. It's pointless for home usage(As they're 200 euros a piece), but for a business, it's pretty sweet stuff.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/25717179-5914164889640607689?l=dune-ii.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dune-ii.blogspot.com/feeds/5914164889640607689/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=25717179&amp;postID=5914164889640607689' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/25717179/posts/default/5914164889640607689'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/25717179/posts/default/5914164889640607689'/><link rel='alternate' type='text/html' href='http://dune-ii.blogspot.com/2007/05/problem-solved-and-lack-of-updates.html' title='Problem solved, and the lack of updates'/><author><name>Toolmaker</name><uri>http://www.blogger.com/profile/15938868073830687692</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-25717179.post-6985841457097878485</id><published>2007-05-05T15:11:00.000-07:00</published><updated>2007-05-05T16:56:34.521-07:00</updated><title type='text'>Some minor issues...</title><content type='html'>I'm currently having weird issues rendering linestrips... I noticed this week that the drag selection wasn't rendering anymore, so I went to search what the cause of this was.&lt;br /&gt;&lt;br /&gt;I still have no idea what causes it, but the more I test, the stranger the results: After a a reboot or running another DX application, it now shows a filled triangle(As it should), which it is striped. However, when I move my self-rendered cursor over it, it disappears.&lt;br /&gt;&lt;br /&gt;Restarting the application doesn't work, it just doesn't show up. Pretty weird... I asked on GDNet, hoping they can help me out....&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/25717179-6985841457097878485?l=dune-ii.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dune-ii.blogspot.com/feeds/6985841457097878485/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=25717179&amp;postID=6985841457097878485' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/25717179/posts/default/6985841457097878485'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/25717179/posts/default/6985841457097878485'/><link rel='alternate' type='text/html' href='http://dune-ii.blogspot.com/2007/05/some-minor-issues.html' title='Some minor issues...'/><author><name>Toolmaker</name><uri>http://www.blogger.com/profile/15938868073830687692</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-25717179.post-4275165058444209777</id><published>2007-04-23T14:39:00.000-07:00</published><updated>2007-04-23T15:02:28.377-07:00</updated><title type='text'>Almost a game...</title><content type='html'>Today I merged the UI code with the Gamestate code. And lo and behold: Something that looks like a game.&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp3.blogger.com/_rHpdClQ34VY/Ri0n0DNYJ-I/AAAAAAAAACk/fiRJOQWZxFI/s1600-h/almost-game.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://bp3.blogger.com/_rHpdClQ34VY/Ri0n0DNYJ-I/AAAAAAAAACk/fiRJOQWZxFI/s320/almost-game.png" alt="" id="BLOGGER_PHOTO_ID_5056741731775031266" border="0" /&gt;&lt;/a&gt;&lt;span style="font-size:85%;"&gt;Almost a game, almost.&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;I discovered there is something severely messed up(I nearly wrote &lt;span style="font-style: italic;"&gt;fucked up&lt;/span&gt;) with my Post-Build step. It doesn't update the revision in the bottom of the screen properly. It probably has to do with TortoiseSVN and it not going a proper update after the commit. Because if I do an update after the commit and recreate the file, it works like a charm. Pretty weird.&lt;br /&gt;&lt;br /&gt;Also, I'm thinking about how I am going to handle building of stuff. First of all, I need something that manages buildings. We shall call this the BuildingManager. The BuildingManager contains a list of all buildings in possession of the player. When a building is destroyed, it will remove it, etc. Also, I need something to uniquely ID the buildings across the network(Yes, I'm also thinking about). So, each building will have an unique identifier, which is nothing more but a sequential integer.&lt;br /&gt;&lt;br /&gt;When a building is being constructed, the BuildingManager will receive it's application and store it. It will then return the unique identifier to the building and inform the network about a newly constructed building. When it is the first building of it's kind, it will also contact the ConstructionManager. The construction manager will look in TechTree and see if there are any changes needed. If for instance the building just placed is a construction yard, it will see that after a construction yard has been built, the slab and windtrap will be unlocked. It will then add these to the construction sidebar.&lt;br /&gt;&lt;br /&gt;For a networked game, there will be a RemoteBuildingManager(RBM) and a RemoteConstructionManager(RCM). The RCM will not schedule any construction, it will only pass the order to the correct building. The LocalConstructionManager(LCM) however, will find an idle building and post the build order there to be completed. This has the added pro of the game being able to check if a player is using hacks(Because, it can see how long it takes before the next build order arrives. If the remote player has an instant build hack, it can see that the player still has to wait for the construction to be completed).&lt;br /&gt;&lt;br /&gt;So, still a lot of work to do, and I'll start out with the techtree loader tomorrow.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/25717179-4275165058444209777?l=dune-ii.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dune-ii.blogspot.com/feeds/4275165058444209777/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=25717179&amp;postID=4275165058444209777' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/25717179/posts/default/4275165058444209777'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/25717179/posts/default/4275165058444209777'/><link rel='alternate' type='text/html' href='http://dune-ii.blogspot.com/2007/04/almost-game.html' title='Almost a game...'/><author><name>Toolmaker</name><uri>http://www.blogger.com/profile/15938868073830687692</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://bp3.blogger.com/_rHpdClQ34VY/Ri0n0DNYJ-I/AAAAAAAAACk/fiRJOQWZxFI/s72-c/almost-game.png' height='72' width='72'/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-25717179.post-6893568080220564782</id><published>2007-04-18T16:04:00.000-07:00</published><updated>2007-04-18T16:43:39.509-07:00</updated><title type='text'>Hello Arrakis!!</title><content type='html'>I added some more features to the Windowing system, and I think I'm done for now with the system. All that remains are the controls to be written, and I'll write those as soon as I need them.&lt;br /&gt;&lt;br /&gt;Features I've added:&lt;br /&gt;- Complete rendering of the borders and title bar&lt;br /&gt;- Client rectangles(Client Rectangle = Window - borders)&lt;br /&gt;- Dragging of windows&lt;br /&gt;- Move event for when the window is being dragged around&lt;br /&gt;&lt;br /&gt;The dragging of the window was quite some work, as I needed to change quite a lot of code. It wasn't very difficult, just required a lot of code changing, since I never wrote the code to be able to drag the windows around, nor intend to have borders around it them(Pretty stupid).&lt;br /&gt;&lt;br /&gt;This initially ended up with the Control class drawing itself on the wrong position while being dragged, and the derived class draw on the correct position. Pretty weird, and I still have no idea why this happened. The image below shows this in action(I had to place my fingers in a really uncomfortable position to be able to get this pic. My left hand pink and ring finger held down the FN + ALT key, while my thumb help down the L-mouse on my touchpad, my index finger drew circles on the touchpad and my right hand was used to pressed Print Screen).&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp3.blogger.com/_rHpdClQ34VY/RiakKs_J54I/AAAAAAAAACU/qTN90HIHIRo/s1600-h/render-bug.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://bp3.blogger.com/_rHpdClQ34VY/RiakKs_J54I/AAAAAAAAACU/qTN90HIHIRo/s320/render-bug.png" alt="" id="BLOGGER_PHOTO_ID_5054908135551657858" border="0" /&gt;&lt;/a&gt;&lt;span style="font-size:85%;"&gt;Dragging bug in action, nearly lost my fingers while obtaining this image&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;After I fixed the dragging bug, I'd figured I'd make a standard dialog window(Not yet written, but the code needed for it is ready, just need to be moved into another class). This is what it looks like:&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp0.blogger.com/_rHpdClQ34VY/RiakK8_J55I/AAAAAAAAACc/ezhCuFXIRsQ/s1600-h/hello-world.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://bp0.blogger.com/_rHpdClQ34VY/RiakK8_J55I/AAAAAAAAACc/ezhCuFXIRsQ/s320/hello-world.png" alt="" id="BLOGGER_PHOTO_ID_5054908139846625170" border="0" /&gt;&lt;/a&gt;&lt;span style="font-size:85%;"&gt;Standard dialog with label and button&lt;br /&gt;&lt;/span&gt;&lt;div style="text-align: left;"&gt;&lt;span style="font-size:100%;"&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;How does the dragging system work? &lt;/span&gt;&lt;br /&gt;When the L mouse down event is catched, it checks if the mouse is over a window. If this is true, it will check if the mouse is within the ClientRectangle. If this isn't the case, it checks if the Y is within the bounds of the TitleBar. If this is true, it will record the state as Dragging for the LMouse button, and which control it is dragging.&lt;br /&gt;&lt;br /&gt;On every mousemove, it checks if the LMouse is down, and when this is the case AND the state is dragging, it takes the Delta X and Y and substracts this from the position of the window. It then forces to update all the client rectangles and voila, done.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;New control&lt;/span&gt;&lt;br /&gt;I added a Label control. Not very special, it took like 2 minutes to create...&lt;br /&gt;&lt;br /&gt;Todo for now:&lt;br /&gt;- Create a MessageBox class.&lt;br /&gt;- Add support for modal windows&lt;br /&gt;- Incorporate UI into existing game class.&lt;br /&gt;- Build CreditCounter control(Dune specific)&lt;br /&gt;- Layout new todo list for building, techtree, etc.&lt;br /&gt;&lt;br /&gt;Also, to answer a previously asked question about open-sourceness:&lt;br /&gt;For now, I will keep the source closed. This is a personal project, and I don't take kindly to people changing my code while I'm still working on the game. However, after the game is completed, I might open-source it. However, I might, might release my UI system, in case people want to take a look at it, and perhaps improve it. It's not the best system out there, there are MUCH better UI systems out there, but it works for a small amount of controls.&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/25717179-6893568080220564782?l=dune-ii.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dune-ii.blogspot.com/feeds/6893568080220564782/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=25717179&amp;postID=6893568080220564782' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/25717179/posts/default/6893568080220564782'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/25717179/posts/default/6893568080220564782'/><link rel='alternate' type='text/html' href='http://dune-ii.blogspot.com/2007/04/hello-arrakis.html' title='Hello Arrakis!!'/><author><name>Toolmaker</name><uri>http://www.blogger.com/profile/15938868073830687692</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://bp3.blogger.com/_rHpdClQ34VY/RiakKs_J54I/AAAAAAAAACU/qTN90HIHIRo/s72-c/render-bug.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-25717179.post-5679209401487548754</id><published>2007-04-15T14:24:00.000-07:00</published><updated>2007-04-15T14:45:55.983-07:00</updated><title type='text'>Image strips are in... And update on dialogs</title><content type='html'>Today I managed to add the images into the imagestrip. The image strip is the little strip that holds all the icons of the units/buildings you can make, and allows you to scroll through it.&lt;br /&gt;&lt;br /&gt;It was rather simple to implement, except I ran into 2 little problems: The original images that were used in the original Dune for the imagestrip end up HUUUUGE when enlarged. So I scaled them up 2 and then reduced them to 66% of their size. That worked quite well(As you will see below).&lt;br /&gt;&lt;br /&gt;After that it was a matter of painting the green bar between the 2 images and fit a few images in. Fitting the images in wasn't very difficult, except that was were the other problem was: The icons Stefan provided with his Dune 2 image set were too small. Increasing them in size turned out horrible. Really horrible. Loads of artifacts and they were pretty pixelated.&lt;br /&gt;&lt;br /&gt;So I had to find a way to extract the images myself. This was rather problematic, as I had no idea which of the PAK files contained these images, and only 1 PAK file contained the palette files. I downloaded XCC Utilities and started messing around, but I was unable to load a palette after loading a new PAK file.&lt;br /&gt;&lt;br /&gt;Eventually I extract the palette file, made copies of the MENTAT.PAK and FINALE.PAK. I then opened up XCC editor and placed the palette file into both these files and saved them. I then loaded up FINALE.PAK and MENTAT.PAK into XCC mixer and discovered that mentat had all the images, but that finale.pak also had a bunch. Duplicates that is, since all these images were also in mentat.pak. I have no idea why there were 15(!!) duplicates in the FINALE.PAK. These images(All just 1 frame) were the sardaukar, death hand, fremen, refinery, MCV, sand worm and a few others. When I looked in mentat.pak, I fould all the images, with their animations.&lt;br /&gt;&lt;br /&gt;I extracted these files, and converted them into icons. The icons are 52x32 in size. If anyone wants these, for whatever reason, let me know, and I'll upload them. I also have to extract a few other files from the dune.pak file, since these are missing(I think I'm missing 1 missile impact animation and the burning/burned out tank).&lt;br /&gt;&lt;br /&gt;Right now I need to update the image strip so that clicking is supported, it's possible to mask out all the images except 1(The building animation, not sure how I'm going to do that with multiple construction queues) and I need to fix the windows and their title-bar/border drawing.&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp3.blogger.com/_rHpdClQ34VY/RiKYwgGBgeI/AAAAAAAAAB8/zT7KhSs4ro4/s1600-h/imagestrip.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://bp3.blogger.com/_rHpdClQ34VY/RiKYwgGBgeI/AAAAAAAAAB8/zT7KhSs4ro4/s320/imagestrip.png" alt="" id="BLOGGER_PHOTO_ID_5053769690879459810" border="0" /&gt;&lt;/a&gt;&lt;span style="font-size:85%;"&gt;The UI in action, showing the image strip(Scrolling works) and a window with title bar&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;I also need find a better way to render client areas of Windows. Right now they are textures. That's a a massive waste of VRAM, so I need to fix that. I'm probably going to use quads for the client area and just cram them into a VertexBuffer and render all the client areas at once. Not sure how that will work out, but I'll experiment with it. Alternatively, I could just create 1x1 textures with the correct background color, and rendered them stretched. Don't know which one is less work and/or cheaper to do in terms of performance.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/25717179-5679209401487548754?l=dune-ii.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dune-ii.blogspot.com/feeds/5679209401487548754/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=25717179&amp;postID=5679209401487548754' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/25717179/posts/default/5679209401487548754'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/25717179/posts/default/5679209401487548754'/><link rel='alternate' type='text/html' href='http://dune-ii.blogspot.com/2007/04/image-strips-are-in-and-update-on.html' title='Image strips are in... And update on dialogs'/><author><name>Toolmaker</name><uri>http://www.blogger.com/profile/15938868073830687692</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://bp3.blogger.com/_rHpdClQ34VY/RiKYwgGBgeI/AAAAAAAAAB8/zT7KhSs4ro4/s72-c/imagestrip.png' height='72' width='72'/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-25717179.post-5901635196669800243</id><published>2007-04-12T16:27:00.000-07:00</published><updated>2007-04-12T16:31:05.937-07:00</updated><title type='text'>More gooey goodness...</title><content type='html'>Ok, f this. I just spent 30 minutes writing up an entry about my awesome progress with in-depth details of decisions, backgrouns and other information, and then Firefox decided to crash.&lt;br /&gt;&lt;br /&gt;When I restarted it, it recovered the session, but the entire post was gone. And apparantly, clicking 'Recover post' does nothing, except show up a messagebox that it will replace the post with an older version. WHAT OLDER VERSION?&lt;br /&gt;&lt;br /&gt;Here's an image of the UI in action: A button with the mouse over it and the left mouse button down. Hooray, BOOOOORING! And yes, I'm annoyed now. Really annoyed. Annoyed as in I want to break something. And yes, I have anger management issues. It's a miracle I never killed someone.&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp3.blogger.com/_rHpdClQ34VY/Rh7AagGBgdI/AAAAAAAAAB0/pWDyc46yFZo/s1600-h/ui-events.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://bp3.blogger.com/_rHpdClQ34VY/Rh7AagGBgdI/AAAAAAAAAB0/pWDyc46yFZo/s320/ui-events.png" alt="" id="BLOGGER_PHOTO_ID_5052687393480606162" border="0" /&gt;&lt;/a&gt;&lt;span style="font-size:85%;"&gt;A really not very exciting image with a button responding to a mouse down event. Tee hee&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/25717179-5901635196669800243?l=dune-ii.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dune-ii.blogspot.com/feeds/5901635196669800243/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=25717179&amp;postID=5901635196669800243' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/25717179/posts/default/5901635196669800243'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/25717179/posts/default/5901635196669800243'/><link rel='alternate' type='text/html' href='http://dune-ii.blogspot.com/2007/04/more-gooey-goodness.html' title='More gooey goodness...'/><author><name>Toolmaker</name><uri>http://www.blogger.com/profile/15938868073830687692</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://bp3.blogger.com/_rHpdClQ34VY/Rh7AagGBgdI/AAAAAAAAAB0/pWDyc46yFZo/s72-c/ui-events.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-25717179.post-1125061810467486016</id><published>2007-04-11T05:34:00.000-07:00</published><updated>2007-04-11T05:38:15.285-07:00</updated><title type='text'>It's my birthday...</title><content type='html'>So yeah, I turned 24 today. Nothing special, just a funny cat. Also, I have no time to code today.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp1.blogger.com/_rHpdClQ34VY/RhzWngGBgbI/AAAAAAAAABk/2DdSJaoUYec/s1600-h/1175983545871.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://bp1.blogger.com/_rHpdClQ34VY/RhzWngGBgbI/AAAAAAAAABk/2DdSJaoUYec/s320/1175983545871.jpg" alt="" id="BLOGGER_PHOTO_ID_5052148856121295282" border="0" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/25717179-1125061810467486016?l=dune-ii.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dune-ii.blogspot.com/feeds/1125061810467486016/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=25717179&amp;postID=1125061810467486016' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/25717179/posts/default/1125061810467486016'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/25717179/posts/default/1125061810467486016'/><link rel='alternate' type='text/html' href='http://dune-ii.blogspot.com/2007/04/its-my-birthday.html' title='It&apos;s my birthday...'/><author><name>Toolmaker</name><uri>http://www.blogger.com/profile/15938868073830687692</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://bp1.blogger.com/_rHpdClQ34VY/RhzWngGBgbI/AAAAAAAAABk/2DdSJaoUYec/s72-c/1175983545871.jpg' height='72' width='72'/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-25717179.post-3442919422310498340</id><published>2007-04-09T14:25:00.000-07:00</published><updated>2007-04-09T14:34:33.347-07:00</updated><title type='text'>Still working on the UI....</title><content type='html'>Yes, I am working on the UI stuff. I got the events sorted out, and I'm right now working on rendering the system controls and the window bar. Nothing special to see right now.&lt;br /&gt;&lt;br /&gt;To keep you guys happy, here's a cat. DuneCat&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp1.blogger.com/_rHpdClQ34VY/RhqvstGz4qI/AAAAAAAAABc/5tr0B9wxVnc/s1600-h/1176152741968.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://bp1.blogger.com/_rHpdClQ34VY/RhqvstGz4qI/AAAAAAAAABc/5tr0B9wxVnc/s320/1176152741968.jpg" alt="" id="BLOGGER_PHOTO_ID_5051543114606699170" border="0" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/25717179-3442919422310498340?l=dune-ii.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dune-ii.blogspot.com/feeds/3442919422310498340/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=25717179&amp;postID=3442919422310498340' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/25717179/posts/default/3442919422310498340'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/25717179/posts/default/3442919422310498340'/><link rel='alternate' type='text/html' href='http://dune-ii.blogspot.com/2007/04/still-working-on-ui.html' title='Still working on the UI....'/><author><name>Toolmaker</name><uri>http://www.blogger.com/profile/15938868073830687692</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://bp1.blogger.com/_rHpdClQ34VY/RhqvstGz4qI/AAAAAAAAABc/5tr0B9wxVnc/s72-c/1176152741968.jpg' height='72' width='72'/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-25717179.post-1959718185735427287</id><published>2007-04-07T15:40:00.000-07:00</published><updated>2007-04-07T16:02:15.411-07:00</updated><title type='text'>User Interfaces are GO!</title><content type='html'>So, yesterday I started working on the user interface code. I thought it over a bit, and came to the conclusion I would go with the "Everything is a window" approach. The reason for this was so that I could make the WindowManager class a Task, shove it into my engine, and forget about it.&lt;br /&gt;&lt;br /&gt;However, it made me think later on: What if you're playing an FPS, and everything is a window? Then there might be a chance that you have your comm. window open while laying an ambush. You suddenly see an enemy walk around the corner. He hasn't seen you yet, so you jump up, aim at his head and hit left mouse. But instead of shooting him the head, you'll order a pizza from the comm. window, and end up dead yourself. Oops, comm. window stole the cursor focus.&lt;br /&gt;&lt;br /&gt;So, before I managed to mess everything up, I changed it all to be "not-everything-is-a-window", and non-task. Basically, I have to keep track of the WindowManager now, and during each update cycle check if the mouse is over a window, and then ignore the input in the regular game handler. When it's not over a window, I do my normal mouse logic. In the case of the FPS, it would mean I have to press a special button before I'm able to interact with the UI.&lt;br /&gt;&lt;br /&gt;Right now, basics are in, that is: I have the WindowManager, basic flat-style windows and response from the windows from the mouse. As seen in this exciting image(I merged to images together, because having 2 huge black images with 4 colored squares is boring).&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp2.blogger.com/_rHpdClQ34VY/RhgfldGz4pI/AAAAAAAAABU/bQTMTBOC4b0/s1600-h/ui.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://bp2.blogger.com/_rHpdClQ34VY/RhgfldGz4pI/AAAAAAAAABU/bQTMTBOC4b0/s320/ui.png" alt="" id="BLOGGER_PHOTO_ID_5050821710424826514" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;Basically, I clicked on the blue window, and it came Top-Most. Exciting huh? Indeed, it's not...&lt;br /&gt;&lt;br /&gt;Before I started to work on the gooey system, I also updated my mouse input code a bit. It no longer uses DirectInput but regular Mouse Events. This has the added advantage of that I have the mouse acceleration that Windows provides for me(Before, the Windows mouse would move faster than the in-game mouse. That's now fixed.). Also, the Windows mouse cursor is now hidden. I have no idea what kept me from doing Cursor.Hide() in the first place...&lt;br /&gt;&lt;br /&gt;Tomorrow and monday it is easter(Yes, we have 2 easter days), so I doubt I'll manage to do any work on the gooey system. But, I'm currently writing the mouse-event cascading system. Meaning: When the mouse is over a certain window, this window will check for any updates(movement, etc.) and trigger the events, and then see if any of it's children need to know about the mouse update. I started out with this code to be in the WindowManager, but that ended up being a horrible mess. So I now leave this to the base Control class.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/25717179-1959718185735427287?l=dune-ii.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dune-ii.blogspot.com/feeds/1959718185735427287/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=25717179&amp;postID=1959718185735427287' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/25717179/posts/default/1959718185735427287'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/25717179/posts/default/1959718185735427287'/><link rel='alternate' type='text/html' href='http://dune-ii.blogspot.com/2007/04/user-interfaces-are-go.html' title='User Interfaces are GO!'/><author><name>Toolmaker</name><uri>http://www.blogger.com/profile/15938868073830687692</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://bp2.blogger.com/_rHpdClQ34VY/RhgfldGz4pI/AAAAAAAAABU/bQTMTBOC4b0/s72-c/ui.png' height='72' width='72'/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-25717179.post-4827231010382587651</id><published>2007-04-05T06:35:00.000-07:00</published><updated>2007-04-05T06:57:53.521-07:00</updated><title type='text'>IT'S A TRAP!</title><content type='html'>I finished coding up the windtraps.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp0.blogger.com/_rHpdClQ34VY/RhT9h9Gz4oI/AAAAAAAAABM/t7GOB7Ubf7Q/s1600-h/windtrap.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://bp0.blogger.com/_rHpdClQ34VY/RhT9h9Gz4oI/AAAAAAAAABM/t7GOB7Ubf7Q/s320/windtrap.png" alt="" id="BLOGGER_PHOTO_ID_5049939841969808002" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;The technique behind this is pretty easy. What I do is create a static texture for all windtraps in white. During rendering, I first render the white texture with an overlay color, and on top of that, I render the normal windtrap texture. And in the Update() function of the windtrap, I have a timer to increase/decrease the color every 1/10th of a second. Simple, and effective.&lt;br /&gt;&lt;br /&gt;I will probably add this texture to the SpriteSheet, as it would reduce texture swapping. And texture swapping is bad, m'kay?&lt;br /&gt;&lt;br /&gt;I also added a link to the development blog of an online friend of mine. He's developing a 3D engine and a bunch of games with it. Except it takes him a decade to produce it all. Yes, I'm serious. A decade.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/25717179-4827231010382587651?l=dune-ii.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dune-ii.blogspot.com/feeds/4827231010382587651/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=25717179&amp;postID=4827231010382587651' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/25717179/posts/default/4827231010382587651'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/25717179/posts/default/4827231010382587651'/><link rel='alternate' type='text/html' href='http://dune-ii.blogspot.com/2007/04/its-trap.html' title='IT&apos;S A TRAP!'/><author><name>Toolmaker</name><uri>http://www.blogger.com/profile/15938868073830687692</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://bp0.blogger.com/_rHpdClQ34VY/RhT9h9Gz4oI/AAAAAAAAABM/t7GOB7Ubf7Q/s72-c/windtrap.png' height='72' width='72'/><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-25717179.post-7047230005183356870</id><published>2007-04-03T17:52:00.000-07:00</published><updated>2007-04-04T03:56:15.533-07:00</updated><title type='text'>Building basics are done</title><content type='html'>I got the basics of the buildings in! And by basics I mean the image files, the classes(Each building has it's own class, as oppossed to units which mostly consists of 1 class and a few derived for special units).&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp1.blogger.com/_rHpdClQ34VY/RhL7CGIxXJI/AAAAAAAAAA8/nhQ6WsFHcas/s1600-h/deployed.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://bp1.blogger.com/_rHpdClQ34VY/RhL7CGIxXJI/AAAAAAAAAA8/nhQ6WsFHcas/s320/deployed.png" alt="" id="BLOGGER_PHOTO_ID_5049374145661459602" border="0" /&gt;&lt;/a&gt;&lt;span style="font-size:85%;"&gt;Buildings in action&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;The reasons are simple: Most buildings have a bunch of animations which are non-standard(starport, refinery, radar), buildings also add 'things' to the game. For instance, building a light factory, enables you to construct new units. By spawning the building, it 'registers' itself with the game, exposing the features to the rest.&lt;br /&gt;&lt;br /&gt;All the buildings also play their 'pre-deployment' sequence. This is a different sprite(See below), which is displayed when the building is deployed. It then 'blinks' between the normal and the deploy image a few times with decreasing interval and finally shows up normally. Nothing fancy, nothing difficult to make. However, I must say, I'm getting a quite a lot of timers... Thank god timers don't have a 68MB memory footprint(A la the clock in Vista).&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp1.blogger.com/_rHpdClQ34VY/RhL7CGIxXKI/AAAAAAAAABE/u66YTshPcWU/s1600-h/predeploy.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://bp1.blogger.com/_rHpdClQ34VY/RhL7CGIxXKI/AAAAAAAAABE/u66YTshPcWU/s320/predeploy.png" alt="" id="BLOGGER_PHOTO_ID_5049374145661459618" border="0" /&gt;&lt;/a&gt;&lt;span style="font-size:85%;"&gt;Buildings before being fully deployement&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;I'm not sure how I'm going to proceed from now on. Probably the next thing to do is to get the powerplant operational, showing it's animation. &lt;span style="font-weight: bold;"&gt;EDIT:&lt;/span&gt; In before someone comments about it: Yes, the 3x3 and 3x2 buildings are off half a tile. This is because they render using their position, not by tile. since I used 64 as X position, it renders from 64 - (32 * 1.5) = 16. Would I use X - 80, they'd render normally.&lt;br /&gt;&lt;br /&gt;However, this probably does bring up the problem I had before: Images are alphablended into 1 fugly soup of weird colors. I really should spend some time testing out with the various D3DXSprite render modes to figure out how to only replace specific colors. If the power plant works, I'm going to make buildings selectable, including a selection marker.&lt;br /&gt;&lt;br /&gt;After that, I will probably start working on the UI parts. I'm not really looking forward to that, but after that, it will start piecing together.&lt;br /&gt;&lt;br /&gt;Stefan: On a sidenote to what you said about rotating the turret and moving: Good point. I'll fix that aswell.&lt;br /&gt;&lt;br /&gt;In other random news: I got a new archwire for my braces. I went for 012 to an 016. I know it means the thickness of the wire, but not really sure how. I'd assume it's 0.12cm, but not sure. Anyway, my teeth are sore now. But I know what I'm doing it for: sexy teef!&lt;br /&gt;&lt;br /&gt;And, changed the layout of the blog a bit. I upgraded to the new layouts, which allow me to expand the layout myself. I'm probably going to add a ToDo list to the left navigation bar. Should be hot.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/25717179-7047230005183356870?l=dune-ii.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dune-ii.blogspot.com/feeds/7047230005183356870/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=25717179&amp;postID=7047230005183356870' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/25717179/posts/default/7047230005183356870'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/25717179/posts/default/7047230005183356870'/><link rel='alternate' type='text/html' href='http://dune-ii.blogspot.com/2007/04/building-basics-are-done.html' title='Building basics are done'/><author><name>Toolmaker</name><uri>http://www.blogger.com/profile/15938868073830687692</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://bp1.blogger.com/_rHpdClQ34VY/RhL7CGIxXJI/AAAAAAAAAA8/nhQ6WsFHcas/s72-c/deployed.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-25717179.post-795547990747465107</id><published>2007-04-02T13:32:00.000-07:00</published><updated>2007-04-02T13:43:15.239-07:00</updated><title type='text'>Little weapon update!</title><content type='html'>I fixed a few things in the weapons. I made rockets leave smoke trails. It does look good, when you fire a single rocket. With 2 rockets, it looks a whole lot less pretty. Probably has to do with the fire rate of 0.5 and the trail spawning with the same rate. Here's how it looks:&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp2.blogger.com/_rHpdClQ34VY/RhFpamIxXHI/AAAAAAAAAAs/q2m4ZUk8mvQ/s1600-h/trails-done.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://bp2.blogger.com/_rHpdClQ34VY/RhFpamIxXHI/AAAAAAAAAAs/q2m4ZUk8mvQ/s320/trails-done.png" alt="" id="BLOGGER_PHOTO_ID_5048932562893888626" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;Looking  good. I did have a few bugs with it, which was good in the end, since I had a nasty little parse bug with the rules.ini. Apparantly, float.Parse() looks at the Locale settings for numbers, and on my Dutch settings, it excepts to see a ',' as decimal point, instead of a '.'. Therefor, it parsed my 0.5 to 5. I fixed that with with a NumberFormatInfo instance, setting the correct char and passing it to every float.Parse() call. Nothing serious.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp3.blogger.com/_rHpdClQ34VY/RhFpa2IxXII/AAAAAAAAAA0/agdkUEhixyA/s1600-h/trail-bug.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://bp3.blogger.com/_rHpdClQ34VY/RhFpa2IxXII/AAAAAAAAAA0/agdkUEhixyA/s320/trail-bug.png" alt="" id="BLOGGER_PHOTO_ID_5048932567188855938" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;Oh, this was a little timing info bug. I had the smoke trails randomly pick a number between 0.0 and 0.5 for releasing their puffs, but forgot to set it back to 0.5 after the initial puff(I wanted a gap of 0.5 between puffs, and a random first puff, so they're not all on the same spot).&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp1.blogger.com/_rHpdClQ34VY/RhFpaWIxXGI/AAAAAAAAAAk/ohT-WxxTKVM/s1600-h/trails.PNG"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://bp1.blogger.com/_rHpdClQ34VY/RhFpaWIxXGI/AAAAAAAAAAk/ohT-WxxTKVM/s320/trails.PNG" alt="" id="BLOGGER_PHOTO_ID_5048932558598921314" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;This is the final result, including a demonstration of the enemy quad being on firing(Including debug output. I should remove these, otherwise I end up with a cluttered debug log, which I don't really want.&lt;br /&gt;&lt;br /&gt;Now I'm going to add Buildings to the game, and after that, the User Interface :D.&lt;br /&gt;&lt;br /&gt;Speaking of which... I have basically a week off... Not something I'm very happy with, because I'm missing 5 exams now. But my stupid college requires that I sign in for every course I follow(I'm automatically enrolled to the course, but I have to enroll for the exams). Since I forgot to enroll myself for the exams, I'm not allowed to make them. Kinda weird. You're enrolled for the course, but not for the exam by default. I'm pretty pissed off...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/25717179-795547990747465107?l=dune-ii.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dune-ii.blogspot.com/feeds/795547990747465107/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=25717179&amp;postID=795547990747465107' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/25717179/posts/default/795547990747465107'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/25717179/posts/default/795547990747465107'/><link rel='alternate' type='text/html' href='http://dune-ii.blogspot.com/2007/04/little-weapon-update.html' title='Little weapon update!'/><author><name>Toolmaker</name><uri>http://www.blogger.com/profile/15938868073830687692</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://bp2.blogger.com/_rHpdClQ34VY/RhFpamIxXHI/AAAAAAAAAAs/q2m4ZUk8mvQ/s72-c/trails-done.png' height='72' width='72'/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-25717179.post-713343408208987836</id><published>2007-03-31T15:57:00.000-07:00</published><updated>2007-03-31T16:34:39.371-07:00</updated><title type='text'>Weapons are done!</title><content type='html'>I finished off the weapons. Well, most parts. There are a few minor things that I need to change. But most of the work is completed.&lt;br /&gt;&lt;br /&gt;First of all: I changed how units keep track of their internal state. Initially, I had a unitState attribute in each unit class. Which worked reasonable, until I started adding attacking. I had to define several states, such as AttackGroundRotate, AttackGroundMove, AttackRotate, AttackMove, AttackGround and Attack. Yes, that's overkill...&lt;br /&gt;&lt;br /&gt;What I did was implement the unit states as a stack. I then cut down the states to their basics: Move, Rotate, RotateTurret, Attack and AttackGround(There are a few more, but I'll safe you the hassle for those). When a unit is sitting idle, it's state contains just 1 state: Guarding. When moving the unit, it's a matter of pushing a bunch of states onto the stack and the unit manages after that. For moving, I just push Move and Rotate onto the stack. In the rotate state, it will determine the desired angle, rotate to it and pop the state. The next time the unit updates, it starts moving.&lt;br /&gt;&lt;br /&gt;I also did the same with the gun, except I did make a different state for it, since some units have a seperate turret sprite. This will rotate the unit normally for units without a turret, and rotate the actual turret for those units who have one.&lt;br /&gt;&lt;br /&gt;With the stack I also implement a CancelOrders function, which allows you to cancel whatever your unit is doing. However, it has a tiny bug(which I noticed after comitting my code, so I'll fix that after publishing this post): When moving, it stops the unit directly. The unit doesn't stop in the middle of a tile as it should.&lt;br /&gt;&lt;br /&gt;The code for checking distance to the target, determining if the weapon is ready, etc. is very exciting to tell about. Only exciting thing I can think of is are the images below.&lt;br /&gt;&lt;br /&gt;Only things left to do with weapons: Have the ornithopter fly attack patterns(Since it can't hover), have rockets leave smoke trails(Not in the original Dune 2 I believe) and have units spray smoke when their HP is below 50%.&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: center;"&gt;As for now: Images!&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp3.blogger.com/_rHpdClQ34VY/Rg7ummIxXEI/AAAAAAAAAAU/nakcF2TI6Mk/s1600-h/attack.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://bp3.blogger.com/_rHpdClQ34VY/Rg7ummIxXEI/AAAAAAAAAAU/nakcF2TI6Mk/s320/attack.png" alt="" id="BLOGGER_PHOTO_ID_5048234579168681026" border="0" /&gt;&lt;/a&gt;&lt;span style="font-size:85%;"&gt;Medium Tank is being ordered to attack. Ornithopter is there for no reason&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp0.blogger.com/_rHpdClQ34VY/Rg7um2IxXFI/AAAAAAAAAAc/6yvFuohxRNI/s1600-h/attack2.PNG"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://bp0.blogger.com/_rHpdClQ34VY/Rg7um2IxXFI/AAAAAAAAAAc/6yvFuohxRNI/s320/attack2.PNG" alt="" id="BLOGGER_PHOTO_ID_5048234583463648338" border="0" /&gt;&lt;/a&gt;&lt;span style="font-size:85%;"&gt;Medium Tank just fired it's weapon at the quad, which is doing nothing...&lt;/span&gt;&lt;br /&gt;&lt;div style="text-align: left;"&gt;&lt;br /&gt;For those who are wondering why there isn't a healthbar showing in the first pic: I removed them, since I need to redo how healthbars work. The old way sucked donkey balls. Also, there is no image of the quad exploding, since I tried 4 times and still couldn't get to show the explosion.&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/25717179-713343408208987836?l=dune-ii.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dune-ii.blogspot.com/feeds/713343408208987836/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=25717179&amp;postID=713343408208987836' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/25717179/posts/default/713343408208987836'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/25717179/posts/default/713343408208987836'/><link rel='alternate' type='text/html' href='http://dune-ii.blogspot.com/2007/03/weapons-are-done.html' title='Weapons are done!'/><author><name>Toolmaker</name><uri>http://www.blogger.com/profile/15938868073830687692</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://bp3.blogger.com/_rHpdClQ34VY/Rg7ummIxXEI/AAAAAAAAAAU/nakcF2TI6Mk/s72-c/attack.png' height='72' width='72'/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-25717179.post-3058162255170080440</id><published>2007-03-28T15:38:00.000-07:00</published><updated>2007-03-28T15:48:51.889-07:00</updated><title type='text'>Weapons are nearing completion</title><content type='html'>So, I got most of the weaponry in. I got a Weapon class to fire projectiles(Perhaps I have to add some more classes, such as a BulletWeapon and MissileWeapon, but not right now). The projectiles are in aswell, and this includes bullets and missiles(Which happen to be the only projectiles in the game). Also, the death hand missile is in, including 3x3 explosions.&lt;br /&gt;&lt;br /&gt;I took a different way for missile weapons that the original. In the original there were 16 images of the missiles, where each image was rotated 22.5 degrees. Since the original had to run on 8 to 16 Mhz machines, rotating the images in real-time was probably impossible, so they just had a bunch of pre-made images. In assume they used a Cos/Sin lookup table during the game to calculate the trajectory of the missiles, since Cos/Sin calls are pretty expensive.&lt;br /&gt;&lt;br /&gt;However, I wanted to save myself the hassle of having to calculate which of the images I had to use, so I cut up the images, took the 0 degree image, enlarged it and use that myself.&lt;br /&gt;&lt;br /&gt;I did run into some serious trouble with the rotation tho. At first, I couldn't figure out how to rotate the 2D image without upsetting the entire world view. Turns out I forgot to restore the original Transform. Oops. And, I didn't quite understand that I needed to take the negative value of atan2() when the adjacent side of the triangle is below 0. Took me all day long to debug. But it works now.&lt;br /&gt;&lt;br /&gt;As promised: The image. It shows randomly launched Death Hand missiles flying to their destination and explode. Oh, and a lone tank which I used to test the bullet and missile weapons on.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp1.blogger.com/_rHpdClQ34VY/RgrwNGIxXDI/AAAAAAAAAAM/FTl3a1Xj-5A/s1600-h/wmd.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://bp1.blogger.com/_rHpdClQ34VY/RgrwNGIxXDI/AAAAAAAAAAM/FTl3a1Xj-5A/s320/wmd.png" alt="" id="BLOGGER_PHOTO_ID_5047110440198429746" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;The next step is for weapons to have some intelligence: They have to determine if their target is in range, and if not, don't fire. After that, I can actually implement inflicting some damage based on armor stats. If that's all working, I can do some testing, and implement unit squashing. Oh, and corpses.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/25717179-3058162255170080440?l=dune-ii.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dune-ii.blogspot.com/feeds/3058162255170080440/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=25717179&amp;postID=3058162255170080440' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/25717179/posts/default/3058162255170080440'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/25717179/posts/default/3058162255170080440'/><link rel='alternate' type='text/html' href='http://dune-ii.blogspot.com/2007/03/weapons-are-nearing-completion.html' title='Weapons are nearing completion'/><author><name>Toolmaker</name><uri>http://www.blogger.com/profile/15938868073830687692</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://bp1.blogger.com/_rHpdClQ34VY/RgrwNGIxXDI/AAAAAAAAAAM/FTl3a1Xj-5A/s72-c/wmd.png' height='72' width='72'/><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-25717179.post-8195658058143342965</id><published>2007-03-26T01:46:00.000-07:00</published><updated>2007-03-26T01:58:36.993-07:00</updated><title type='text'>Rotation works... Finally...</title><content type='html'>Ok, so I finally managed to fix all the weird shit concerning rotation and movement. The large break from coding really helped on that.&lt;br /&gt;&lt;br /&gt;Basically,  what I did was this: I ditched all my previous movement and rotation code. I then re-build everything up from the ground using sheer logic. It was actually pretty easy.&lt;br /&gt;&lt;br /&gt;I did make the same mistake I made the first time with my movement code. I rounded the location X and Y to an integer value(they're stored as floats). So, when a unit would move to x.86, it would round to x + 1, which obviously is somewhat correct. However, if I would start moving from this location, the angle wouldn't be correct anymore, and the unit would just move over a bunch of  tiles it wasn't suppose to be on. I noticed this when I would start printing out the x,y locations after movement. Easily fixed.&lt;br /&gt;&lt;br /&gt;After that, my rotation code was simple. The old code was overly complicated, while my current code(Including determination of which direction to turn in) is something like 20 lines.&lt;br /&gt;&lt;br /&gt;Now I only need to re-work this code so that it also works for the turret, and the problem is solved. Then turretted buildings/units can share the same code.&lt;br /&gt;&lt;br /&gt;So, later today I'll start adding weapons. I think I'll start out with the medium tank, since it's the coolest tank of all(coolest graphics, I have no idea why).&lt;br /&gt;&lt;br /&gt;No images for now, perhaps after I got some weapons in.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/25717179-8195658058143342965?l=dune-ii.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dune-ii.blogspot.com/feeds/8195658058143342965/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=25717179&amp;postID=8195658058143342965' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/25717179/posts/default/8195658058143342965'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/25717179/posts/default/8195658058143342965'/><link rel='alternate' type='text/html' href='http://dune-ii.blogspot.com/2007/03/rotation-works-finally.html' title='Rotation works... Finally...'/><author><name>Toolmaker</name><uri>http://www.blogger.com/profile/15938868073830687692</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-25717179.post-5640865361514454938</id><published>2007-03-23T17:56:00.000-07:00</published><updated>2007-03-23T18:03:40.851-07:00</updated><title type='text'>Dual-Core ready!</title><content type='html'>I did some coding in the past days when riding the train. However, when I moved my code from my desktop to my laptop(which has an AMD x2 in it), I noticed movement had crawled to a slow.&lt;br /&gt;&lt;br /&gt;I tried to fix the problems with setting ProcessAffinity, ThreadAffinity and whatnot, which all failed horribly. Eventually Mithrandir pointed out that DateTime.Now has a Ticks property, which holds the number of 100 nanosecond thinks since 1 jan 0001. I re-write my FpsCounter class to use that, and since then, it worked like a charm again.&lt;br /&gt;&lt;br /&gt;So, if I recall correct, I was working on the unit rotation code, so I'm back to checking out the status of it, and probably re-write it completely. I remember it was flaky last time I was working on it. After that, I'll add some weapons.&lt;br /&gt;&lt;br /&gt;On other news: These Tower-Defense games are all hawt all the sudden. Perhaps I'll write a little one myself using the current dune 2 remake engine. Shouldn't take too long once the building construction stuff is in.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/25717179-5640865361514454938?l=dune-ii.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dune-ii.blogspot.com/feeds/5640865361514454938/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=25717179&amp;postID=5640865361514454938' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/25717179/posts/default/5640865361514454938'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/25717179/posts/default/5640865361514454938'/><link rel='alternate' type='text/html' href='http://dune-ii.blogspot.com/2007/03/dual-core-ready.html' title='Dual-Core ready!'/><author><name>Toolmaker</name><uri>http://www.blogger.com/profile/15938868073830687692</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-25717179.post-5416609483061195</id><published>2007-03-21T03:15:00.000-07:00</published><updated>2007-03-21T03:23:22.289-07:00</updated><title type='text'>Update!</title><content type='html'>I read some comments from people who wanted an update on the game and/or progress. So I figured, I'll do that now.&lt;br /&gt;&lt;br /&gt;First on the game: I did some minor work on the game since the last update, but nothing major. The reason: I'm busy as hell with my own business and school. Especially school has the highest priority over anything else. Should be obvious why.&lt;br /&gt;&lt;br /&gt;I intend to get the latest DirectX SDK on my laptop(Which I bought last december) and start doing some development for the game again. I need to fix the unit rotation a bit, since it's fucked up(The units sometime appear to wiggle, moving a pixel up and down while moving. Seems a bit odd, so I need to find out why.&lt;br /&gt;&lt;br /&gt;After that, I intend to add weapons. Explosions are already in, so adding in the weaponry shouldn't be too much of a problem.&lt;br /&gt;&lt;br /&gt;I want to spend some time today on coding, since I don't have an awful lot of to do(Except unpacking boxes. I moved again ;_;).&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/25717179-5416609483061195?l=dune-ii.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dune-ii.blogspot.com/feeds/5416609483061195/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=25717179&amp;postID=5416609483061195' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/25717179/posts/default/5416609483061195'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/25717179/posts/default/5416609483061195'/><link rel='alternate' type='text/html' href='http://dune-ii.blogspot.com/2007/03/update.html' title='Update!'/><author><name>Toolmaker</name><uri>http://www.blogger.com/profile/15938868073830687692</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-25717179.post-2324851077564689905</id><published>2006-11-11T16:56:00.000-08:00</published><updated>2006-11-11T17:09:31.539-08:00</updated><title type='text'>omg, LARGE!</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/blogger2/2491/3139/1600/dune_32.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://photos1.blogger.com/blogger2/2491/3139/320/dune_32.png" alt="" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;As you can see, the conversion to 32x32 tiles is completed for the existing build. The are a few issues with the enlarged tiles, which probably already were in the previous builds, but never showed up due to the small size of all the objects:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Sometimes, when 2 units overlap each other partially, you'll see a strange alpha overlay. Not sure how to fix this, but I'm looking for a solution&lt;/li&gt;&lt;li&gt;Some of the images didn't get through the enlargement process very good. For instance, the Ornithopter looks VERY good, while most of the infantry units are broken. They need to be fixed, but the problem with that is that I need someone good at pixel art to do that. And to be honest, I suck at pixel art.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;I decided to go with the standard D3DXSprite as it is. I currently load each image, replace the colors in the image, and then write the image to a texture. The biggest downside of this all is that it takes a lot longer to load all the data. I need to fix this.&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;Currently, this is my to-do for now(Chronological order):&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Re-write movement code&lt;/li&gt;&lt;li&gt;Weapons in game&lt;/li&gt;&lt;li&gt;Weaponry to rules.ini&lt;/li&gt;&lt;li&gt;Handling of device lost&lt;/li&gt;&lt;li&gt;UI components&lt;/li&gt;&lt;/ul&gt;First thing for now to do is to re-write my movement code. It's not very well written, and it has issues with movement, as it almost always reserves tiles the unit shouldn't be moving over while moving diagonally. This mean that it usually just uses the tiles left/right to the current tile for 2 or 3 pixels, and then continues onto it's target tile. Result: If that tile was in use, the unit occupying it is removed. It renders itself, but it' no longer selectable/attackable/whatever.&lt;br /&gt;&lt;br /&gt;After that, I'll add weapons and combat in. Lots of work to do.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/25717179-2324851077564689905?l=dune-ii.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dune-ii.blogspot.com/feeds/2324851077564689905/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=25717179&amp;postID=2324851077564689905' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/25717179/posts/default/2324851077564689905'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/25717179/posts/default/2324851077564689905'/><link rel='alternate' type='text/html' href='http://dune-ii.blogspot.com/2006/11/omg-large.html' title='omg, LARGE!'/><author><name>Toolmaker</name><uri>http://www.blogger.com/profile/15938868073830687692</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-25717179.post-116310938815666386</id><published>2006-11-09T13:11:00.000-08:00</published><updated>2006-11-11T16:49:50.380-08:00</updated><title type='text'>About Spritesheets, explosions, infantry and enlargement...</title><content type='html'>First of all, I have done quite some work in the past few days. I needed something to do, because I was low on workload. I decided to start coding again, and before I knew it, I was on a coding spree.&lt;br /&gt;&lt;br /&gt;I finished the spritesheets, which had quite a few issues in the first attempt. Eventually I narrowed it down to being the code that was responsible for finding the proper location inside the sheet. I re-wrote it in a more manageable manner, and it worked. This is the result(The blue is used for debugging purposes, and will remain blue. This will automatically show the programmer what's going wrong.):&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/blogger/2754/2691/1600/spritesheet.0.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://photos1.blogger.com/blogger/2754/2691/320/spritesheet.0.png" alt="" border="0" /&gt;&lt;/a&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-size:78%;"&gt;Spritesheet in action, showing 1 subsheet&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;After I finished the spritesheet system, I decided I needed to do some front-end work, because I was bored with doing things without results shown in game. So, I ended up working on explosions. Yes, you read it correct: &lt;span style="font-style: italic;"&gt;&lt;span style="font-weight: bold;"&gt;Explosions&lt;/span&gt;&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;The system is quite simple: There's an Explosion class which houses the necessary functionality to run through the explosion sheets, do the timing and rendering. It's a GameObject, so you just shove it in the SceneManager and forget about it. When it's done, it informs the SM that it would like to be moved into the trash can for recycling. From the Explosion class, I derive a subset of explosion types: LightUnitExplosion, HeavyUnitExplosion, and the most interesting one: ExplodingBuilding.&lt;br /&gt;&lt;br /&gt;Light/HeavyUnitExplosion refer to the number of steps and the used images. An exploding Light Unit(Quad/Trike) has 2 explosion steps, while a heavy unit has 5 steps. And there's only 1 image for an exploding light unit, and several for an exploding heavy unit. It picks the explosion in the constructor and then runs it. Now the interesting part:&lt;br /&gt;&lt;br /&gt;The ExplodingBuilding was more tricky, because it needs to be dynamic in size, and look 'realistic'(As realistic as you can get with graphics from 1990, you get the idea). So, I started out by creating a BuildingExplosion class, which handles the explosion of 1 single building tile. It picks a random explosion from the list of explosion sprites for buildings and does it's thing. However, creating an M x N explosion in this way would look strange. All the explosions would start/end at the same time, and that would just look fake.&lt;br /&gt;&lt;br /&gt;So, in the ExplodingBuilding, I build a list of each section(Say, 3x2, a refinery), place a random delay on it between 0.0 and 0.5 seconds and put an timer on it. When the timer expires, I stop it, spawn a random explosion at the section coordinates and start it. After all the delay timers are expired, the ExplodingBuilding removes itself from the SM. The BuildingExplosions then expire at some point and are removed aswell. The result(Including some failures):&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/blogger/2754/2691/1600/random_explosions.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://photos1.blogger.com/blogger/2754/2691/320/random_explosions.png" alt="" border="0" /&gt;&lt;/a&gt;As you can see, random explosions for heavy units. The selection rectangle shows up because of the rigged mouse. More on that below.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/blogger/2754/2691/1600/inf_explosions.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://photos1.blogger.com/blogger/2754/2691/320/inf_explosions.png" alt="" border="0" /&gt;&lt;/a&gt;In the above image, I rigged the mouse to create random 4x4 ExplodingBuilding objects when clicked. I hacked it in, so when you'd drag the mouse, the selection rectangle wouldn't go away. Anyway, in this image the explosions REFUSED to go away, they kept going on forever. Turns out: Never ever use a .NET struct in a list. It will not retain variables you change.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/blogger/2754/2691/1600/huge_explosion.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://photos1.blogger.com/blogger/2754/2691/320/huge_explosion.png" alt="" border="0" /&gt;&lt;/a&gt;And the last screenie demonstrating the delay system: A huge 20x20 explosion to see it in action. In the bottom you see the FPS rate from FRAPS. Also, the shown revision is incorrect, it should be 14. There's a problem with my PostBuild step, so the revision number doesn't update.&lt;br /&gt;&lt;br /&gt;After this I was on a spree and added Infantry units. Infantry units ARE a bit different than other units, since they have only 4 directions, and have moving legs. Most other units are reasonably static, except the carry-all which has 2 states(Tanks with turrets are 2 sprites, so they're still static). At first, I decided to go with the standard Unit class, which didn't cut it due to the movement and the Direction property. However, I discovered you cannot overload the C# Properties, so overloading this in the Infantry class doesn't work(Would have saved me the hassle of going through the pain of using a bigger texture and some work).&lt;br /&gt;&lt;br /&gt;However, I noticed that Stefan had a 2nd sheet of infantry/trooper sprites. 8 directions, just repeated for the wind directions. So I used that and just had to overload the Update function in the Infantry class. 43 lines of code and an hour of work.&lt;br /&gt;&lt;br /&gt;However, I discovered that the infantry was rather, erm, small. And with small, I mean, near invisible. They're 8x6 or something, so you have to look REALLY hard to see them. And Ravuya said the exact same thing:&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/blogger/2754/2691/1600/infantry.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://photos1.blogger.com/blogger/2754/2691/320/infantry.png" alt="" border="0" /&gt;&lt;/a&gt;He then continued to link to me HQ2X. An application to enlarge images and still look smooth. Have a look at the examples, it looks really good. So I experimented a bit with that. The results are astounding:&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/blogger/2754/2691/1600/quad2x.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://photos1.blogger.com/blogger/2754/2691/320/quad2x.jpg" alt="" border="0" /&gt;&lt;/a&gt;That's a Quad enlarged 2x. Looks very smooth. Only problem with HQ2X is that it can't work with palletized bitmaps, and converts them to 24-bit images, which is a problem.&lt;br /&gt;&lt;br /&gt;I intend to let HQ2X loose on ALL the images for the game, and enlarge the entire game to 32x32 tiles instead of 16x16. However, I need a way to change the colors during runtime. I've been suggested to write my own Sprite replacement, which is what I did. It works, but only for single textures. I intend to add support for multi-texturing and use the Fixed Function pipeline to do some color changing for me. I'm still working on that, so I'm not sure how long it's going to take.&lt;br /&gt;&lt;br /&gt;Until it works, I'm going to use the original images for everything and alternate it with doing some real work. Before I want to make the pass to enlarge everything, I want to have at least ALL the units in. This means I have to add the ornithopter, the frigate and the sandworm(Those are the ones still not done). Not a lot of work, but I need to make some changes in the code, and move all the aircraft specific code into a separate class to make full use of it.&lt;br /&gt;&lt;br /&gt;That's the end of my long story for now.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/25717179-116310938815666386?l=dune-ii.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dune-ii.blogspot.com/feeds/116310938815666386/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=25717179&amp;postID=116310938815666386' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/25717179/posts/default/116310938815666386'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/25717179/posts/default/116310938815666386'/><link rel='alternate' type='text/html' href='http://dune-ii.blogspot.com/2006/11/about-spritesheets-explosions-infantry.html' title='About Spritesheets, explosions, infantry and enlargement...'/><author><name>Toolmaker</name><uri>http://www.blogger.com/profile/15938868073830687692</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-25717179.post-116187365272105439</id><published>2006-10-26T07:15:00.000-07:00</published><updated>2006-11-11T16:49:50.175-08:00</updated><title type='text'>Spritesheets partially working...</title><content type='html'>I've done quite some work on the spritesheets(Which took me ~3 to 4 hours, where I could have done it in 1, IF I wouldn't be distracted all the time).&lt;br /&gt;&lt;br /&gt;The individual subsheets work, in the sense of: You can add new textures to it, it finds a suitable location(If any), reserve it, and then copy it actual bytes onto the main texture.&lt;br /&gt;&lt;br /&gt;Right now, I need to work on the main sheet, which should create a large texture depending on the total video ram(The less ram, the smaller the texture), and I'll add a constructor where you can specify the sizes of the sheet. Then I need to add in code to automatically create new subsheets(If there is any space left on the larger sheet of course) when there are no more free blocks in any subsheet, or when an image is bigger than any cell size currently allocated.&lt;br /&gt;&lt;br /&gt;I'm not sure what to do &lt;span style="font-weight: bold;"&gt;IF&lt;/span&gt; there isn't any space left for new subsheets and it requires a cellsize not yet allocated. I technically could search all the subsheets for the largest used block size, attempt to put it in there, and if not, find the next largest cell size, etc. If none of the subsheets can house the texture, an exception should be thrown, and the TextureManager should either attempt to spawn another SpriteSheet or give up.&lt;br /&gt;&lt;br /&gt;I'm currently using the default size of 256x256 subsheets, so it's highly inadviseable to use a sprite that's any larger than that. Ofcourse, it'd be a weird sprite if it's that big. For animated sprites, you just as well cut them up in smaller ones and load those.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/25717179-116187365272105439?l=dune-ii.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dune-ii.blogspot.com/feeds/116187365272105439/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=25717179&amp;postID=116187365272105439' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/25717179/posts/default/116187365272105439'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/25717179/posts/default/116187365272105439'/><link rel='alternate' type='text/html' href='http://dune-ii.blogspot.com/2006/10/spritesheets-partially-working.html' title='Spritesheets partially working...'/><author><name>Toolmaker</name><uri>http://www.blogger.com/profile/15938868073830687692</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-25717179.post-116163063637601298</id><published>2006-10-23T12:09:00.000-07:00</published><updated>2006-11-11T16:49:49.927-08:00</updated><title type='text'>Work in progress</title><content type='html'>I'm back on working on the game again. I'm currently working on the spritesheets.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/25717179-116163063637601298?l=dune-ii.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dune-ii.blogspot.com/feeds/116163063637601298/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=25717179&amp;postID=116163063637601298' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/25717179/posts/default/116163063637601298'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/25717179/posts/default/116163063637601298'/><link rel='alternate' type='text/html' href='http://dune-ii.blogspot.com/2006/10/work-in-progress.html' title='Work in progress'/><author><name>Toolmaker</name><uri>http://www.blogger.com/profile/15938868073830687692</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-25717179.post-116137325290222664</id><published>2006-10-20T12:39:00.000-07:00</published><updated>2006-11-11T16:49:49.682-08:00</updated><title type='text'>I'm not death!</title><content type='html'>A little update, I've been very busy for the past 1.5 month, and haven't done anything on the game itself.&lt;br /&gt;&lt;br /&gt;However, I want to spend a little time implementing a quad tree this weekend, and then get going where I left off: Implementing automatic spritesheets.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/25717179-116137325290222664?l=dune-ii.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dune-ii.blogspot.com/feeds/116137325290222664/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=25717179&amp;postID=116137325290222664' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/25717179/posts/default/116137325290222664'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/25717179/posts/default/116137325290222664'/><link rel='alternate' type='text/html' href='http://dune-ii.blogspot.com/2006/10/im-not-death.html' title='I&apos;m not death!'/><author><name>Toolmaker</name><uri>http://www.blogger.com/profile/15938868073830687692</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-25717179.post-115809017353995335</id><published>2006-09-12T12:39:00.000-07:00</published><updated>2006-11-11T16:49:49.483-08:00</updated><title type='text'>Aaah~~ Busyness!</title><content type='html'>I haven't done squat in the past  days, since I'm busy with all sorts of things:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Procrastinating&lt;/li&gt;&lt;li&gt;Visiting clients and earning money&lt;/li&gt;&lt;li&gt;School&lt;/li&gt;&lt;/ul&gt;As you can see, I have loads of other things to do. I regret I can't work on the game, but since it's a hobby project right now, and my own business/school is more important, I shifted my priority to those 2.&lt;br /&gt;&lt;br /&gt;Tomorrow I'm busy the entire day with work, visiting the orthodontist(Yes, I'm 23 and getting braces) and when I get home, finish some assignments for school.&lt;br /&gt;&lt;br /&gt;However, when I have time, I hope to start spending some time on implementing a sprite-sheet system, which loads individual bitmaps and slams them onto a larger sheet. Should be done by the weekend.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/25717179-115809017353995335?l=dune-ii.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dune-ii.blogspot.com/feeds/115809017353995335/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=25717179&amp;postID=115809017353995335' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/25717179/posts/default/115809017353995335'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/25717179/posts/default/115809017353995335'/><link rel='alternate' type='text/html' href='http://dune-ii.blogspot.com/2006/09/aaah-busyness.html' title='Aaah~~ Busyness!'/><author><name>Toolmaker</name><uri>http://www.blogger.com/profile/15938868073830687692</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-25717179.post-115765760148530598</id><published>2006-09-07T12:19:00.000-07:00</published><updated>2006-11-11T16:49:49.325-08:00</updated><title type='text'>ATTACK!</title><content type='html'>Well, not completely, but here it is:&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/blogger/2754/2691/1600/attack.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://photos1.blogger.com/blogger/2754/2691/320/attack.png" alt="" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;As you can see, there are 2 sides on the screen, and I'm the blue one. The units are assigned to a Player, and during the mouse-over / click events, I check what's under the mouse, and perform an attack.&lt;br /&gt;&lt;br /&gt;Right now, I'm thinking about how to store the increasing number of sprites and prevent it from causing an enormous slowdown. With the explosions and ammunition, I add at least ANOTHER 23 bitmaps, add that to the 22 bitmaps I already have, and you get the idea(Since my game isn't done yet). After that, I can make the actual bullets fly and do some damage to units. Once units reach &lt; 1 HP, I remove them, add an explosion and VOILA! Instant action.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/25717179-115765760148530598?l=dune-ii.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dune-ii.blogspot.com/feeds/115765760148530598/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=25717179&amp;postID=115765760148530598' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/25717179/posts/default/115765760148530598'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/25717179/posts/default/115765760148530598'/><link rel='alternate' type='text/html' href='http://dune-ii.blogspot.com/2006/09/attack.html' title='ATTACK!'/><author><name>Toolmaker</name><uri>http://www.blogger.com/profile/15938868073830687692</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-25717179.post-115749381131411556</id><published>2006-09-05T14:51:00.000-07:00</published><updated>2006-11-11T16:49:49.092-08:00</updated><title type='text'>College is starting again...</title><content type='html'>Today my classes officially started for my minor. I'm doing Small Business Skills, and while I only have 3 'contact hours' a week, I need to spend at least 30 to 40 hours a week working on my assignments and other stuff.&lt;br /&gt;&lt;br /&gt;They figured, these people are here for their own company or want to start one in the future, and therefore should work a lot for themselfs. And, half of the curriculum is done is student prepared classes, where ALL students need to provide a powerpoint presentation, and have a 1 out of 9 chance to stand in front of the class and present what they prepared. There is a 1 out of 9 chance, because there are 9 workgroups.&lt;br /&gt;&lt;br /&gt;In matters related to the game: I coughed up a new texture manager, which replaces the default manager, and provides functionality to store each bitmap in a different color. All the ORIGINAL images are in red, and this is what it looks like with a small change:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/blogger/2754/2691/1600/colors.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://photos1.blogger.com/blogger/2754/2691/320/colors.png" alt="" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;As you can see, it works superb. Also, Textures are stored using their ARGB value in the TextureManager, so that harvester.bmp results in harvester.bmp_ARGBVALUE, so that each color is generating a unique name. I choose for this, because that way, I didn't have to change too much in the workings of the TM.&lt;br /&gt;&lt;br /&gt;As for new features: I'm adding a base Player class, which will be used in the future to derive the actual players off, such as LocalPlayer, NetworkedPlayer, AIPlayer, etc. This way, updating will be very simple as networked players receive their changes, and put them to work at client side.&lt;br /&gt;&lt;br /&gt;I hope to get it working before the weekend, so I can demonstrate it with 2 players(A LocalPlayer and an AIPlayer) and start working on weaponry. But I'm not sure if I'm able to, since school might require me attention.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/25717179-115749381131411556?l=dune-ii.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dune-ii.blogspot.com/feeds/115749381131411556/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=25717179&amp;postID=115749381131411556' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/25717179/posts/default/115749381131411556'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/25717179/posts/default/115749381131411556'/><link rel='alternate' type='text/html' href='http://dune-ii.blogspot.com/2006/09/college-is-starting-again.html' title='College is starting again...'/><author><name>Toolmaker</name><uri>http://www.blogger.com/profile/15938868073830687692</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-25717179.post-115731534057411888</id><published>2006-09-03T13:07:00.000-07:00</published><updated>2006-11-11T16:49:48.864-08:00</updated><title type='text'>New input handler</title><content type='html'>So, in the past few days, I've been working my ass off to re-implement the entire input handling code, and seperated it out in a seperate class.&lt;br /&gt;&lt;br /&gt;This means I cut approx. 300 lines from the actual playstate class and placed this in a seperate class, making my code alot more easier to maintain, update and fix.&lt;br /&gt;&lt;br /&gt;Also, I added all functionality needed for the sides in the input manager(Attacking, unable to select, etc.), put it's all commented out as for now. But, I should more or less have this functionality working in a few weeks, as I want to start working on weapons, and for weapons to work, I need enemies.&lt;br /&gt;&lt;br /&gt;Tonight I finally fixed a bug in updating the colors in each image, so I can now create colors needed for different sides. First step in this is to add a PlayerController or something similar, which owns a set of units/buildings. Next step is to provide a custom made texture manager, which loads the different textures, but also takes a Color param, which is used to update the palette to the required color(This also adds the option of being able to play with 8 players without the problem of having to have 8 different textures for each player).&lt;br /&gt;&lt;br /&gt;After having controllers I enable the code in the input handler, and then work out weapons.&lt;br /&gt;&lt;br /&gt;In other news: I bought a Laser printer for 78 euros today(Well, ordered it), printed out a 40 page document which I need for my minor which starts tuesday(Small Business Skills) and I came home from my parents in law and was shocked at how much of a fucking mess our place is. I'm off emptying the dish washer now...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/25717179-115731534057411888?l=dune-ii.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dune-ii.blogspot.com/feeds/115731534057411888/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=25717179&amp;postID=115731534057411888' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/25717179/posts/default/115731534057411888'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/25717179/posts/default/115731534057411888'/><link rel='alternate' type='text/html' href='http://dune-ii.blogspot.com/2006/09/new-input-handler.html' title='New input handler'/><author><name>Toolmaker</name><uri>http://www.blogger.com/profile/15938868073830687692</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-25717179.post-115686330253069936</id><published>2006-08-29T07:42:00.000-07:00</published><updated>2006-11-11T16:49:48.678-08:00</updated><title type='text'>Carry-alls are completed.</title><content type='html'>Carry-alls are completely done now.&lt;br /&gt;&lt;br /&gt;Fixing up the code that moved the unit to the nearest tile was easy as cake. Didn't go much wrong there. After that I added a small SignalPickup() function, which took a reference to the carry-all which was fulfilling the request, so that the unit can cancel the request at all times without searching through all units.&lt;br /&gt;&lt;br /&gt;After that I finished the tiny bit of work that made the carry-all fly to it's end, drop the unit and continue it's path. The carry-all also nicely slows down before the pickup/drop off point, and then picks up/drops off the unit.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://upload.toolmaker.nl/Carry-all.avi"&gt;Here&lt;/a&gt; is a short in-game video, demonstrating a devastator on the move from 1 side to the other.&lt;br /&gt;&lt;br /&gt;Right now, there is 1 little bug related to the carry-all, and that's at the drop off. The unit appears to flash shortly on it's old position for some reason. I need to track that and fix it. After that, I'll fix 1 bug related to scrolling, and re-build the input handling code(In a seperate class).&lt;br /&gt;&lt;br /&gt;After that, I'm going to add in weapons.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/25717179-115686330253069936?l=dune-ii.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dune-ii.blogspot.com/feeds/115686330253069936/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=25717179&amp;postID=115686330253069936' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/25717179/posts/default/115686330253069936'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/25717179/posts/default/115686330253069936'/><link rel='alternate' type='text/html' href='http://dune-ii.blogspot.com/2006/08/carry-alls-are-completed.html' title='Carry-alls are completed.'/><author><name>Toolmaker</name><uri>http://www.blogger.com/profile/15938868073830687692</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-25717179.post-115679977195318601</id><published>2006-08-28T14:03:00.000-07:00</published><updated>2006-11-11T16:49:48.469-08:00</updated><title type='text'>Carry-alls nearly done...</title><content type='html'>Right now, carry-alls are almost done.&lt;br /&gt;&lt;br /&gt;I ran into a whole  bunch of problems when implementing the carry-alls. First of all, my math was rusty and I had to fix that up. After that, flying circles and flying towards the target was easy to work out.&lt;br /&gt;&lt;br /&gt;However, once above the unit, the carry-all seemed to rotate slightly, and then stall at a random direction. It took me quite some debugging efforts to find out that the carry-all was attempting to rotate towards the target and right after that attempted to rotate to face the same direction as the unit was. At some point, it ended up rotating one time Clockwise and another CounterClockwise, in the same frame. The fix was easy.&lt;br /&gt;&lt;br /&gt;Right now, I'm coding up the parts that signal the unit that it's request for a carry-all has been granted, meaning it needs to cut down it's path to the nearest node and wait there for the carry-all to arrive. The carry-all already picks the unit up, so it's a matter a adding a state to the Unit class, do some actual path remodelling.&lt;br /&gt;&lt;br /&gt;After that, I need a way to cancel the request in case the unit is destroyed or reached it's destination without the carry-all. The first would be a bit more difficult to handle, the latter is simple, since at that point, the request would still be in the queue. I will probably cancel the request if the unit is within 3 tiles distance from the target tile.&lt;br /&gt;&lt;br /&gt;I should probably be able to implement that all tomorrow. For today I'm done coding.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/25717179-115679977195318601?l=dune-ii.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dune-ii.blogspot.com/feeds/115679977195318601/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=25717179&amp;postID=115679977195318601' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/25717179/posts/default/115679977195318601'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/25717179/posts/default/115679977195318601'/><link rel='alternate' type='text/html' href='http://dune-ii.blogspot.com/2006/08/carry-alls-nearly-done.html' title='Carry-alls nearly done...'/><author><name>Toolmaker</name><uri>http://www.blogger.com/profile/15938868073830687692</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-25717179.post-115646032187098507</id><published>2006-08-24T15:35:00.000-07:00</published><updated>2006-11-11T16:49:48.281-08:00</updated><title type='text'>Carry-alls are a little bitty delayed :P (And some more RTS ideas)</title><content type='html'>Ok, I was supposed to add carry-alls in a little bit more than just having them fly around in circles... But, I forgot all the maths a bit, so I need to refresh that a bit before continueing.&lt;br /&gt;&lt;br /&gt;This is the problem: When the carry-all pilot is chilling in this cockpit flying circles, and a unit wants to be picked up, it places itself in the carry-all queue. All the idle carry-alls check the queue each update cycle, and when there's a unit in it, it will take the unit from the queue, fly it's circle into the correct angle, and then set course to the unit. However, I for some reason, couldn't get the correct angle out of the calculation. So, I'm going to spend some time on working out the maths for it. Probably a few sinuses and cosinuses.&lt;br /&gt;&lt;br /&gt;I hoped to work that out today, but I ended up helping a friend with her house. I helped her paint, and since I had to travel to my hometown by train, I spend 3 ~ 3.5 hours in the train total. So I'll do that tomorrow in the train.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;New RTS idea - Auto-repairing&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;I think most of us hate it in most RTSes, during an attack, quickly click on the repair icon and click like a maniac on all buildings to make sure they're in top condition. At least, I hate it.&lt;br /&gt;&lt;br /&gt;What I want, is another screen where you can set the auto-repair settings, ranging from "No auto-repair" to "Keep at maximum health". This also means it's easy to keep your buildings in top shape, so I might add a little bit of difficulty to it: You get the first 70% for free, and by doing upgrades, you can increase the percentage up to 100%.&lt;br /&gt;&lt;br /&gt;Also, I'm also considering to add a money cache, in which you can say: Keep at least XXX credits for repairs. When you set this to 200 credits, all construction halts at 200 credits, and the remainder of the money is used for building/unit repairs. This is extremely usefull in case your base is undersiege so you don't run out of credits.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Awaiting pickup icon&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;I've been playing Dune 2000 in the past 2 days(Man, it kills production), and in D2K units have a green arrow pointing upwards when they're awaiting carry-all pickup. I might add that aswell, since it's quite annoying to see a unit standing idle(for instance a harvester), you order to return to the refinery, and the pickup order is cancelled and re-issued.&lt;br /&gt;&lt;br /&gt;That's it for tonight. Right now: I'm going to spend 15 minutes on the math stuffness, and then I'm off to bed.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/25717179-115646032187098507?l=dune-ii.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dune-ii.blogspot.com/feeds/115646032187098507/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=25717179&amp;postID=115646032187098507' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/25717179/posts/default/115646032187098507'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/25717179/posts/default/115646032187098507'/><link rel='alternate' type='text/html' href='http://dune-ii.blogspot.com/2006/08/carry-alls-are-little-bitty-delayed-p.html' title='Carry-alls are a little bitty delayed :P (And some more RTS ideas)'/><author><name>Toolmaker</name><uri>http://www.blogger.com/profile/15938868073830687692</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-25717179.post-115619827069280025</id><published>2006-08-21T15:00:00.000-07:00</published><updated>2006-11-11T16:49:48.090-08:00</updated><title type='text'>Carry-alls are being added...</title><content type='html'>Whoa... That's 9 days of doing nothing related to coding. Bad bad me!&lt;br /&gt;&lt;br /&gt;Today I put myself to coding again, and I did a little bit of coding and some file managing.&lt;br /&gt;&lt;br /&gt;First of all, I fixed a little problem with the rendering, where units had a fixed position on the screen, and at some point, they would disappear because they moved outside the viewport. I changed the render related code so all units first calculate their on-screen position. During the rendering, I traverse all game objects, check if they're within the screen boundaries, and render them.&lt;br /&gt;&lt;br /&gt;However, I was just testing my newly added carry-all(Which is currently stationary on the screen), and noticed that when I scroll 3 or more tiles from the top, the unit healthbars and the harvester loadbar no longer show up, and when I scroll less than 3, they're displaced. That's something I'll have to look into tomorrow first, before adding more logic to the carry-all.&lt;br /&gt;&lt;br /&gt;Anyway, in 5 weeks we have to move &lt;span style="font-weight: bold;"&gt;again&lt;/span&gt;. *sigh*. Also, the new owner of the current building is coming to visit tomorrow, and from what I've heard till so far, it's a whiny little bitch. For instance, last saturday I got my dad's car, and drove it onto the terrain, but didn't close/lock the fence. I was loading our bed sheets since we were staying the night at my parents, and some car drives onto the terrain. I walk up to the car, polite ask who he is and what he's doing on the terrain. He responds he's the new owner, asks who I am, and I tell him I'm the squatting guard. After that, he leaves.&lt;br /&gt;&lt;br /&gt;This morning, I noticed I had a voicemail, listened to it, and he apparantly called the real-estate agent that the fences were open and that we were probably mis-managing the building. I was shocked, and more important, insulted.&lt;br /&gt;&lt;br /&gt;He's coming over to inspect the building tomorrow, so I'll get up early and do some additional vacuuming and mop the floor(which could use a good mop anyway).&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/25717179-115619827069280025?l=dune-ii.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dune-ii.blogspot.com/feeds/115619827069280025/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=25717179&amp;postID=115619827069280025' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/25717179/posts/default/115619827069280025'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/25717179/posts/default/115619827069280025'/><link rel='alternate' type='text/html' href='http://dune-ii.blogspot.com/2006/08/carry-alls-are-being-added.html' title='Carry-alls are being added...'/><author><name>Toolmaker</name><uri>http://www.blogger.com/profile/15938868073830687692</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-25717179.post-115542174651457672</id><published>2006-08-12T14:47:00.000-07:00</published><updated>2006-11-11T16:49:47.890-08:00</updated><title type='text'>Some interesting ideas...</title><content type='html'>I was recently thinking about what direction I want to go with this game. I want to put more S into this game than any previous Dune game ever.&lt;br /&gt;&lt;br /&gt;First of all, I want to get rid of the "build buildings, units, select units and attack". I want to get to: Build a base, build units, create attack groups, lay down (attack) orders, and initiate multiple attacks at the same time.&lt;br /&gt;&lt;br /&gt;First of all, the way Dune II played is going to be the same as in the original. However, I want to add some more functionality to it which allows players to focus more on strategic parts, such as attack patterns, defensive patterns and sneak attacks. Also, for future strategy games, I want to make the game act more realistic. More about that later in this entry.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Combat Interface&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;I want to accomplish this through a combat interface(CI). The CI allows players to compose attack groups(AGs) of units and give them buffered orders. These orders are stored in a general buffer shared by the attack groups, and aren't executed until ordered. Also, attack groups can be ordered to wait till for other attack groups.&lt;br /&gt;&lt;br /&gt;The orders can be seen as way points, supported by many strategy games but not used much. Instead of just moving, they can also mean attack, defend, distract, wait for AG signal. Signals are used by AGs to inform they're ready and waiting.&lt;br /&gt;&lt;br /&gt;So, in order to implement a classic pincher pattern, you need 2 AGs, each containing move orders to the left and right side of the base. When an AG reaches it's position through the way points, it's raises a signal and waits for a signal of the other group. When the other AG reaches it's position, it raises it's signal and waits for the signal for the first group. Since this group raised the signal before, it doesn't wait and immediatly initiates attack.&lt;br /&gt;&lt;br /&gt;This forces the other side to actually balance it's defenses well, and perhaps come up with a strategy to effectively counter the attack pattern.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Factory Refitting&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;This forces a player to re-think it's building strategy and perhaps construct several factories. For instance, take the &lt;span style="font-style: italic;"&gt;Heavy Factory&lt;/span&gt; from the game. It constructs &lt;span style="font-style: italic;"&gt;Harvesters&lt;/span&gt;, &lt;span style="font-style: italic;"&gt;Light tanks, Heavy tanks &lt;/span&gt;and &lt;span style="font-style: italic;"&gt;Rocket launchers&lt;/span&gt;. In most strategy games, you click on a bunch of icons, and wham, it starts building it.&lt;br /&gt;&lt;br /&gt;However, in a future game, I want to insert a &lt;span style="font-style: italic;"&gt;refitting period&lt;/span&gt; for each unit. Say you're constructing a MCV in your HF. Once done, you start building 2 heavy tanks, 5 light tanks and 7 heavy tanks. If you retain that order, and with refitting, the factory would be inoperable between for say 20 seconds between each unit switch, to refit it's construction facilities.&lt;br /&gt;&lt;br /&gt;Because of this, players could decide to build 3 HFs, which auto balance the construction as much as possible. Which also brings me to the next point:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Multiple unit constructions&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Most RTSes I've seen using the classic C&amp;C interface have 1 short coming: Even tho you built 8 factories, you're still building 1 unit. The construction time went down a bit per each factory, but you're still only constructing 1 unit at a time. Imagine the Germans and Russians construct 1 tank at a time with 4 factories each.&lt;br /&gt;&lt;br /&gt;I want to change this, also in my D2 implementation: If you have 2 factories, both are constructing units. I'm aware of the consequences of this: You need a massive amount of cash flow to keep them all running and the player with most factories wins because he can construct massive amounts of units.&lt;br /&gt;&lt;br /&gt;A good way to counter-act this is to make running factories consume more energy. Say an idle heavy factory comsumes 15 energy. A running factory then consumes 30 energy units. Therefor, if you want to hit a player that's building a lot of units hard, you attack his power supply, and knock out a few factories because of that.&lt;br /&gt;&lt;br /&gt;Yes, I said a few. I dislike the power management in most RTSes aswell.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Power Profiles&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Again, the C&amp;amp;C games act strange when it comes to power: When you consume too much power, all your energy dependant facilities lose power and grind to a halt. Again, I want to change this aswell. When you lose a wind trap, and you do not have enough power to keep your 4 factories running, 1 will stop construction to provide the others with enough power to work.&lt;br /&gt;&lt;br /&gt;In order to give the player several options on how a low power situation is handled, I want to introduce power profiles. Profiles where certain types of buildings get a higher priority than others. For instance, the "Defend Base" profile will first opt to turn off factories in order to keep the defenses online where the "Construction" profile will turn off the base defenses first.&lt;br /&gt;&lt;br /&gt;When a building loses power, it needs to restart after obtaining enough power, and is therefor knocked out for an additional 1 or 2 seconds. This forces players to think about their power profile, because when you're constructing with offline base defenses it gives you an advantage when you can quickly switch when you're attacked(Between the attack waves, you can switch profiles to quickly finish off 3 or 4 units without being defenseless at all).&lt;br /&gt;&lt;br /&gt;That's all for now. I really want to hear feedback on these ideas.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/25717179-115542174651457672?l=dune-ii.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dune-ii.blogspot.com/feeds/115542174651457672/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=25717179&amp;postID=115542174651457672' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/25717179/posts/default/115542174651457672'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/25717179/posts/default/115542174651457672'/><link rel='alternate' type='text/html' href='http://dune-ii.blogspot.com/2006/08/some-interesting-ideas.html' title='Some interesting ideas...'/><author><name>Toolmaker</name><uri>http://www.blogger.com/profile/15938868073830687692</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-25717179.post-115519581089558003</id><published>2006-08-10T00:34:00.000-07:00</published><updated>2006-11-11T16:49:47.663-08:00</updated><title type='text'>Just scrolling around...</title><content type='html'>Scrolling around the map now works, and it works quite good.&lt;br /&gt;&lt;br /&gt;Implementing it was fairly easy. Check if the mouse cursor is 16 pixels off the edge of the screen, and then check if the viewport  wasn't at it's minimum/maximum on that side. Then, do the actual scrolling based on the scrolling timer.&lt;br /&gt;&lt;br /&gt;The scrolling timer makes it possible to change the scrolling speed in some form of settings dialog. Also, if there is some actual scrolling done, the mouse cursor neatly changes into an arrow and all other actions are ignored(Such as selecting/attacking).&lt;br /&gt;&lt;br /&gt;And I made the console react to the tilde key to hide/show it. Now I really need to start working on the render layers, because my units are all messed up now with rendering.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/25717179-115519581089558003?l=dune-ii.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dune-ii.blogspot.com/feeds/115519581089558003/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=25717179&amp;postID=115519581089558003' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/25717179/posts/default/115519581089558003'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/25717179/posts/default/115519581089558003'/><link rel='alternate' type='text/html' href='http://dune-ii.blogspot.com/2006/08/just-scrolling-around.html' title='Just scrolling around...'/><author><name>Toolmaker</name><uri>http://www.blogger.com/profile/15938868073830687692</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-25717179.post-115492695453325485</id><published>2006-08-06T21:51:00.000-07:00</published><updated>2006-11-11T16:49:47.492-08:00</updated><title type='text'>Harvesters nearly done</title><content type='html'>I finally implemented harvesting! It's not fully done yet, as the harvester keeps on harvesting  when it's full, and it doesn't accurately search for new spice when it's done with the current tile, but those are improvements I'm going to make over the course of the coming days.&lt;br /&gt;&lt;div style="text-align: center;"&gt; &lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/blogger/2754/2691/1600/harvester3.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://photos1.blogger.com/blogger/2754/2691/320/harvester3.png" alt="" border="0" /&gt;&lt;/a&gt;&lt;span style="font-size:78%;"&gt;Harvester enroute to the spice, MCV is moving in the background&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/blogger/2754/2691/1600/harvester4.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://photos1.blogger.com/blogger/2754/2691/320/harvester4.png" alt="" border="0" /&gt;&lt;/a&gt;&lt;span style="font-size:78%;"&gt;Harvester feasting upon some spice&lt;br /&gt;&lt;/span&gt;&lt;div style="text-align: left;"&gt;&lt;span style="font-size:78%;"&gt;&lt;span style="font-size:100%;"&gt;&lt;br /&gt;&lt;span style="font-size:100%;"&gt;As you can see, harvesters have a 2nd indicator showing their fullness.  Also, when I was writing the harvester code, I already implemented quite some code needed for attacking.&lt;br /&gt;&lt;br /&gt;I initially thought about adding a Harvest() function, but soon figured out that a harvester would basicly attack the spice, so I override the Attack() function from the units now.&lt;br /&gt;&lt;br /&gt;Coming week I'll finish the harvester completely by making it search better for spice, clean up some code and fix all the mess I wrote in the mouse handling code. Oh, and work out a better way for mass selected units, so that Harvesters don't attack units/buildings(Or attempt to) and that regular units don't attempt to attack the spice(Which would be catastrophic, as I intend to make the value of spice tiles decrease when they're hit with gun fire).&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/25717179-115492695453325485?l=dune-ii.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dune-ii.blogspot.com/feeds/115492695453325485/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=25717179&amp;postID=115492695453325485' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/25717179/posts/default/115492695453325485'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/25717179/posts/default/115492695453325485'/><link rel='alternate' type='text/html' href='http://dune-ii.blogspot.com/2006/08/harvesters-nearly-done.html' title='Harvesters nearly done'/><author><name>Toolmaker</name><uri>http://www.blogger.com/profile/15938868073830687692</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-25717179.post-115446655001039846</id><published>2006-08-01T14:02:00.000-07:00</published><updated>2006-11-11T16:49:47.346-08:00</updated><title type='text'>Unit health bars are now working</title><content type='html'>Today I added the health bars to show up above units when they're selected or when the mouse cursor is hovering over them.&lt;br /&gt;&lt;br /&gt;Creating the bar as a total of 10 minutes of work, and another 5 minutes to make the texture when I discovered that Sprite.Draw() doesn't allowed me to stretch the texture(Perhaps I should have used Draw2D(), but I'm a bit lazy).&lt;br /&gt;&lt;br /&gt;Below are 2 screenshots: First one shows an empty health bar(Where the unit basicly should be removed from the battle field) and the 2nd one shows a selected devastator and the mouse hovering over the light tank.&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/blogger/2754/2691/1600/healthbar2.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://photos1.blogger.com/blogger/2754/2691/320/healthbar2.png" alt="" border="0" /&gt;&lt;/a&gt;&lt;span style="font-size:78%;"&gt;(Click to enlarge)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/blogger/2754/2691/1600/healthbar3.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://photos1.blogger.com/blogger/2754/2691/320/healthbar3.png" alt="" border="0" /&gt;&lt;/a&gt;&lt;span style="font-size:78%;"&gt;(Click to enlarge)&lt;br /&gt;&lt;/span&gt;&lt;div style="text-align: left;"&gt;&lt;br /&gt;So, I also started with the harvesting progress bar, which is basicly the same thing, using a different texture and a different location to render it all. That should be implemented tomorrow, and there should be a harvester unit that 'works'(Ie. move around, show an attack cursor over spice).&lt;br /&gt;&lt;br /&gt;That's it for today. Hopefully I have time to code tomorrow, but somehow, I doubt it.&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/25717179-115446655001039846?l=dune-ii.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dune-ii.blogspot.com/feeds/115446655001039846/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=25717179&amp;postID=115446655001039846' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/25717179/posts/default/115446655001039846'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/25717179/posts/default/115446655001039846'/><link rel='alternate' type='text/html' href='http://dune-ii.blogspot.com/2006/08/unit-health-bars-are-now-working.html' title='Unit health bars are now working'/><author><name>Toolmaker</name><uri>http://www.blogger.com/profile/15938868073830687692</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-25717179.post-115394126834539561</id><published>2006-07-26T11:59:00.000-07:00</published><updated>2006-11-11T16:49:47.196-08:00</updated><title type='text'>What's up with me</title><content type='html'>So, my previous contained all my update logs(And this one will contain a little bit aswell, including a screenshot).&lt;br /&gt;&lt;br /&gt;First of all, the new place I'm in rocks: It's air-conditioned, we got a dishwasher, a large kitchen and it's not housemates.&lt;br /&gt;&lt;br /&gt;Also, since I'm currently having vacation from college, I'm spending most of my time working. I got a vacation job as foreman. We travel through the country and install TFT monitors at all locations of a company. It are a few thousand monitors, so I'm sure I have at least 6 weeks of work.&lt;br /&gt;&lt;br /&gt;The pay is ok and I get to drive the truck. While that's ok, it's a horrible job aswell: The installation locations are ALWAYS in the middle of the city, and the streets are usually thight, crowded and shit to maneuver a huge truck in without too much experience and a drivers license for driving trucks. I'm not illegal driving this truck, on paper it's a car. However, it handles as a truck. Due to this, I damaged the truck twice(GAAH!!). My girlfriend told me it was the risk they took, but that didn't do much about the guilty feelings.&lt;br /&gt;&lt;br /&gt;So, today I was home early, so I took a nap and when I woke up(I had a muscle cramp in my leg, not a funny way to wake up), I decided it was time to code. So I finished off my debug log and log console. It was quite easy to work out. The log itself stores lines, and can flush them to disk aswell, and the console is the visual part. It takes it's own height, calculates how much lines fit in it(It first calls a MeasureString()), minus one, and then takes the last x lines from the log.&lt;br /&gt;&lt;br /&gt;It's rendered to an alpha blended texture only when the log updates. That way, it's cheap to render. I still need to make it re-sizable at runtime(Perhaps turn it into a GUI widget or place it on a GUI widget, such as a re-sizeable panel). Also, I need to make use of it in the actual game code.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/blogger/2754/2691/1600/console2.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://photos1.blogger.com/blogger/2754/2691/320/console2.png" alt="" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;I didn't mention it in my previous log entry, but I also optimized the map rendering, and it gave me a 30 fps performance boost. Which is nice. And I made the tile reserving/occupucation work properly. So, when I have time again(Which is probably friday), I fix the drag selection which I disabled, do some work on actually making sure device lost events are properly handled and then really start working on the harvester(Well, after I made a new map).&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/25717179-115394126834539561?l=dune-ii.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dune-ii.blogspot.com/feeds/115394126834539561/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=25717179&amp;postID=115394126834539561' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/25717179/posts/default/115394126834539561'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/25717179/posts/default/115394126834539561'/><link rel='alternate' type='text/html' href='http://dune-ii.blogspot.com/2006/07/whats-up-with-me.html' title='What&apos;s up with me'/><author><name>Toolmaker</name><uri>http://www.blogger.com/profile/15938868073830687692</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-25717179.post-115394036968963746</id><published>2006-07-26T11:57:00.000-07:00</published><updated>2006-11-11T16:49:46.980-08:00</updated><title type='text'>Internet is back up: More updates!</title><content type='html'>I've been without internet for a full 3 weeks, and I have a vacation job, so I don't have an awfull lot of time to spent coding. However, I did keep track of my development log while I was offline, so here are my notes for the past 3 weeks(Not a lot, since I didn't have much time to code):&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Sunday 16th july 22:33 &lt;supplemental&gt;:&lt;/span&gt;&lt;br /&gt;I've done more coding today and I've ran into a few problems, did a few changes and gave stuff some thoughts.&lt;br /&gt;&lt;br /&gt;I have to work out movement a bit better, because at the moment units are constantly calculating a new path to follow when entering a tile after reserving it.&lt;br /&gt;&lt;br /&gt;Also, I ran into a trouble when rendering the selection: When the position has numbers after the dot, the selection marker will be (partially) faded. Solving this is quite simple: Make sure the X,Y positions of the marker don't have any numbers after the dot. That's not very difficult, but adds some more pointless information, and I don't wanna resort of a new Vector3 every render loop.&lt;br /&gt;&lt;br /&gt;It all takes more time than I anticipated, so I think it's gonna take ages before I can start adding buildings, and/or UI components.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Sunday 16th july 00:43:&lt;/span&gt;&lt;br /&gt;I haven't had much time to code friday and most of the saturday I've been away, but tonight, I finally managed to get movement working properly.&lt;br /&gt;&lt;br /&gt;It involved quite some changes, such as adding a SceneManager to maintain all objects on the map, and coordinate them. At this moment, movement is veru rudimentary: The unit itself moves to the middle of the last tile in it's path without actually facing the correct direction or reserving tiles.&lt;br /&gt;&lt;br /&gt;That is my next step: Have units rotate their nose in the correct direction, and then move. After that, I need to have the SceneManager(SM) update the tiles correctly, and allow units to mark a specific tile are 'reserved'. A reserved tile means that a unit marked the tile to move to it. Not doing this might result in multiple units occupying the same tile.&lt;br /&gt;&lt;br /&gt;After that works, I'll do a new commit and start working on optimizing map rendering a bit. After that, I'm not sure what I'm gonna do first: Harvesting and weapons. I probably go with harvesting, because the harvester is really cool, esp. with the sand falling out of it in the back ^_^.&lt;br /&gt;&lt;br /&gt;Anyway, a bit back to work and then I'm off to bed again.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Thursday 13 July 23:30:&lt;/span&gt;&lt;br /&gt;I've decided to write a development log offline until I have internet access on tuesday next week, and then publish these notes in 1 single blog entry.&lt;br /&gt;&lt;br /&gt;OVer the past days, I've done quite some work, and it payed it off. New additions to the game at this moment in time are(Taken from this morning's SVN commit log):&lt;br /&gt;- Added PathFinding&lt;br /&gt;- Added a test map for pathfinding&lt;br /&gt;- Added batch file to extract current Revision&lt;br /&gt;- In-game now FPS and current revision is visible&lt;br /&gt;- Added a GameObject class&lt;br /&gt;- Derived Unit from GameObject&lt;br /&gt;- PlayState now keeps track of all units&lt;br /&gt;- Added a UnitFactory which spawns new units&lt;br /&gt;- Added the graphics for quad, trike, harvester, light tank and siege tank.&lt;br /&gt;- Created a rules.ini to contain definitions for units&lt;br /&gt;- Re-organized DuneRemake project&lt;br /&gt;- Added hotspot to mouse&lt;br /&gt;&lt;br /&gt;Over the day, I also added the graphics for the Devastator, Deviator, Sonic Wave Tank, MCV and Rocket Launcher. Due to some errors in the spacing, I had to re-do the Devastator image, but everything works fine now.&lt;br /&gt;&lt;br /&gt;Also, I added a new class called TurretedUnit, which is basicly a tank with a turret(Duh, like you couldn't figure that out). It relies on the base Unit class to draw the tank base, and then draws the turret on top of it.&lt;br /&gt;&lt;br /&gt;Now that I added the graphics, I'm thinking off a way to store the units in the map so they can move properly. My main problem is that I currently can't think of a way to store both units and aircraft/sandworms in a tile. Because, there can be a carry-all hovering above a unit to pick it up, and a sand worm underneath preparing to have lunch. I gave an ArrayList or List&lt;gameobject&gt; a thought, but I'm not sure. It would cause a lot of additional overhead, which isn't very good for performance.&lt;br /&gt;&lt;br /&gt;I am planning on adding a global GameObject list to keep track off all game objects, and using that to update them all. Having to walk a 200x200 map just to update a total of 8 objects isn't very efficient.&lt;br /&gt;&lt;br /&gt;I technically COULD walk the list twice, check if said object is within the viewport, and if it is, render it. Or while updating all game objects, place the objects that are within the viewport in a 2nd list and when rendering, only render those objects.&lt;br /&gt;&lt;br /&gt;On the matter of pre-mature optimizations: After I got units moving over the map fine, I'm going to change the code for the rendering of the map. I'm going to render the visible viewport map to a texture, and only when it changes, I render it again to the texture. At the current screen size, rendering it tile-by-tile, it takes 1200 render calls. Changing that to only 1 call will increase performance a bit.&lt;br /&gt;&lt;br /&gt;That's it for tonight. It's 23:47 now, and I think I'm going to take a shower and crawl against my girlfriend in bed. No screenies for today, sorry!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/25717179-115394036968963746?l=dune-ii.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dune-ii.blogspot.com/feeds/115394036968963746/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=25717179&amp;postID=115394036968963746' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/25717179/posts/default/115394036968963746'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/25717179/posts/default/115394036968963746'/><link rel='alternate' type='text/html' href='http://dune-ii.blogspot.com/2006/07/internet-is-back-up-more-updates.html' title='Internet is back up: More updates!'/><author><name>Toolmaker</name><uri>http://www.blogger.com/profile/15938868073830687692</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-25717179.post-115238165863250427</id><published>2006-07-08T08:42:00.000-07:00</published><updated>2006-11-11T16:49:46.775-08:00</updated><title type='text'>Pathfinding works</title><content type='html'>&lt;div style="text-align: center;"&gt;I've successfully implemented A* pathfinding. A* is pretty simple to implement, once you understand how it works. Here are 2 screenshots:&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/blogger/2754/2691/1600/pathfinding.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://photos1.blogger.com/blogger/2754/2691/320/pathfinding.png" alt="" border="0" /&gt;&lt;/a&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/blogger/2754/2691/1600/pathfinding2.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://photos1.blogger.com/blogger/2754/2691/320/pathfinding2.png" alt="" border="0" /&gt;&lt;/a&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-size:78%;"&gt;Click to enlarge&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;The next step now is to actually have my mouse cursor support a 'hotspot', so that changing the  cursor doesn't alter the general behaviour(Right now, the attack cursor will show as long as it's hovering over a unit, even if this includes the bounds of the cursor). So, when I use a hotspot, changing the cursor doesn't show unnatural.&lt;br /&gt;&lt;br /&gt;Also, when that works, I'll work on adding the selection thingies around the units and making them actually move.&lt;br /&gt;&lt;br /&gt;However, for the coming week, or perhaps 2 weeks, I won't be able to post new updates, as I'm moving and my phoneline/DSL line haven't been transferred to the new location. Let's hope I get to live at least 6 months at that new location before I have to move again.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/25717179-115238165863250427?l=dune-ii.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dune-ii.blogspot.com/feeds/115238165863250427/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=25717179&amp;postID=115238165863250427' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/25717179/posts/default/115238165863250427'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/25717179/posts/default/115238165863250427'/><link rel='alternate' type='text/html' href='http://dune-ii.blogspot.com/2006/07/pathfinding-works.html' title='Pathfinding works'/><author><name>Toolmaker</name><uri>http://www.blogger.com/profile/15938868073830687692</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-25717179.post-115187250801880993</id><published>2006-07-02T13:29:00.000-07:00</published><updated>2006-11-11T16:49:46.509-08:00</updated><title type='text'>We're developing again!</title><content type='html'>Finally, after almost 2 months of no updates, I have time again to code on the game. In the past 2 months, I've been too busy with school and other projects, so I had to put this project in the fridge for a little while.&lt;br /&gt;&lt;br /&gt;In the past days I've coded quite a bit, and I did the following:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Fixed a mouse related bug&lt;/li&gt;&lt;li&gt;Fixed a bug in the map editor where the 3x3 tile brush wasn't working properly&lt;/li&gt;&lt;li&gt;Added a base unit class&lt;/li&gt;&lt;li&gt;Added a Drag Selection rectangle to the game&lt;/li&gt;&lt;li&gt;Added unit selection to the game&lt;/li&gt;&lt;li&gt;Coughed up a map for pathfinding&lt;/li&gt;&lt;/ul&gt;The next step for me is to actually show unit selection and after that, implement movement and pathfinding algorythm.&lt;br /&gt;&lt;br /&gt;I can't show any screenshots at the moment, because there isn't anything special to see, unless you like seeing a screenshot with nothing but sand and a unit standing on it...&lt;br /&gt;&lt;br /&gt;I hope I can show a little big of screenshots for movement in 2 or 3 days.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/25717179-115187250801880993?l=dune-ii.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dune-ii.blogspot.com/feeds/115187250801880993/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=25717179&amp;postID=115187250801880993' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/25717179/posts/default/115187250801880993'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/25717179/posts/default/115187250801880993'/><link rel='alternate' type='text/html' href='http://dune-ii.blogspot.com/2006/07/were-developing-again.html' title='We&apos;re developing again!'/><author><name>Toolmaker</name><uri>http://www.blogger.com/profile/15938868073830687692</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-25717179.post-114656815358027103</id><published>2006-05-02T04:04:00.000-07:00</published><updated>2006-11-11T16:49:46.279-08:00</updated><title type='text'>Map Editor completed / Comments opened to public</title><content type='html'>I just completed the map editor! It incorporates all the features I wanted to include, and I left out a few non-vital functions such as auto-saving, Dune 2: The maker map format loading/saving.&lt;br /&gt;&lt;br /&gt;Here's a screenshot of the 3x3 brush in action:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/blogger/2754/2691/1600/untitled.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://photos1.blogger.com/blogger/2754/2691/320/untitled.png" alt="" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;Also, I opened up comments to the anonymous public, since not everyone wants to register with blogger just to comment in my blog.&lt;br /&gt;&lt;br /&gt;Up next: Loading units in the game, and changing their palettes to right colors.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/25717179-114656815358027103?l=dune-ii.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dune-ii.blogspot.com/feeds/114656815358027103/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=25717179&amp;postID=114656815358027103' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/25717179/posts/default/114656815358027103'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/25717179/posts/default/114656815358027103'/><link rel='alternate' type='text/html' href='http://dune-ii.blogspot.com/2006/05/map-editor-completed-comments-opened.html' title='Map Editor completed / Comments opened to public'/><author><name>Toolmaker</name><uri>http://www.blogger.com/profile/15938868073830687692</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-25717179.post-114617521731861501</id><published>2006-04-27T14:53:00.000-07:00</published><updated>2006-11-11T16:49:46.035-08:00</updated><title type='text'>Loading/Saving almost done</title><content type='html'>I finished the Saving part, and I'm currently working on loading files from disk.&lt;br /&gt;&lt;br /&gt;I decided to go with an XML fileformat, as it's easiest to read and understand by humans. Since I don't store a lot of information, it's seemed logical I make it human readable. The format is really simple, but I'm not yet quite happy with it. It seems a bit, uhm, disorganized/illogical mapped out.&lt;br /&gt;&lt;br /&gt;I'll work it out a bit better tomorrow, and see what it turns into. Also, I got the New Map dialog in(Altho without Author information and map name), display which tile the user has selected(That is, the x, y coordinates within the map, relative to 0, 0 of the map, not of the screen) and I display the map dimensions.&lt;br /&gt;&lt;br /&gt;I did add the UI for the 3x3 brush, but I haven't written the code for it yet, but that's pretty simple.&lt;br /&gt;&lt;br /&gt;So, I got everything down to:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Auto saving&lt;/li&gt;&lt;li&gt;Finish loading&lt;/li&gt;&lt;li&gt;Save Dune 2: The maker files&lt;/li&gt;&lt;li&gt;The code of the 3x3 brush&lt;/li&gt;&lt;/ul&gt;That's pretty minimal work to do. Sounds doable in a day. Downside is: I don't have time tomorrow, since I need to go to a 2 clients, and finish some work there. Well, it's money, that's important.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/25717179-114617521731861501?l=dune-ii.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dune-ii.blogspot.com/feeds/114617521731861501/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=25717179&amp;postID=114617521731861501' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/25717179/posts/default/114617521731861501'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/25717179/posts/default/114617521731861501'/><link rel='alternate' type='text/html' href='http://dune-ii.blogspot.com/2006/04/loadingsaving-almost-done.html' title='Loading/Saving almost done'/><author><name>Toolmaker</name><uri>http://www.blogger.com/profile/15938868073830687692</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-25717179.post-114600002962353255</id><published>2006-04-25T14:10:00.000-07:00</published><updated>2006-11-11T16:49:45.745-08:00</updated><title type='text'>Tile edging works</title><content type='html'>Today I managed to push myself to finish off the code to calculate all the proper edges for each tiles. It was a tedious job, as it was a giant block of if statements and bitwise ORs and ANDs to determine which side was connected.&lt;br /&gt;&lt;br /&gt;The code is ugly, but there wasn't much alternative to it. These pieces of code are in the category of "Never touch it again". And that's exactly what I'm going to do: Not touching it anymore, since it's working perfectly.&lt;br /&gt;&lt;br /&gt;For those of you who want to see it all in action:&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/blogger/2754/2691/1600/mapedit.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://photos1.blogger.com/blogger/2754/2691/320/mapedit.jpg" alt="" border="0" /&gt;&lt;/a&gt;Looks sexy eh? It contains all the tiles, and shows how smooth each tile is getting the right edge, including the tiles that rely on a specific underground(Such as mountains).&lt;br /&gt;&lt;br /&gt;The todo list for the editor is now down to:&lt;br /&gt;- Add New Map dialog&lt;br /&gt;- Saving&lt;br /&gt;- Loading&lt;br /&gt;- Adding a 3x3 brush, to quickly cough up large areas&lt;br /&gt;- Use the statusbar to display some information about the map, such as height, width.&lt;br /&gt;- Autosave function for automaticallly save unsaved work every 5 or 10 minutes in a special temp file.&lt;br /&gt;&lt;br /&gt;I was thinking about adding a minimap, but I'm not sure if I'm going to do that. If I am going to do it, I need to do it in WinForms code, since I can't render outside the D3D panel, and it would be annoying to show the minimap in the editor screen itself. I'm probably going to leave it out for now, but I can always add it in, it's not something that requires a complete overhaul all the sudden.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/25717179-114600002962353255?l=dune-ii.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dune-ii.blogspot.com/feeds/114600002962353255/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=25717179&amp;postID=114600002962353255' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/25717179/posts/default/114600002962353255'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/25717179/posts/default/114600002962353255'/><link rel='alternate' type='text/html' href='http://dune-ii.blogspot.com/2006/04/tile-edging-works.html' title='Tile edging works'/><author><name>Toolmaker</name><uri>http://www.blogger.com/profile/15938868073830687692</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-25717179.post-114549697556285467</id><published>2006-04-19T18:20:00.000-07:00</published><updated>2006-11-11T16:49:45.504-08:00</updated><title type='text'>Editor delayed</title><content type='html'>Due to a very high workload for college, I'll have to move the completion of the editor by a week. In my original planning, I wanted to finish(and perhaps release) the editor by the end of the week.&lt;br /&gt;&lt;br /&gt;However, there is just too much work to be done for school, that I'll have to postpone it. I rather not work on my private projects, than fail any of my school projects.&lt;br /&gt;&lt;br /&gt;Tomorrow morning I have a presentation for one of the school projects(In fact, I have less than 3 hours before my alarm goes off, but I can't sleep). Next week I have another presentation and I have to get some work graded.&lt;br /&gt;&lt;br /&gt;I also have to complete some work for a few clients, so I rather give those jobs a higher priority. Coming week I except to:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Finish the editor&lt;/li&gt;&lt;li&gt;Release some ideas on how I want to approach a few problems&lt;/li&gt;&lt;li&gt;Release a more accurate project goal&lt;/li&gt;&lt;li&gt;Come up with some design models&lt;/li&gt;&lt;/ul&gt;Tune in coming tuesday for more updates.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/25717179-114549697556285467?l=dune-ii.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dune-ii.blogspot.com/feeds/114549697556285467/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=25717179&amp;postID=114549697556285467' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/25717179/posts/default/114549697556285467'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/25717179/posts/default/114549697556285467'/><link rel='alternate' type='text/html' href='http://dune-ii.blogspot.com/2006/04/editor-delayed.html' title='Editor delayed'/><author><name>Toolmaker</name><uri>http://www.blogger.com/profile/15938868073830687692</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-25717179.post-114534611214511427</id><published>2006-04-18T00:22:00.000-07:00</published><updated>2006-11-11T16:49:45.266-08:00</updated><title type='text'>Map Editor nearing completion</title><content type='html'>The mapeditor is nearing it's completion. It was quite fun to develop, and it's a bit of a shame I'm almost done with it.&lt;br /&gt;&lt;br /&gt;There are some radical changes in it, such as that I stepped of the DirectInput mouse. At my first attempt, I attempted to initialize DirectInput for the mouse, and use that to handle the input. Problem was: I had to make up a fancy way to detect wether or not the mouse exited from the rendering area and unacquire(). In the end, it turned out the mouse was moving faster in Windows than it was under DirectInput(strange?), so I stepped off the DInput mouse.&lt;br /&gt;&lt;br /&gt;I know process the MouseEnter, MouseLeft, MouseMove and MouseClick events off the panel where Direct3D renders in. Then I call a class member function of the TileBrush to set the new position of the square. When the mouse leaves or enters the area, I either make the square visible or invisible, so the little square doesn't sit at the corners doing nothing. This is how it looked liked:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/blogger/2754/2691/1600/editor.0.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://photos1.blogger.com/blogger/2754/2691/320/editor.0.jpg" alt="" border="0" /&gt;&lt;/a&gt;That's quite sexy eh? This screenshot also shows the TileBrush in action. The TileBrush class is responsible for drawing tiles into the map, and to check if it needs to draw some extra tiles. For instanece, if I want to draw a Spice Dune(The dark area in the screenshot), it has to be in the middle of a spice field. To accomplish this, I first check if all 8 tiles surrounding the tile are of the required tile type. If not, I set them, and after that, I finally add the tile itself.&lt;br /&gt;&lt;br /&gt;It's funky, but not completely flawless. I can still place those tiles, and replace all the spice with sand. My next entry contains how I solved it.&lt;br /&gt;&lt;br /&gt;When I made the brush work, I wanted to go to bed. I just had to implement scrollbars, and make them work. Scrolling is simple: The horizontal scrollbar has a maxvalue of map.Width - map.ViewPortSize.Width, and the same for the vertical scrollbar. When the bars are scrolled, I can then just set the viewport positions. Simple, yet very effective. This is the final result:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/blogger/2754/2691/1600/editor2.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://photos1.blogger.com/blogger/2754/2691/320/editor2.jpg" alt="" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;Now I only need to work out an algorythm to round of the edges of the tiles(so they don't look all squary), remove certain tiles if they're not surrounded by their required tile, show some map information, make a "New Map" dialog and loading/saving.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/25717179-114534611214511427?l=dune-ii.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dune-ii.blogspot.com/feeds/114534611214511427/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=25717179&amp;postID=114534611214511427' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/25717179/posts/default/114534611214511427'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/25717179/posts/default/114534611214511427'/><link rel='alternate' type='text/html' href='http://dune-ii.blogspot.com/2006/04/map-editor-nearing-completion.html' title='Map Editor nearing completion'/><author><name>Toolmaker</name><uri>http://www.blogger.com/profile/15938868073830687692</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-25717179.post-114505876892994492</id><published>2006-04-14T16:48:00.000-07:00</published><updated>2006-11-11T16:49:45.026-08:00</updated><title type='text'>Map Editor on the way!</title><content type='html'>One of the basic things in Dune II was the map. So I decided to dedicate myself first at making a proper mapformat, have it load and look good.&lt;br /&gt;&lt;br /&gt;I first started with a normal WinForms  app, but soon decided I needed to share a lot of common information between this and my ingame map class. So I decided to have my editor use Direct3D itself for the map rendering, and shove all the map specific things(And probably more) into a common DLL.&lt;br /&gt;&lt;br /&gt;Right now, I have the DLL and the normal game working again, and I was working on integrating it all into the editor, when I decided I needed to install my Windows 2003 server(I now had access to a spare monitor and keyboard and the space to set it up).&lt;br /&gt;&lt;br /&gt;So, I installed it, and at the moment, I'm installing all the necessary services on it, and then continue to install Apache, PHP, MySQL en Subversion on it. So I can host some sites, do work for clients and run Subversion of the server. Then I can free up some space and resources on my own machine.&lt;br /&gt;&lt;br /&gt;Too bad this prevents me from doing more work on the editor and the game, but it's important to get it running.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/25717179-114505876892994492?l=dune-ii.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dune-ii.blogspot.com/feeds/114505876892994492/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=25717179&amp;postID=114505876892994492' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/25717179/posts/default/114505876892994492'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/25717179/posts/default/114505876892994492'/><link rel='alternate' type='text/html' href='http://dune-ii.blogspot.com/2006/04/map-editor-on-way.html' title='Map Editor on the way!'/><author><name>Toolmaker</name><uri>http://www.blogger.com/profile/15938868073830687692</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-25717179.post-114483072360179163</id><published>2006-04-12T01:18:00.000-07:00</published><updated>2006-11-11T16:49:44.599-08:00</updated><title type='text'>Incorporated ToolEngine and got the mouse working.</title><content type='html'>Yesterday I integrated my existing 3D engine into the Dune II Remake project. I changed the Engine class a bit to support 2D operations using the Microsoft.DirectX.Sprite class. However, I added all the functionality directly into the Engine class, which seems a bit bad. The same class, for both 2D and 3D. I'll split them out in a Engine2D and an Engine3D class later this week.&lt;br /&gt;&lt;br /&gt;After that, I spent some time reviewing my old InputManager code, and to be honest, it was quite solid. I added in a little bit of code to initialize both the keyboard and the mouse, and experimented a bit with the CooperativeFlags. I still haven't figured out if I want to go with Exclusive or NonExclusive, but at the moment, I use NonExclusive, and I don't really like it.&lt;br /&gt;&lt;br /&gt;After the mouse worked, I added a simple class to render the mouse pointer to the screen. It works, but without transparancy. I did specify Palet entry 0 as transparancy, but for some reason, it still shows the black I used in the bitmaps. Trying to figure out why.&lt;br /&gt;&lt;br /&gt;If I got some more time tonight(Which I doubt, because there's a giant pile of dishes to do since yesterday I had my birthday), I want to add in a first unit, the trike. I want to create a Unit class, then derive a Vehicle class from that(Because there are also infantry units) and then try using some sort of config file for the units.&lt;br /&gt;&lt;br /&gt;Or I might try to whip up a map loader and editor, because at the moment, I don't really have any good map that I can use. I might try to work out the format for the Dune II: The maker maps, and use those until I can whip up my own format and editor.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/25717179-114483072360179163?l=dune-ii.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dune-ii.blogspot.com/feeds/114483072360179163/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=25717179&amp;postID=114483072360179163' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/25717179/posts/default/114483072360179163'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/25717179/posts/default/114483072360179163'/><link rel='alternate' type='text/html' href='http://dune-ii.blogspot.com/2006/04/incorporated-toolengine-and-got-mouse.html' title='Incorporated ToolEngine and got the mouse working.'/><author><name>Toolmaker</name><uri>http://www.blogger.com/profile/15938868073830687692</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-25717179.post-114458391676143978</id><published>2006-04-09T04:54:00.000-07:00</published><updated>2006-11-11T16:49:44.313-08:00</updated><title type='text'>First entry :)</title><content type='html'>I've decided to start blogging the development progress of my Dune II clone, so here I am.&lt;br /&gt;&lt;br /&gt;I decided to use Blogger instead of my own journal system mainly because I use my own site for business purposes now, and having my journal on in, while not linked to on the mainpage is a bad idea.&lt;br /&gt;&lt;br /&gt;In this journal I will keep to shed light on the status of the project, share ideas, screenies, progress and development decisions.&lt;br /&gt;&lt;br /&gt;At the moment I don't have much to share, except that I just started development, and that for once, I want to try and finish the project. Perhaps having some audience to "encourage" me will keep me motivated, esp. when people are sharing their ideas with me.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/25717179-114458391676143978?l=dune-ii.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dune-ii.blogspot.com/feeds/114458391676143978/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=25717179&amp;postID=114458391676143978' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/25717179/posts/default/114458391676143978'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/25717179/posts/default/114458391676143978'/><link rel='alternate' type='text/html' href='http://dune-ii.blogspot.com/2006/04/first-entry.html' title='First entry :)'/><author><name>Toolmaker</name><uri>http://www.blogger.com/profile/15938868073830687692</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>
