Getting Ready for the Big One
by Robert Fritzen · 02/24/2014 (12:51 pm) · 7 comments
First and foremost before I jump into radar talks and my long and tedious pain and suffering through the coding of this, I want to give some statistics about the AFPSK so far.
So, as you know, I started by releasing the Modelling Series about 3 weeks ago now. To the date now, the modelling series has sold 6 units at $10/p, which for me, is a fairly good income, you guys have actually surprised me here, it was one of the parts I thought would be the weakest in terms of selling and yet this community never ceases to amaze me and prove me wrong many many times. :)
The second part to go out was the FPS Design pack which also sold at $10/p and has sold 4 units to the date. I expected this one to say the least as it was kind of rushed out of the door and had a few launch problems, but as I'm going to re-state near the end of today's blog, there will be some updates coming.
Today's blog, is going to talk about the ~1500 lines of code responsible for creating a wide variety of mini-maps, radars, compasses and many more tools in the form of the next AFPSK Component being released within a week from this blog being posted. At this point, it's going to depend on how quickly I can eliminate the remaining bugs in the control, which I am now happy to say, has been reduced to the "minor" level. While I don't have any videos (sorry, I kind of need working AI to get a good video and the latest update to recast eliminated some of the code that my AI used and now the new code doesn't want to behave), and my new AdvancedAIPlayer is still too early in development to be fully tested in a deathmatch, I do have some more screenshots to share with everyone.
Let's start however by explaining the origins of this pack in terms of my perspective. The AFPSK actually started last summer in terms of design ideas, I had just finished up the 2.0/2.1 update to MAP and I still had T3D pack development on the mind, even though I was starting to phase a little bit away from Torque and experimenting with C++ in general to try to lay some groundwork on what would eventually start up my current major project in development, my own engine tech. However, I thought back to the community here and how it still pretty much gave me a good push in the right direction in terms of pack development and with Torque and C++ in general and I decided that I should at least give one last bow in terms of what the community wanted. Seeing as T3D has some very interesting projects out there, mainly oriented in shooter space with FPS elements, I decided to try some FPS concepts out.
I started by playing around with some old resources, namely the Guis on Objects to try to get an idea around my head of what exactly was in the range of possibilities:

And after I accomplished that, I turned my attention to some third-person weapon modelling, and it took me some time to learn it, and after doing a few models, I came up with the idea of writing my own Torque Specific tutorial on making weapons, the resulting AFPSK Modelling Pack came out of that idea. Pretty much at that point, the idea for the AFPSK took off, I could create elements using some of my old Tribes 2 projects that worked with FPS game ideas, and fine tune them using the Source Code. And that is where the idea hit me, let's make a radar, but not any radar, let's make a radar gui that can double up as a wide variety of tools, such as maps, compasses, and many more.
So, I started working on some gui code, and first realized there that in order to get my desired result, I was going to need to dive into the inner works of the engine to create some new functions, especially as they pertained to rotating bitmaps within the gui itself, I got that working and then teased this picture a month or so ago. This was a fairly simply map rendering radar at the point with a few bugs, especially in terms of position and rotation, so I hit the drawing boards and fixed a few of the problems, and got here:

Now, I've got a little arrow on my map. But with a few quick adjustments to the code, and adding in team support from my other addons to the engine, I got down to this point:

At this point in time, I had made the official pack announcement, and set a premature deadline on the radar, and more and more problems began to show themselves, especially with the pesky rotation element of the radar:

Which you guys were awesome to help me with, even though I ended up using something completely different than what was provided in the thread. And after that, I had to take on two sets of problems, and two silly novice mistakes that were solved by both you guys again, and one of those moments where I looked at it and said to myself: "Why am I doing this?". So, after applying many fixes to my code and eliminating a ton of unneeded stuff, I got my radar to this point:

I even went as far to create a brand new background image for my radar which had a darker green tint with a grid background to go with it. Which brought me up to today's work. I now had a radar that would perfectly render the location of the player, relative to the map, and rotation could be defined to allow the map layer to rotate with the player, or to leave it static and let the arrow rotate (as my radar shows), but I was now missing the element of a true mini-map, other players.
So, I spawned a bot using my current code, and sure enough... my code was broken :), so I went back to the drawing boards and redid some code and tested it again, still broken. Ok, so what was going on here. Well, it turns out that you can't use server object id's on the client and vice versa, so I dug through some really ancient resources here and found what I was looking for, the wonderful ghosting index, so I slapped some new code together using that, and voila!!!

