Blog About RiotHQ Archive Contact

Engine recoding, 3d mouse & sliding box collision

August 6th, 2007

Yup we’re still alive …. much recoding continues - this time on a part of the engine that will take account damage meshes when merging tiles. With recoding the programmer has implemented LOD handling as well as new script file structures.

Once coding is done hopefully we will be able to return to work on rioters attacking target buildings and implement squads / move them.

Larger maps also got low FPS due to the amount of objects that needs to get handled when finding out the 3D position of the mouse. Merging the map tiles should increase the speed of this quite nicely, in the mean time we’ve made it so that the 3D mouse does not update in realtime…

As for the robots, we will be using a sliding box collision method instead of the current polygon based collision, this means that robots will adhere to the collision array (collision grid in the tile maker) this will make AI coding a lot easier as the other system allowed robots to sometimes walk/slide within a collision boundary, plus it’ll be much faster.

As it stands on a large map, the Rendering is the slowest part, then the robots and in certain cases finding the 3D mouse can be the slowest, by merging tiles we will(in theory) make the 3D mouse code almost instant and the rendering should be much faster.

welding verts

July 28th, 2007

We think we may have found the cause for some of the slowdown in the engine. It appears that none of the exported models use any shared vertices, this leads to huge vert counts which is as important as poly count. Blame for this snafu is mainly directed at the Panda exporter which our programmer deems “is rather crappy”. To rectify the situation he has included an additional Microsoft DirectX tool - MeshView - (which is part of the DX9 SDK) to our tool chest which allows us to view an object and weld verts.

“You can just drop an .x file onto the model viewer or set it to load with the app, once loaded left click on an object and at the bottom right you can see the tri/vert count, then click ‘MeshOps/Weld Vertices’ the default settings should suffice and click OK. Once done you must ‘File/Save Mesh As’ but when you save make sure the file format is set to Binary .x as this is the fastest to load out of the three and provides a small filesize.”

I still hold some hope that we may be able to deliver the full map experience for the deadline. Initial tests show a reduction of about 50-70% in file size on the welded .x file! So at the very least there should be some improvement in performance.

verts.jpg
X model viewer - cavalry to the rescue?

L.O.D

July 24th, 2007

LOD (Level of Detail) is foremost on the agenda today. We’re going to have another stab at fixing the woeful frame rates. Basically the entire city has monstrous poly counts and along with the other AI loops, checks the P-Units are making - it’s all a burden on processing which is causing the damn thing to crawl.

So one way of dealing with this is to render simpler alternative models the higher up the camera views them - the idea being that the smaller the model appears the less likely you are going to need to a huge amount of detail. Less detailed models require less processing to render. So your frame rates won’t suck so much…(in theory!)

Should that fail - we will have to start drastically cutting down the number of different building types we use. And if that doesn’t work or we are left with a city that’s a little too boring I may just do away with the large single city and take on a ’smaller levels’ approach - while keeping some of the city details.

Also thinking of ways to reduce the texture size and we may adopt a more ‘cartoony’ rendition of the world - using simpler, flat colours - rather than go for the slightly more ‘realistic’ textures that we have been using so far….

Waiter …. there’s a robotic bug in my soup

July 23rd, 2007

From Boing Boing

Various researchers have spent years developing robotic insects, including some that might someday fly through the air, detecting biotoxins and conducting remote surveillance. Harvard University engineer Robert Wood’s robotic fly is the first that’s actually taken off. The 60 fly milligram robofly has a three centimeter wingspan and achieves lift using wing motions modeled on a real fly. Currently, the fly lacks a control system so its maiden voyage required a tether. From Technology Review:

 Files 11588 Fly Robot X220 “Nature makes the world’s best fliers,” says Wood…

The U.S. Defense Advanced Research Projects Agency is funding Wood’s research in the hope that it will lead to stealth surveillance robots for the battlefield and urban environments. The robot’s small size and fly-like appearance are critical to such missions. “You probably wouldn’t notice a fly in the room, but you certainly would notice a hawk,” Wood says. Link

K.I.S.S. = ftp to the rescue

July 22nd, 2007

