Game Development Community

dev|Pro Game Development Curriculum

AFPSK Radar Pack Released

by Robert Fritzen · 03/01/2014 (11:39 am) · 20 comments

So, it's finally here folks! I just sent out the next element of the pack, the Radar Gui. It was a hell-of-a day today trying to get the last bit of polish done on the code and even fixing a few last minute bugs and problems.

Unfortunately, my planned airstrike demo had to get cut, but I left the code in there, pending a fix on the apparent problem here, alas, problems to be handled later on. I'll leave my old screenshots here and two new .gif animations to handle that. And for those of you wanting a demo video, I give you... the demo video :D


So, let's jump into the details! With this pack you get the following:

* Advanced Radar Control: Render a wide variety of mini-maps, radars, compasses, and more with a few easy to edit control options. This radar, while providing many implementations also serves as an extremely useful learning tool that covers mathematics between world space and gui, client -> server interactions, and even ghosting inside the source code.
** Note: I had originally planned to implement a "Circle" mode on the radar, but it is currently incomplete pending the completion of a built in code, I'll probably get that done for V.1.1 of the pack.

* Map Selector Control: Render the complete map and allow the user to select positions and directions from it that can be used to do additional functions, such as artillery strikes :)
staff.phantomdev.net/phantom139/images/ArtilleryDemo.gif


This control also has built in capabilities to render the location of all friendly and enemy objects on the screen while selecting targets, like so:
staff.phantomdev.net/phantom139/images/ArtilleryWTargets.gif

With this pack, I've also included a few code examples that can be used by the radar and the map selector tools for doing different things with them, and there's the always useful documentation that goes along with it to help you set everything up and learn how the inner works of the controls actually function.

As mentioned before, I had originally intended an airstrike example, the code and the model is provided, and pending a fix, it will be ready to go for you guys soon.

So, what does this radar do you ask? Why should I grab this over the T3D Radar Resource that I've seen popping up everywhere lately?

First and foremost, this is a mathematical radar, and compared to the method provided in the resource, which uses a camera render system, performs only using math and gui operations, which is a less costly route in terms of performance.

Next up, since this radar is using pre-defined images, you can create different map backgrounds using your favorite image editing program to achieve looks similar to that FPS Game you want to make the radar look like.

And lastly, that radar's code has everything "scripted" into the engine, where as this radar gives you so much control over how you need it to perform at the exact moment it needs to work, not to mention, you've got the source code to it here so you can learn how everything was made and tune it up to do exactly what you want it to do.

Example: Rendering enemies as arrows in certain times...
staff.phantomdev.net/phantom139/images/T3DRadarProgress_6.png
And dots at another:
staff.phantomdev.net/phantom139/images/T3DRadarProgress_5.png
Now, this code has been quite the struggle to go through and actually implement, and I cannot thank the community here enough for helping me through the tough parts of implementing this new gui, you guys are completely awesome, and I know that my code is very unlikely to be perfect, if you find any bugs in it, let me know so I can get to fixing it. :)

So, as mentioned, Later on today, I'll get a proper video demo done (similar to how I did the DWP demo) to show you the features of the radar in action. And if you'd like to grab the radar, you can do so for $20 here.

So, now that the "hurdle" of code-work for me is done, I'm going to take the next few days off before I get to bug-fixing the prior two releases, and get started on part 4 of the AFPSK a-la carte system, which will be tutorials and samples for game modes including a fully functioning CTF example. Until next time!

#1
03/01/2014 (11:53 am)
congrats on the release..
#2
03/01/2014 (1:30 pm)
Nice work!
#3
03/01/2014 (4:00 pm)
Demo video done and posted to original blog post... enjoy :)
#4
03/02/2014 (6:51 pm)
This is a nice looking radar and commander map.

I was wondering about creating the map images?
#5
03/02/2014 (9:20 pm)
The map layer? Well, all you need to do for that is make an image that has the same size as the size (extent) of your mission area. A good idea is to place reference objects in the corners of your mission, and then fly up in the editor camera and snap a picture that way.

There's probably better and more unique ways of doing so, I'll be sure to explore that as well.
#6
03/02/2014 (11:36 pm)
Damn ... here goes $40.00 ... 8-p

  • Advanced Radar GUI $20
  • Tutorial: Weapon Modelling (Pts. 1-4) & Weapon Design $10
  • Tutorial: FPS Design / Loadout & Weapon System $10
Damn you Robert ... 8-p

Can't wait for the CTF one. 8-}
#7
03/03/2014 (4:02 am)
Thanks for adding the video! I'm really glad you are creating these packs. Torque 3D needs them! Great Work.
#8
03/03/2014 (7:36 am)
@Quinton: lol.... I was wondering why I had like 5 emails when I woke up this morning. :D

@Stephen: Well, it's honestly a lot of fun to work on this engine, there's so much potential in it.

@All: This week I'm going to go back and start working on patches / revisions for the AFPSK releases that have been sent out, so if there's any bugs or something you'd like me to add to the already released packs, let me know.

EDIT: list of current changes and items that will be done is here.
#9
03/03/2014 (10:53 am)
This looks awesome!

Can I ask how intrusive the changes are? Our engine is getting pretty filled up with various resources and core mods, wondering how many of the engine files you have to modify to get this kit working?

If it's not too bad, we'd be very interested - been looking for a top-down level mapping solution for a while now...

Trick for us, is that it has to do interior maps - like as you go from floor to floor in an office building, the map could change to a layout of the current floor (or current deck of a ship as you move about). Then show your player's location as well as AI, in relation to the current floor.

