Jump to content

AggrorJorn

Members
  • Content Count

    4,815
  • Joined

  • Last visited

Blog Entries posted by AggrorJorn

  1. AggrorJorn
    Technically the title isn't really correct since game development hasn't really started yet. The first 10 weeks are introduction weeks, which are probably neccesary for a lot people who do not know which business unit they want to choose. As for me it has been clear that Game Development is my direction but in the mean time I get all sorts of classes from different IT directions:

    System and Network engineer
    Software engineer
    IT manager
    Human Centered Design
    Technical Computing
    Network Forensic Research
    Game development

    Some of them are cool like network forensic researching. We used several programs to 'hack' protected wireless routers etc. but most of them are pretty boring.
     
     
    Programming == awesome
     
    Okay so we started with Java and I have to say that it is going really well. As a matter of fact: The school hired me to substitute for a teacher who quit his job on the first day of college. There are a lot of terms that make much more sense now that I am actually working with them a lot. terms like classes, arrays, constructors, publics and privates etc.
    I was a bit sceptical about Java but as it turns out its pretty cool. The comparison with C# is very small and that gives me more then enough boost to pickup were I left of with C#. Ofcourse I have just begun so this difference will probably change. Another 5 weeks to go and then Game development should really be kicking in. There are some cool classes that I am eagerly waiting on: Advanced Java, ActionScript and math. AI, Pathfinding and 3d games are things for next year which is a pitty but I have finally learned my lesson that a good programming knowledge in general is essential to developing games. (That took me only 2 years to realise.)
     
    In the mean time have a look at this topic:
    http://leadwerks.com/werkspace/index.php?/topic/2891-the-last-road/page__pid__26958#entry26958
     
     
    Thats it for this blog. I''ll keep you posted.
     
    Ceya,
    Aggror
  2. AggrorJorn
    In follow up to Andy, I also want to do a little blog on my experience with Leadwerks 3 so far. The first week after purchasing I didn't have much time to spend on it. Luckily after that week, there was quite some time left for the start of a new adventure.
     
     
     
    Lua
    In contrary to Leadwerks 2.3, I now want to lay most of my focus on C++. That is kind of Ironic, since a lot more people are interested in Lua now that Leadwerks 3 has arrived. It is not that surprising since the advantages of using Lua have improved quite a lot. Ofcourse we have debugging and stepping through Lua scripts which is a huge gain. And the other thing is the flowgraph editor. Rick has provided me an extra motivation boost to try out the flowgraph editor, with his cool scripts. (Of which the volume trigger is my personal favorite ). I tried to create a little script myself and within minutes, real simple gameplay interaction was set up.(Gravity activator) Something that was a lot harder to do with Leadwerks 2.3.
     


     
    C++ and Shaders
    For my own portfolio and skill set I started with C++ and the LE3 API. Just like with LE2, the API is very easy to use. Chris and Josh have done an excellent job on describing commands for both C++ and Lua. Pretty much every command comes with a working example. In the future I also hope to learn more about shaders. Shadmar has allready created severall of them, which you should check out.
     
    Tutorials
    A good way to teach yourself something, is to try teaching it to others. Thats the motto I have been going with since I have started creating tutorials for Leadwerks 2.3. The road is wide open again with the arrival of Leadwerks 3. The first 5 video tutorials for using C++ with LE3 are uploaded on youtube and more are on their way. Eventually I hope to reach a point were we will create a game that uses a combination of C++ and Lua. For a complete overview of tutorials, have a look here:
    http://www.leadwerks...-lua-tutorials/
     
    Future updates
    There are plenty of things that can be improved with Leadwerks 3. Thats a fact. I am not talking about the deferred rendering with dynamic shadows. It is really the little things that count. I am more than confident that these issues will be dealt with in the near future. As soon as Josh is back from the GDC, there will probably be updates every other day. For now, I am really happy with my purchase of Leadwerks 3. I am looking forward to all the cool stuff that this community is going to create.
     
     
    Jorn
  3. AggrorJorn
    The easiest, but none the less effective, way to optimize a large outdoor scene is setting a view range for an entity. Here are some basic rules that I used during the rebuild of the Return to the Zone project.
    Max: Here you can think of essential buildings and large structures. Think about distant buildings, powerlines, bridges and entities that stick out above the vegetation or water plane. Far: Here we have the larger props: containers, trains, vehicles, walls, statues. This also contains props that are exposed in open areas. Think about road side props like stone piles, crates or oilddrums. Medium: Props that are placed inside buildings can have either Medium or Near as a view range. When a building has several large indoor areas or contain a lot of windows and doors use the medium setting. Near: Tiny props, like cans, toys, garbage and pretty much all props that are placed inside confined rooms. Also, a few static camera points showcasing the Zone:
     
  4. AggrorJorn
    In a previous developer blog I showed how I use spline paths inside the Leadwerks editor. The cool thing about splines as that they are extremely multipurpose. I started working on generating meshes based on the splines.  Think about ropes, wires, rivers, rollercoasters and of course roads
    Ropes and wires are in progress because I find them the coolest. Especially rope bridges are awesome to make and see in play. They require a lot of finetuning so I have put that on halt for now. In the meantime I also started working on road nodes. The Return to the Zone project uses terrain textures, but the original scene from Leadwerks 2.3 used the in-editor road tool. Time for some new roadfeatures.
    Roads
    The generic nature of the splines allows easy creation of meshes based on the spline. Constructing basic geometry was relatively easy. However, getting the road to appear on the terrain properly proved a little harder. When there is no terrain, the generation of the road is instantaneous. The roads that are created snap perfectly together and it is really satifying to see the result. Per node you can't only tweak the road with the spline handlers, but you can set a road width, a material and several terrain alignment options.
    When the node has to deal with terrain allignment the performance on startup is little slow at the moment, but the first results look promising. I want to add this feature to my winter game "On the road again", which makes cool random tracks from CSG brushes.  
    Another cool automatic feauture is that the road still functions as a path spline. You can attach a car to the road spline and it will follow the generated road. 
     
    Ropes and wires
    For a next video I will show the progress on the ropes and wires, with hopefully some working physics. Here is an older image based on the earlier splines to give you an idea on what I am going for:

  5. AggrorJorn
    Some new possibilities
    I have spend another evening on my in game console and it is shaping up nicely.
     

     
    To-do or not to do
    I am happy with how the console works right now. There are enough things that I could implement to make it even more usable but I don't need those (right now) for my project. Possible to do's
    Intellisense.
    Saving command log to a file.
    Adjusting color, settings and size of console via commands.

  6. AggrorJorn
    After creating my Component based engine structure for my main project, I have now moved on to the next stage of development: an in-game console.
     
    Possibilities
    To sum up what you can do with it, here is a little video demonstration.
     


     
    On the To-Do list
    Although the core of the console is finished and working the way I want it to work, there are some slight improvements.
    Grapics are simple boxes at this point. I want to go for Valve's in-game console look , which looks simple but suits its purpose really well.

    Used command are stored and can be retrieved with arrow keys.
    Error message or help text should be displayed above the command line.
    Show a cursor.
    Adding useful commands, like toggle sound, sound volume, load level, set players health, ammo, armor etc.
    Trying to build the console as a library so that it can be easily included in other projects.

  7. AggrorJorn
    Besides making tutorials I am also working on my own project. It is my biggest one yet, but I think I have enough knowledge to get at least really far. Right now I am building my own engine on top of Leadwerks 3. The entire project is written mainly in C++.
     
    Component Based engine design.
    Since Leadwerks is very flexible you can do a lot of different things with it. The Lua scripts in the editor are a good example of component based design. However if you switch to C++ you don't have this directly at your disposal for C++. That means you would have to implement it yourself. Of course there are tons of ways of doing this but this blog shows how I do it in my project.
    Instead of Component Based Design you can also choose to go for 'Direct programming' like Josh describes in his blog here. Both approaches have their pros and cons. The reason I am going for Component Based Design is because I want to create code that is highly flexible and can be interchanged between projects.
     
    The GameObject class
    The current system that I have is a combination of direct (hierarchical) and component based design. The following image shows how it starts.
     

    The first class is the GameObject. The gameObject is completely empty at first, meaning it doesn't contain any models or textures. The only thing that it contains are components. Every frame all the updates that are enabled are being updated and/or drawn. This is the core of the component based design. Lets say we create a Player Gameobject. We can add several components to it:
    ModelComponent
    WalkComponent
    JumpComponent
    FPSCameraComponent
    HealthGUIComponent

    Now lets say for instance that we want to have TPSCamera instead of a FPSCamera. All we need to do is remove the FPSCameraComponent and add a new TPSCameraComponent. Not only is this system very flexible, it allows us to create components that can be easily shared throughout your project and perhaps even other projects that also use this component based design.
     
    The Component class
    Every component is derived from the Component class. The component class itself is abstract and thus can not be instantiated.

     
    Increasing complexity
    When you look at the first 2 images, you will notice that some functions and variables are exactly the same. Most programmers will come to the conclusion that this is a bad design. So for that reason we enhance our design as follows:
     

     
    This means that a GameObject is also a component. The complexity hereby increases but works a lot better when it is properly integrated. (Note that the images are toned down a bit to simplify the idea.)
    It is debatable whether GameObject inherits from Component instead of the other way around. I decided to go for Component since it is called a Component Based Design and not a GameObject Based Design.
     
    FSM and Components
    At some point I came to the conclusion that it is not always necessary to create an entire component structure to get the desired hierarchy in a level. For instance in a menu it is easier to create a (finite) state machine rather then having to switch between components. Although components work perfectly well for menu's, I think it is a good principle to think about where to use FSM's and where to use Components.
     
    The Scene class
    The component based design is far from finished but the basics already work. The last thing that I show in this blog is the scene class. The scene class inherits from GameObject (and thus also Component) and contains a list of Components/GameObjects. Every gameObject that is created needs to be added to this list in order to be updated or drawn. I specifically want a scene to have a camera so that I allways know that when I load a new scene, a camera is being created.
     

     
     
    Thanks for reading.
    Jorn
  8. AggrorJorn
    Quite some time ago I was playing Rainbow Six Vegas with a coworker (not during work time). We were doing terrorist hunt on this construction site map and we were having a great time enjoying this classic game. At some point I wanted to throw a grenade quite far away. Of course with my pro-fps skills I managed to hit the electric pole standing right in front of me. After I was done facepalming, something caught my eye: the wires on the electric pole were swinging, probably by the grenade's shockwave. I hadn't noticed that before, but I found it really cool. It reminds me of making rope-bridges (old 3ds max tutorial ). I think dynamic wires can add a nice extra touch of 'being an interactive environment'. Making wires like that could be fun to have as an extension on the SplineTools.
    The Zone
    This became especially apparent when working on the zone back in June. I was placing these power pylons on the terrain. Since they are great models that add a lot to the background, I decided to bring them a little bit closer to the main area and raised the terrain at several locations. Placing the pylons was a piece of cake. However placing the wires, was a pain. The wires come from 1 single model. The problem with this is that it makes it really hard to place these wires. I had to constantly rotate them around, move them and then rotate them some more. So when I had 2 pylons placed at different heights, it took a lot of messing around to get the models placed correctly. And this was just a straight line of pylons. With bends in the electric network this would have even more problematic.

    SplineTools extension: Wires
    The wires/ropes/cables extension of the SplineTools fixes this problem. We can simple put a pivot on each of the wire connectors of a pylon. Then we attach the wirescript to the pivots and make the pylon a prefab. Now we can connect multiple pylons by connecting the wire nodes. We play around with some of the handlers to create a nice bezier curve and we are good to go.
    Physics
    We can take it even further by adding physics to these wires. At the moment of writing there is support for static physics ropes and also experimental dynamic ropes. The latter one makes physics shapes per wire segment and adds joints between them. We can anchor both ends of the wire if we want to. In the stable 4.4 branch this causes the game to crash now and then, but the beta branch for 4.5 doesn't seem to have this. So that is good news.
    We now have the same wires as the ones that I encountered in Rainbow six. The dynamics ropes are really fun to play with. You can now easily create a tireswing, draggable computer cables (like in HalfLife 2) and most importantly: rope-bridges.
    I have to finish the example scenes and make the tutorial for them, but they are almost ready for release. They are included in the SplineTools package. A new video blog will be posted when it is ready. At the moment the workshop uploading fails, so I can't push any updates yet.

  9. AggrorJorn
    I started out 7 months ago with splines and it turned in to one of those annoying projects you start but then fail to finish even to it is in the back of your head the entire time. The reason this time was that I managed to delete my online repository and my local files, leaving me with nothing of the work I had created. I finally had the spirit to sit down and start rebuilding.
     
  10. AggrorJorn
    I have been working on some new features for the SplineTools package for Leadwerks. In the video below I demonstrate 2 new features
    Reverse spline followers: Reverse any spline follower at any given time on the spline. Just call the Reverse() function on a spline follower and enjoy the ride. Closest point on the spline: helper functions that can check what the closest point on a spline is based on given position.  
     
  11. AggrorJorn
    I downloaded the Saturn tutorial project yesterday to see how the project was holding up after all this time. After some bug fixing and adjusting some of the scenery ingame, I came to the conclusion I really liked the parcours part of the scene. So I thought lets just turn it in to a run and jump game real quick and add it to the winter games tournament.
     
    http://www.leadwerks.com/werkspace/page/viewitem?fileid=616857680
  12. AggrorJorn
    Today I learned a pretty basic but very usefull programming principle. It is about declaring multiple initialisers in a for loop. I am working with a mobile application and speed and memory are more of an issue than on computer right now. My application is finished when you look at its functionality and construction, but it has to be optimized.
     
    Here is a narrowed down example of what I am doing:
     

    for(int i = 0; i < veryLongArray.length(); i++) { DoSomething(i); }
    This is very basic coding right here that can be found in many language.
     
     
    What I didn't know is that you can declare multiple initialisers. It is very simple but has increased the speed of the for loop (which is pretty huge) immensly. This is how it looks now:

    for(int i = 0, j = veryLongArray.length(); i < j ;i++) { DoSomething(i); }
    By initialising the j variable at the start of the for loop, we can save a little time. Instead of checking the length every loop we can simply refer to the j variable. ofcourse you can store the length of the array outside the loop as well, but this is so much nicer. One catch though: If the length of the array is dynamicly changed during the loop, then you shouldn't be using this.
     
    So simple, yet, I have never come accross it before.
  13. AggrorJorn
    Leadwerks
    It has been quite a while since I have been active on werkspace or with Leadwerks. Still, even after working with severall Engines and Frameworks, I allways come back to Leadwerks. I don't know what it is. The coding? The Visuals? The ease of use? The lighting? Anyway, I had some time of, since homework was fairly quickly finished. Spare time has been scarce so I am glad I can finaly make some time werkspace...
     
    Year 2
    Year 2 of Game development is an enormous improvement on the first year. First of there are the team projects that are more interessting. Working with XNA, Kinect, Android, Motion Capture and Unity was a lot of fun. I learned quite a lot of new programming skills. Not perse programming methods, but more algorithms and terminology.
     
    Algorithm and Data structures
    Take for instance my class: Algorithm and Data structures. A very interessting class. It is so satisfying to finally understand what some of advanced programmers on this forum are talking about. Some interesting subjects are:
    Big O (Log N, Log(1), O(n) )
    quick sort, merge sort, swap sort, other sortings,
    Dijkstra (Check out the clickable flash demo beneath)


    http://aggror.com/images/showcase/dijkstra.swf
    Binary treas (huffman coding)
    Stacks
    Heaps (Hof)

    AI
    Last month we started with Artificial Intelligence. Wow, a whole new world of programming opens all of the sudden. The A* pathfinding lesson was very interesting (hence the new video tutorial about pathfinding). I am also looking forward to Flocking, Boids, steering behaviour and Learning AI's. And who knows what kind of new tutorials this might bring along.
     
    I still have a lot of inspiration left from Marley's ghost AI grid and Flocking system, Pixel perfect's 'stranded' showcase and Josh's Navigation mesh generator. Flocking and steering AI (wouldn't a race game with enemies be fun?!?) is up for the next 2 months. I will keep you posted on the cool parts.
     
    Aggror
     

  14. AggrorJorn
    As of next year I will be studying Game development in Amsterdam This is going to be awesome!
     
    At the moment I am taking an extra course math. Although it is really tough, I really enjoy it! (in contrary to most of my surrounding living organisms.)
  15. AggrorJorn
    So now that game week is over lets have a look back at how things went.
     
    Game play
    Gameplay itself was done really quickly. The idea for Lenga is basically Jenga with a twist of colors. I thought of creating an AI that would remove blocks based on a calculation. However I though it would become really boring. So instead I let the player remove a block of a specific color.
     
    Scripts on the wrong entity
    At some point during testing I came across a script error. I lost a good hour trying to figure out what I was doing wrong in my script, but as it turned out it was something else: a lua script was somehow attached to a different entity even though I never attached a script to that object. It did turn out that I am not the only one experiencing this.
    http://www.leadwerks.com/werkspace/topic/7275-script-properties-showing-different-script-properties/
     
    Lua script editor
    A very annoying thing about the Leadwerks 3 script editor is that every new line starts without any indenting or tabs. This is really frustrating. Whether you enter for a new line or when you want to move your function one line lower. It breaks the flow and you are wasting a lot of time making sure that every line is aligned correctly.
     
    Physics
    The performance of the physics is just bad. There is not much else I can say about it. The newton 3 demos that you can play show a lot more physics activity and that without any fps drops or weird behavior. On my laptop I can barely run the game (For the record: I can play GTA 4 on my laptop). As soon as the tower falls over (24 blocks), the game slows down to 3 fps.
    After the game was finished I recreated it in C++, just to see if the physics performance would be better. Unfortunately that is not the case. I even went back to Leadwerks 2 (with newton 2) to do the same test. The performance is so much better. I can have 200 boxes in a tumbling tower without any fps drops.
     
    I am 100% certain that there is something wrong with the integration of Newton 3 into Leadwerks 3. Ofcourse this is really difficult to pinpoint but it sure is a showstopper. It isn't the first time this happened in a project with Leadwerks 3.
  16. AggrorJorn
    So school time is over. I graduated from the Hogeschool of Amsterdam as a Game Developer which means I can officially put 'ing' (from engineer) in front of my applicant name. Now that the 'study' period of my life is over (although it isn't really, right? I mean when do you ever stop learning!) it is time to get a job and start earning some money.
     
    Guerrilla Games
    For the past 6 months I did my thesis internship at Guerrilla Games. Which was awesome. I was surprised at first that they offered me a internship and being it was an opportunity of a lifetime, I gladly accepted it.
    I spend most of my time on research rather than doing programming. But still, I spend a solid 2 months digging myself in to the engine, tools and what not the company has been developing over the years. Overwhelming, insanely complex and mesmerizing at the same time, I slowly began to understand the enormous process of making a AAA game. How they are able to produce games like Killzone is, from my point of view, a pure miracle.
    I did gain a lot of new experience in C++ since I was stationed between the Game coders. Working with Game designers was a lot of fun since I never ever worked in a team before which had team members which had such focused tasks. I met some very cool people along the way. One of them was John Gonzalez, who was the lead writer for Fallout New Vegas. It was so inspiring and awesome to have such people surrounding me. Also really cool: the building was located in the centre of Amsterdam near a beautiful canal.
     


     
    Looking for work
    So with a certificate in my pocket and a cool intership on my resumee it is now time to start seeking a job. Game developer jobs are not super scarce but it is not that you get a job without making any effort. I have yet to send out my first job applications but remarkably I did get a lot of offers to work as a software developer or web developer. That is kind of motivating and I am sure that if a job in the game development stays out, I will go for one of those. But my passion lies with games and a job in the game industry would have my preference. We'll see how it goes..
     
    Tutorial project Saturn
    In the mean time I am busy on my own project as well as a new tutorial series going under the name of 'Project Saturn'. The idea here is that we make a playable level and in each video we see the development take a direction. Nothing is really predetermined in to what kind of game it eventually should turn out to be. All assets and scripts needed for the tutorials are either created during the tutorials or they are already part of the Leadwerks SDK. If you have some nice gameplay mechanic that would be a good idea to add, you can leave a comment. Maybe it is something we can add if it is not to massive to implement during a video.
     
    See the first video here:

     
    Jorn
  17. AggrorJorn
    The last year of my Game Development study has already started. With only one year to go it is time so look ahead and view the possibilities that are available.
     
    Focus
    The coming 20 weeks I am following a minor in advanced software engineering and Game Technology itself will be put in the background. Game development will mostly be something I will do in my spare time. I thought that this year would be really busy one but so far it has been very quiet. The focus of the minor lies on Java, the Spring framework and web applications. I don't have much experience with those so that might come in handy for later. After those 20 weeks I will start my graduation trainee ship, although I first have to find a decent company where I can actually learn something.
     
    Starting a career
    I am a little nervous about comes after finishing my study. I could study further if I wanted to, but the experience I have had so far is that you just have to sit down and make something. Especially if you have someone (either friends or colleagues) that can help you develop your skills. I want to start my own game company but I do have a small college debt that I need to pay of first. So most likely I will start seeking a job withing the Gaming or Software industry.
     
    Projects
    My main project is still in combination with Leadwerks. Especially now that terrain has arrived I can really test out my work that I have been preparing for it. Progress has been going really well, although actual gameplay is still really far away. My game will be playable both singleplayer as multiplayer which adds an extra level of complexity and delay to the development and gameplay.
     
    Tournaments
    It is really nice to see more activity and interest with the Leadwerks Tournament. Although it can be really difficult to actually make something work in the amount of time you have available, it can be just the push you need to produce something. I have to admit that I was very enthusiastic about a themed tournament but in the end it didn't really helped much at all. Anyway, the third tournament will be a big one and has yet to be announced. The prizes will be even bigger and the length of the tournament will be extended to 3 weeks.
     
    Tutorials
    I haven't made a tutorial in a while although I do still want to make at least one of them (Particles). When the terrain has had some patches and/or new features, I will make some videos about that as well. I have created a nice little Tower defense game entirely with Lua. This game will be rewritten from scratch in a large video tutorial set. I am thinking of making this a paid tutorial set, which I can make available to users for a small fee. I have yet to see whether this is worth its time, but experimenting with it can't hurt.
     
    FlowGUI
    Besides the tutorial set, I'm also thinking about releasing FlowGUI as a simple GUI library for like 2/3 dollar. That depends a little on whether people would be interested in it or not. I stopped working on it when Josh announced a GUI editor with the Kickstarter, but since it might not be part of the engine for a while, it might be worth taking a look at it again. All scripts would be freely accessible and could be altered to a persons desire.
     
     
    Let me know what you guys and girls think.
    Jorn
  18. AggrorJorn
    I recently was introduced to a bug in my game. I had 20 AI units and only 19 of them were actively doing something. Number 20 was just standing there. The problem eventually lied in using '#enemies' to get the amount of enemies.
    Here is what happened:
    A lua table index by default starts on index 1. This in contrary to many other languages where it starts at 0. However, you can assign a value to index '0' if you want. Since I use C# on a daily basis, I am more comfortable using the 0 index as a start. As a result this is my (simplified) code:
    for i = 0, enemyCount-1, do enemies[i] = new Enemy() end In the AI script I loop over the enemies like this:
    for i = 0, #enemies-1, do enemies[i]:DoStuff() end This is really basic lua scripting with one tiny gotcha: The '#' is used to get the amount of consecutive keyed items in the list. This I knew. What I did not know, is that there is also the requirement that this order starts at index 1 (or at least not on index 0). It simply ignores the 0 index!
    Here is a full script to try
    local enemies = {} local enemyCount = 4 for i = 0, enemyCount-1, 1 do enemies[i] = "I am enemy " .. i System:Print(enemies[i]) end System:Print("#enemiesCount: " .. #enemies) for i = 0, #enemies-1 do System:Print(enemies[i]) end Output:
    I am enemy 0 I am enemy 1 I am enemy 2 I am enemy 3 #enemiesCount: 3 I am enemy 0 I am enemy 1 I am enemy 2 Problem
    So what was happening? I did get the amount of enemies back, except for the one enemy that was located on index 0. I quickly noticed the lower count of enemies, but since enemy number 20 wasn't doing anything I was also looking in the wrong place. It was actually enemy number 1 that was the culprit, even though it's AI was being executed.
    Solution
    It can be solved in numerous simple ways, but I guess best practice is to just stick to Lua's standard and not assign anything to 0. This can really prevent some time being wasted on absolutely silly issues like this.
     
  19. AggrorJorn
    Something I have never tried before is working with terrain and placing buildings on top of it. The idea is that you can build everywhere on the map as long as the slopes aren't to steep and there is no building already placed.
     
    The Grid.
    Although you have the freedom of building a tower where ever you want, the underlying system still works with a grid system. That means that gridpoints can be tagged as "can not build". It also leaves space between buildings which is nice because I don't have to check for colliding with other buildings. The grid displays cubes for every 2 meters. Cubes on a steep slope are colored red. All the other cubes are green and therefore enable building.
     



     
    Building placement
    I had a little setback when I had this unusual error in C# (see topic). But instead of using a Pick, I now use Camera Project. It doesn't work entirely the way I want it, but in the end it doesn't look bad. You can see a temporary building being displayed in a green or red color (depending whether you can build it on that location, yes or no). Although the building doesn't exactly follow the camera, it is still accurate enough for good gameplay.
     
    Different towers can require more tiles at once. For instance: the most basic tower is a bunker which only takes 1 tiles. However, an other tower (for instance a radar installation) can take 4x4 tiles. Every tower derives from the tower class. A simple multidimensional variable defines which tiles are necessary.
    for instance:
    [ 1, 1, 1 ]
    [ 1, 0, 0 ]
    [ 1, 0, 0 ]
    [ 1, 1, 1 ]
    This tower has a hollow shape: 1 is used for building, while 0 is still free to build something else.
     
     
     
     
     
     



  20. AggrorJorn
    Building selection
    A little update on the building placement. You can scroll with your mousewheel to select a different tower.
    I made the following code to cycle through the towers:

    //Mouse wheel checking m = LE.MouseZ(); if (prevM < m) { selectionID++; if (selectionID > 4) { selectionID = 0; Console.WriteLine("now 0"); } SetNewCurrentTempTower(); } else if (prevM > m) { selectionID--; if (selectionID < 0) { selectionID = 4; Console.WriteLine("now 4"); } SetNewCurrentTempTower(); } prevM = LE.MouseZ();

     
     
    Range ring
    Instead of creating a decal I thought it would be nice to display some rotating meshes to show the range of a tower. At the moment the meshes are not being adjusted by the terrain height but that is something on the to-do list. One thing I noticed was that the FPS dropped heavily when using this range ring. A loop was interfering with the process causing a lot of unnecessary instances being created.

     
     
    Firing towers
    I made a small beginning with the tower's firing mechanism. Towers are now able to lock on to a target if it is within range. The bunker and sniper tower are the only towers with a working firing mechanism. The canon and the flamer use rotation and have extra calculations for damage, rotation and area impact.

  21. AggrorJorn
    Bugs
    Since the last blog I have been spending most of my time trying to find and solve bugs. There is a nasty one which causes a memory error. But it is not always present in every single playthrough.
     
    Firing
    I started working on the firing mechanism. That didn't go as smooth as I had hoped. Especially my particles looked really boring. After a couple of days, I decided to remove them for now.
    Bunkers, canons and Sniper tower can succesfully fire. Rotation and good particles are added later. The main point is that their firing mechanism works.
     
    The sniper tower is the most peculiar of them all. I wanted to make a bullet trail and went for an unusual approach. I created a cylinder, which I align to the enemy that is locked. The cylinder gets stretched as long as the distance between the tower and the enemy. This doesn't work entirely correct but for now I am satisfied.
     



     
     

    WaveManager



    The most important class is the Wave Manager. It stores all the enemies, time counters, waves and subwaves. Adding waves is fairly simple now:




    //Create all the subwaves for wave 1[/left]

    [left]//Enemy, Spawn time, amount, time till next subwave, path object
    SubWave subWave0_0 = new SubWave("crawler", 1, 4, 5, path);
    SubWave subWave0_1 = new SubWave("crawler", 0.5f, 8, 5, path);
    SubWave subWave0_2 = new SubWave("crawler", 0.1f, 12, 5, path);

    //Create all the subwaves for wave 2
    SubWave subWave1_0 = new SubWave("crawler", 1, 10, 5, path);
    SubWave subWave1_1 = new SubWave("crawler", 0.2f, 10, 5, path);
    SubWave subWave1_2 = new SubWave("crawler", 0.1f, 40, 5, path);

    //add the subbwaves to the wave1[/left]


    [left]//time till next wave
    Wave wave0 = new Wave(1);
    wave0.Add(subWave0_0);
    wave0.Add(subWave0_1);
    wave0.Add(subWave0_2);
    wave0.CalculateWaveTotalTime();

    //add the subbwaves to the wave1
    Wave wave1 = new Wave(1);
    wave1.Add(subWave1_0);
    wave1.Add(subWave1_1);
    wave1.Add(subWave1_2);
    wave1.CalculateWaveTotalTime();

    //Create a WaveManager[/left]


    [left]//Extra time between waves, camera
    WaveManager waveManager = new WaveManager(0, camera);
    waveManager.Add(wave0);
    waveManager.Add(wave1);
    waveManager.CalculateTotalGameTime();


     
     




    Sound



    I added severall sound effects, some music and some voice overs. I hope you like them.


     

    Demo



    You can donwload a first demo from the asses store:


    http://www.leadwerks...nt-madness-wip/
  22. AggrorJorn
    Tower defense games are my favorite casual games. The last few weeks I have been spending some free time on playing several of them. Steam had a lot of sales recently which gave me no choice but to buy them. Here are a few:
    Defense Grid: The awakening
    Orcs must die
    iBomber: Pacific

    They are quite addictive and found myself buying a lot of available DLC´s.
     
     
    Mutant Madness
    I want to build a simple tower defense game. That means:
    Build a tower on flat ground
    Tower shoots on enemy
    Enemy dies: you get money for a new tower
    If the enemy reaches your base, you base will get partially destroyed.
    You win the game by surviving all the waves.
    You loose if your base is destroyed.

    There are many things that can be build to improve the simple basics of this game. However, experience has learned that I have to keep it simple. Trying to complete something with easy rules, is complex enough.
     
    Todo
    On my current todo list:
    Building placement on flat terrain
    Simple GUI display
    Tower shooting
    Different enemies
    Steering behaviour

     


×
×
  • Create New...