Yes we’ve been rather quiet over the last few days. This was mainly due to some problems with SVN - we were experiencing ‘inconsistencies’ when updating the latest copies of the game executable. It would work fine on the programmers dev rig but self destruct whenever i tried to launch it on mine.

Anyway FTP (file transfer protocol) comes to our rescue and we have resorted to the old way of just transferring files without assembla and SVN. SVN when it worked was great (for all I know the problem was with me messing something up with the folder structure) and I have yet to contact support with assembla to try to figure out what the problem was, but fact of the matter is we don’t really have the time to mess around and I think we are at a stage where since I only need to make maps I can just email a zipped up map folder when I have new maps to share. When there is new code to download i will go ftp it from programmer’s site.

K.I.S.S - Keep It Simple Stupid!

On a more game-related note - bots can now die. Currently they are vaporised into nothing (and i would eventually hope to have some more exciting animations) but nonetheless it’s immensely therapeutic to blow the little buggers up.

more copyright blurb

July 19th, 2007

In his post about Copyright rights, unregulated uses, and fair use, Erik Heels explains copyright law to a kid on the back of a napkin. Basically there are three ‘uses’ in copyright law

copyrigth

Copyright Rights: are rights exclusive to the copyright owner i.e. only the owner can copy, distribute, make derivative works etc. These rights are protected.

Fair Use: where a 3rd party can use copyrighted works without permission in things like parodies, commentaries or for educational purposes etc because they are considered ‘fair use’ and courts will allow. (Me copying and pasting this from his website is ‘fair use’)

Use of Copyrighted Works: these are unregulated by copyright law. So no permission is required from the owner for you to read a book, watch a movie etc

Check out erikjheels.com

Top cop predicts robot crimewave

July 16th, 2007

Weird but true …. the headline was just too good to ignore. Excerpts from the age.com.au:

Technology-enabled crime was “a new area that’s growing exponentially”, [Australian Federal Police (AFP) Commissioner Mick Keelty] warned yesterday.

A feature of serious organised criminal networks was their ability to be flexible and quickly adopt new techniques, and police forces would have to move quickly to keep up.

… he identified the use of robotics and cloning as future challenges.

“Our environmental scanning tells us that even with some of the cloning of human beings - not necessarily in Australia but in those countries that are going to allow it - you could have potentially a cloned part-person, part-robot,” he said.

Ladies and gentlemen we bring you … robothief

roborob.jpg
Part man, part machine… all criminal

Hmmm…. there’s a game in there somewhere…

sketchup tutorial 01

July 13th, 2007

First of all there are loads of excellent video tutorials available at the official Google Sketchup site - check out the link to sketchup5 tutorials - these are still good. Otherwise you can acces these tutorials by clikcing on tool bar > Help > View Tutorials. Which will take you to the quickstart tutorials. Also most useful is the Help > Quick reference link - which will show you all the GUI details.
As with most software the best thing to do is jump in and play around with it. Sketchup is really intuitive - to start off with you will probably only need to use a few tools in the beginning until you get familiar with the programme… once you master the basics, the sky really is the limit. However for the purposes of this ‘tutorial’ I got lazy - I didn’t really bother trying to make anything but rather just messed about with some shapes to demonstrate some of the main concepts!

1) Some Basic Tools:

skpushpull.gifPush pull. Extrude planes.
skmovecopy.gif Move (+ CTRL = copy). Drag lines and endpoints around.
skline.gif Line. Draw straight lines.
skrectangle.gif 2D Rectangle

2) Useful short cuts:

M (move),skmovecopy.gif
Space bar (select) skselect.gif
Mouse Wheel Button (orbit) skorbit.gif
MWB + shift = pan skpan.gif
MWB + Ctrl = some other kinda panning!
MWheel = zoom in and out

Note skzoomextents.gif = zoom extents handy to pull right back to view the big picture

3) So here we go…

skdemo01.gif

Start with a flat 2d square skrectangle.gif and using the PUSH/PULL tool skpushpull.gif pull up a 3d square. NOTE at bottom right you will see an input box where you can specify exactly how much you want to extrude, And press ENTER to see changes

sknumbbox.gif

Still on the box. Click on a line or an end point / intersection when you are in MOVE skmovecopy.gif mode and you can drag it around. There should be a colored dot to let you know your mouse is on the right place.