We have each floor saved as a separate file for easy editing outside of the game, they are all stitched together at run-time, so it would not be a problem to fly high up above each individual floor's file and snap a shot to get the map image - we actually already are doing that for our top-down static maps, that show locations you can teleport to, but it is just a flat GUI that is not dynamic... Your kit would be much better since it can show moving players' locations on the overhead map which we cannot do.

The 3D compass/radar resource that's been around for years still works well for us, but its top-down radar doesn't really let us have an accurate background image of our interiors underneath the player dots - so we just have a plain blue background with the player dots superimposed on it. The background image setup that the resource has as an option works OK for an outside terrain, but not for what we're doing, so we're looking at alternatives such as your kit.

What are your thoughts?

Oh and by the way, I think I asked you about GUIs on objects a while back - FYI, I figured that out and they work great in our game now :)

Thanks, nice work.
P
#10
03/03/2014 (11:23 am)
@Paul: Only a few engine adjustments to shapeBase are necessary to get the radar to work. so you're only modifying two files in the core engine.

It wouldn't be hard at all to do multi-layered settings on the radar since the radar is set via setImageLayer() you could just code up a custom clientCmd to change the image layer when it's necessary to change the layer (IE: do a trigger of some form or use a position check on a 'z').

The only requirement for the radar is a MissionArea object, which should be in all of your missions anyways, all it uses that for is to draw a reference frame to convert the world space coordinates into gui space coordinates.

As for rendering AI in relation to your position, you might need to do a little customization of the radar itself to add an element of 'z' checking to the radar. Shouldn't be too hard to do, you could do something like mEnemyOverColor and mEnemyUnderColor and then do some basic calculations of control->getPosition().z relative to shape->getPosition.z and render accordingly.

@All: Update 1.1 is now out for the radar and I was asked in the prior blog about waypoints, well, they're in now. This also includes an option in the map selector to turn selection mode off and instead use it as a full map rendering tool. Lastly, I've added in support for the mNeutralColor option on the radar / map selector and all team0 instances will now use that color to render (unless you're on team 0).
#11
03/03/2014 (11:50 am)
Thanks for the quick response, sounds like it's just what we need.

But one more thing I forgot to ask...

You mention ShapeBase - I may come off a bit newbie-sounding here, but we recently have been playing with a PhysX build of our project, and that has caused problems with ShapeBase stuff (ShapeBase doesn't work like it used to)... I know PhysX takes over ShapeBase somehow, so I'm just wondering if your kit is PhysX-compatible?

Sorry if that's a silly question, but I'm new to the whole PhysX thing - never tried until now because it seemed like it wasn't worth the hassle... But with the latest PhysX 3.3 work being done by the community here, the performance is awesome and the integration looked easier than before, so I decided to try it. Have been very happy with the results, other than having to code in a whole new collision/damage system that is... lol

Cheers
P



#12
03/03/2014 (12:56 pm)
You mentioned in the post other compass types... I'm looking to do a horizontal compass. Would this be suited for that kind of design?
#13
03/03/2014 (2:27 pm)
@Paul: Unless if ShapeBase is completely overwritten by PhysX, you shouldn't have a problem since the edits are only to add object specific fields used by the radar

@Andrew: The radar doesn't work for Horizontal Compasses, however, I could look into adding one to the pack. The pack has a getRotationFromTrueNorth() code built in (It's a slightly modified function from the one discussed in one of my recent threads) which would probably be of great use here..
#14
03/03/2014 (8:51 pm)
@Robert: Awesome job on 1.1 ... gimme ... just kidding. Is 1.1 released on the site yet? Having some issues using my Re-Download Key. 8-{

Please add a horizontal compass ... please ... pretty please ... I'll buy all your packs ... oh wait ... please!!! 8-}
#15
03/04/2014 (7:45 am)
@Quinton: 1.1 is out already, I did the update yesterday. As for the key, Check your email, it's a new system so whatever key was "created" last will be the key you'll want to use. Technically speaking there is no "redownload key" for the pack, it's whatever the last key created was because the key is now pack specific, IE: it works for all pack elements.

As for the horizontal compass, I'll look into it today, shouldn't be too hard to accomplish.

EDIT: Yeah, I think I'll go for it. I'll include the horizontal compass with the radar pack. All current owners will get it free of charge, and no price adjustment on the current pack will be made either (Radar will remain $20). Should be able to finish it tomorrow or Thursday. Any other radar related requests you'd like to see, let me know and I'd be glad to accomodate. :)
#16
03/05/2014 (11:08 am)
I think this should be a step in the right direction ;)

http://staff.phantomdev.net/phantom139/images/T3DHorizontalCompass.png

Radar Pack 1.2 is now out.
#17
03/05/2014 (8:24 pm)
@Robert: Cool ... good job. Thanks for the horizontal compass ... was definitely something I needed and it is greatly appreciated. 8-}
#18
03/05/2014 (10:35 pm)
Wow, Robert.... ya know I had to chime in... NICE WORK. I see how you did this (in fact you might have given a bit more then you wanted to away in the video... for those that get scripting anyway...)

Overall, hey great job! I am really impressed with the time you put in and the effort. Heck, I am probably going to buy this for my next game project just to save me the time and to help me understand how you did all of this.

Really, great work brother.
#19
03/06/2014 (8:41 am)
Thanks Ron, and yeah, the video did show off quite a bit, however it's all in the "fine details" of the control that make it work the way I wanted it to. It was quite the little beast in it's own manner to get it all working but hey, I still enjoyed working on it. :)
#20
03/08/2014 (6:40 am)
Looking good - I spent some time getting one of the resources half-working and dropped it for "later review" - lol. This is great!