As your eyes will likely pick out from the picture, the positions are a little off, and I turned on "TrackerMode" on the radar (Imagine those advanced UAVs from CoD that would show enemies as red arrows (pointing in the direction the player was looking)) and the rotation calculation was off too. The good news though, is the functions are completely separate from the render itself, so that work is finally completed, a few quick fixes on the math side and this radar will finally be 100% done.
So, that ends my journey to completing a very challenging, yet fun to take on task of implementing a radar in Torque 3D. But, I wasn't done there. I even went as far as building, from the code base of the radar a reverse operation of the radar. Instead of doing a 3D -> 2D, I did the 2D -> 3D operation in the form of the second dialog, the guiMapSelector (no screenshots today, next blog, I'll have a demo), which allows players to pick points on the map for, oh, I don't know, artillery strikes... :)
In the next pack release, I'm sending out the Radar, the Map Selector, and two additional bonus goodies.. A Jet model and some additional code to implement a working airstrike weapon that makes use of the map selector dialog. And all of this will be going out for $20. I still have some last minute debugging to do so I don't have an official release date ETA just yet, and I would love to get a video demo out before I send this next AFPSK element out, I'll get one when I finish up.
I have one last announcement to make, and that is regarding updates to the prior elements. I will be pushing some code fixes and updates to the FPS Design pack shortly after the release of the radar, and I will also be looking into anything else that needs to be done regarding the pack in general.
So, that's all I've got for today. I hope you got a good read out of this and I can't wait to send out my Radar for you guys to play around with.
So, as you know, I started by releasing the Modelling Series about 3 weeks ago now. To the date now, the modelling series has sold 6 units at $10/p, which for me, is a fairly good income, you guys have actually surprised me here, it was one of the parts I thought would be the weakest in terms of selling and yet this community never ceases to amaze me and prove me wrong many many times. :)
The second part to go out was the FPS Design pack which also sold at $10/p and has sold 4 units to the date. I expected this one to say the least as it was kind of rushed out of the door and had a few launch problems, but as I'm going to re-state near the end of today's blog, there will be some updates coming.
Today's blog, is going to talk about the ~1500 lines of code responsible for creating a wide variety of mini-maps, radars, compasses and many more tools in the form of the next AFPSK Component being released within a week from this blog being posted. At this point, it's going to depend on how quickly I can eliminate the remaining bugs in the control, which I am now happy to say, has been reduced to the "minor" level. While I don't have any videos (sorry, I kind of need working AI to get a good video and the latest update to recast eliminated some of the code that my AI used and now the new code doesn't want to behave), and my new AdvancedAIPlayer is still too early in development to be fully tested in a deathmatch, I do have some more screenshots to share with everyone.
Let's start however by explaining the origins of this pack in terms of my perspective. The AFPSK actually started last summer in terms of design ideas, I had just finished up the 2.0/2.1 update to MAP and I still had T3D pack development on the mind, even though I was starting to phase a little bit away from Torque and experimenting with C++ in general to try to lay some groundwork on what would eventually start up my current major project in development, my own engine tech. However, I thought back to the community here and how it still pretty much gave me a good push in the right direction in terms of pack development and with Torque and C++ in general and I decided that I should at least give one last bow in terms of what the community wanted. Seeing as T3D has some very interesting projects out there, mainly oriented in shooter space with FPS elements, I decided to try some FPS concepts out.
I started by playing around with some old resources, namely the Guis on Objects to try to get an idea around my head of what exactly was in the range of possibilities:

And after I accomplished that, I turned my attention to some third-person weapon modelling, and it took me some time to learn it, and after doing a few models, I came up with the idea of writing my own Torque Specific tutorial on making weapons, the resulting AFPSK Modelling Pack came out of that idea. Pretty much at that point, the idea for the AFPSK took off, I could create elements using some of my old Tribes 2 projects that worked with FPS game ideas, and fine tune them using the Source Code. And that is where the idea hit me, let's make a radar, but not any radar, let's make a radar gui that can double up as a wide variety of tools, such as maps, compasses, and many more.
So, I started working on some gui code, and first realized there that in order to get my desired result, I was going to need to dive into the inner works of the engine to create some new functions, especially as they pertained to rotating bitmaps within the gui itself, I got that working and then teased this picture a month or so ago. This was a fairly simply map rendering radar at the point with a few bugs, especially in terms of position and rotation, so I hit the drawing boards and fixed a few of the problems, and got here:

Now, I've got a little arrow on my map. But with a few quick adjustments to the code, and adding in team support from my other addons to the engine, I got down to this point:

At this point in time, I had made the official pack announcement, and set a premature deadline on the radar, and more and more problems began to show themselves, especially with the pesky rotation element of the radar:

Which you guys were awesome to help me with, even though I ended up using something completely different than what was provided in the thread. And after that, I had to take on two sets of problems, and two silly novice mistakes that were solved by both you guys again, and one of those moments where I looked at it and said to myself: "Why am I doing this?". So, after applying many fixes to my code and eliminating a ton of unneeded stuff, I got my radar to this point:

I even went as far to create a brand new background image for my radar which had a darker green tint with a grid background to go with it. Which brought me up to today's work. I now had a radar that would perfectly render the location of the player, relative to the map, and rotation could be defined to allow the map layer to rotate with the player, or to leave it static and let the arrow rotate (as my radar shows), but I was now missing the element of a true mini-map, other players.
So, I spawned a bot using my current code, and sure enough... my code was broken :), so I went back to the drawing boards and redid some code and tested it again, still broken. Ok, so what was going on here. Well, it turns out that you can't use server object id's on the client and vice versa, so I dug through some really ancient resources here and found what I was looking for, the wonderful ghosting index, so I slapped some new code together using that, and voila!!!

As your eyes will likely pick out from the picture, the positions are a little off, and I turned on "TrackerMode" on the radar (Imagine those advanced UAVs from CoD that would show enemies as red arrows (pointing in the direction the player was looking)) and the rotation calculation was off too. The good news though, is the functions are completely separate from the render itself, so that work is finally completed, a few quick fixes on the math side and this radar will finally be 100% done.
So, that ends my journey to completing a very challenging, yet fun to take on task of implementing a radar in Torque 3D. But, I wasn't done there. I even went as far as building, from the code base of the radar a reverse operation of the radar. Instead of doing a 3D -> 2D, I did the 2D -> 3D operation in the form of the second dialog, the guiMapSelector (no screenshots today, next blog, I'll have a demo), which allows players to pick points on the map for, oh, I don't know, artillery strikes... :)
In the next pack release, I'm sending out the Radar, the Map Selector, and two additional bonus goodies.. A Jet model and some additional code to implement a working airstrike weapon that makes use of the map selector dialog. And all of this will be going out for $20. I still have some last minute debugging to do so I don't have an official release date ETA just yet, and I would love to get a video demo out before I send this next AFPSK element out, I'll get one when I finish up.
I have one last announcement to make, and that is regarding updates to the prior elements. I will be pushing some code fixes and updates to the FPS Design pack shortly after the release of the radar, and I will also be looking into anything else that needs to be done regarding the pack in general.
So, that's all I've got for today. I hope you got a good read out of this and I can't wait to send out my Radar for you guys to play around with.
About the author
Illinois Grad. Retired T3D Developer / Pack Dev.
#4
02/25/2014 (6:47 pm)
A nice radar. Cool stuff!
#5
02/26/2014 (11:05 am)
I'm going to do a demo video tomorrow of the radar and the map selector, and then finish up ahead of schedule. Looks like I should be done by Friday and have it out on Saturday as it stands right now...
#6
02/26/2014 (9:57 pm)
Hey Robert, are you able to set waypoints to show up on the mini-map? One thing I really like in Planet Side 2 is the ability to setup way points, you have different colored waypoints from squad to company sized ones.
#7
02/27/2014 (8:34 am)
James, that feature is not coded in by default to the radar, but it should be extremely easy to add those capabilities to the radar. The radar offers three built in colors for icons. Friendly, Enemy, and Neutral, each of which you set in the gui options. You could just as easily add code to add additional colors as needed by your own application. 

Torque Owner Stephen
GearedMind Studio