skdemo02.gif

Try adding a line (LINE TOOL skline.gif) across the middle of a face. Note Sketchup will ’snap to’ for you in lots of handy places!

skdemo03.gif

and then use MOVE tool to drag one of the edges. The line edge will highlight blue to indicate which edge you are moving. You can select edges and endpoints using the select tool.

skdemo03a.gif

Note how the line you drew restricts what you can or can’t move. Also you can PUSH/PULL skpushpull.gif a plane to alter the new segment you’ve created with the line.

skdemo04.gif

MOVE + CTRL = copy (you can copy pretty much anything)

When you drag SELECT skselect.gif - (space bar for short cut) - if you do it from left to right it selects only the bits you covered entirely, if you select from right to left it selects adjoining faces and lines
(Single, double and triple click achieve different levels of selection within an object)

‘GROUPS’ are good to get familiar with.
Triple click on an object to select all and right click and ‘make group’

skdemo05.gif

Then duplicate (MOVE + CTRL). Then you can make incremental changes without messing up the original. Groups can be moved easier (don’t have to triple click to select) also groups can be rotated using the MOVE tool by click/anchoring on the correct point.

skgroupmove.gif

MUCH quicker and easier then using the rotate skrotate.gif tool IMHO.

You can EDIT a group by double or triple clicking on the area of the group you want to edit. Click anywhere out of the group when you’re done to get out of edit group mode.

You can drag an object by face or endpoint and snap/place it on the face or endpoint of another object so that they fit exactly. Handy when you want to join different pieces.

When moving stuff around you can restrict to a particular axis by using the arrow keys but i can never seem to figure this out (doh) guess i am 3D spatially-challenged. Luckily they have green, red and blue lines to indicate the axis and you can move your object along any of these.

MOVE + SHIFT = constrains movement of an object to an axis.

When extruding multiple objects to the same length e.g. the legs of a table you can match the length of each leg by just placing your cursor over the bottom of the leg whose length you want to match as you extrude from the other legs

skdemo06.gif

You can also extrude by selecting a plane on a 3d object and using the move tool. But this can get fiddly in certain circumstances.

If you want to work in meters or centimeters etc go to window > model info > units and specify what you prefer

skdemo07.gif

Otherwise

skoffset.gif Offset tool is good for bevels / wheels when combined with skpushpull.gif push/pull. Just click and drag. Like so…

skdemo08.gif

If you want to start getting complex go to http://www.giantmonster.tv/ - he doesnt’ really do tutorials but you can figure out what he’s doing by checking out his videos - I found him really good for doing shaped pipes and stuff which is basically a lathe process which uses the skfollowme.gif FOLLOW me tool. Where you define a shape i.e. a circle and then extrude it along a path you create using the e.g. skfreehand.gif FREEHAND tool. But that’s another lesson! Maybe…

Have fun!

plan ‘B’?

July 11th, 2007

As the deadline approaches and with so many features yet to implement I am forced to at least contemplate a Plan B (B for ‘butcher’) and that is to release the game without all the units and, instead of a large single level, use smaller levels. Most of the primary gameplay will be maintained but this of course screws up the sandbox idea, but to meet the deadline (mid August) we have to go with what we got. However if and when the game is completed we can add the missing bits then … but that’s still far from ideal.

I’m thinking that perhaps the cut down version can be released as the free ‘demo’. Eventually when the rest is finished punters will be paying for the full complement of units. But I’m getting ahead of myself and we still have a little time left… but only a little.

site update

July 10th, 2007

It’s been a WordPress day today.

Added a top nav bar - courtesy of the WordPress MenuBar Plugin from dontdream.it - the only customisation required was minor tweaking to a .css file (as per instructions) and it was good to go.

Spent some time messing around with the new K2 theme which is an immensely sweet update of Kubrik (the default wordpress theme) but there were some issues with sidebar widgets and polls not being able to display so I’ve nixxed that until they’ve fully ironed out compatibility issues with WP 2.2.

Put in the Contact page - tried a javascript trick to disguise my email from evil spambots - but WordPress was having none of it so at the end of the day I downloaded the form-mailer plugin from dagon design and stuck in a contact form.

Otherwise added a temporary placeholder image to the top bar to brighten things up a little!