Sidebar Menu

Projects

  • Dashboard
  • Research Project
  • Milestones
  • Repository
  • Tasks
  • Time Tracking
  • Designs
  • Forum
  • Users
  • Activities

Login

  • Login
  • Webmail
  • Admin
  • Downloads
  • Research

Twitter

Tweets by stumathews
Stuart Mathews
  • Home
  • Blog
  • Code
  • Running
  • Gaming
  • Research
  • About
    • Portfolio
    • Info

Autopsy, a crash and some DirectX10

Details
Category: Blog
By Stuart Mathews
Stuart Mathews
29.Jul
29 July 2019
Last Updated: 29 July 2019
Hits: 2346
  • Running
  • Gym
  • Game development
  • DirectX

Since Animated aliens and alternatives algorithms, I had a pretty good weekend. The reason for this I've determined is because I did what I set out to do. I think it's very rewarding to plan something and then do it. This is especially true if its something that you want to do. I think in this way, planning can be a precursor to a pretty productive and as mentioned here, rewarding weekend. Planning is good.  

I spent most of Saturday learning about 'Dead machine' analysis and a little bit of network forensics. This was interesting and its was important to do because this knowledge is required for my upcoming assignment in which I need to find some hidden information on a hard drive about a planned criminal attack. Getting this work done now enables me to at least start on that assignment, which I think is going to be a lot more difficult that it may seem. Part of the difficulty will be in not actually finding the information, which might be moderately difficult, the difficult thing will be the recording of 'comtemporaneous notes' and then writing up a Crime Scene Investigation report. So I'm glad I got that preliminary work done.

That took pretty much the whole day of of experimenting with Autopsy, Kali Linux and various forensic analysis tools. The remainder of the day, well I thought should be spend sweating. I decided to go to the gym at around 16:00. So I hopped on the train towards Rayner's Lane and arrived probably around 17:00. I decided I'd work on my back and did my back routine. I over strained by upper back but felt that it was a good workout, I was in there for about 1.4hr and had something to eat there afterwards also (after a shower and sauna). I always have the same thing and its changed its name over the years. It was once called a Protein Power Up but now is called a High Protein Plate Salad.

I'm a lot weaker than i used to be now that I only go to the gym once a week but that's OK because I'm offsetting by my 3 days a week running into the office, which is 22.5km run week. I can do more but I think a balance needs to be met because I'm finding the inability to study on the way to work does hamper my progress somewhat. That being said, the 2 days of no running gives me x4 oppertunities to study as its on the way to work and on the way back. I count the ability to study on the train as opportunity to use my laptop. I can't run in with a laptop. 

Sunday was all about setting up getting my Game development prototype using 3D. That was also a all-day affair and I enjoyed every moment of it. I started at about 9-10am and finished at about 22:00 and it was not a dull moment in there. Firstly having read the portions of Game Engine Design and Implementation about implementing a 3D rendering manager, I was well equipped to at least try some of it out on my own. We're using Direct X10 which is 2 version behind the latest however I'm surprised how awesome and inspiring the graphics are that you can render using it. 

I started reading about Direct X a while back and I've picked up bits and pieces of what are the important ideas which has helped me actually find my way through the 3D portions of the above mentioned book. I've also reached out and bought a book on Direct X12 which is considerably less forgiving than its predecessors and having read this chapter on 3d(which uses DirectX10), that is very true. So I've decided to be a little more cautious about my learning and I'm going to start with DX10 and then move to DX11 and then finally DX12 because having reading a bit about all three, the majority of concepts are still the same - vertex shaders, input layouts, swap chains and devices etc., but differ enough to be annoying in how to get these things working. For example in X12, you have to worry about synchronization between GPU and CPU using resource barriers - no so in DX11 and earlier. The benefit is performance. But when you're learning, I think performance is not worth worrying about so I'll leave that when I can skillfully hope between DX10 and DX11. I think that having finished my reading, I can appreciate DX10 now enough to move on to DX11 when I need to and I don't need to right now. 

Basically my 3D renderer doesn't really work at all, I tried to render a 3D mesh and it looks like a spray can exploded but I learnt a heck of a lot getting there:

  1. Input layout is not a scary concept, it just specifies the format of the data you'll be placing in the GPU, namely the format of the struct of the vertex data you'll be sending. 
  2. DX10 is pretty great just as it is and using it to learn the concepts of 3D rendering is more than sufficient.
  3. Its best to start, because starting finishes sooner
  4. I've got a good appreciation of how the DX3D structures work
  5. I know how DX uses COM interfaces as portals of functionality that control buffers such as resources
  6. I know how the swap chain practically works and how render targets interfaces with them and the D3d device - this was really useful and important to feel familiar with.
  7. I abstracted my swap chain and window creation process and this helped me understand how it worked and how complicated the standard setup can be simplified (too much code)

 I decided to buy a 2 books on DirectX10 and one on Game Math. I'm looking forward to getting them:

  1. Introduction to 3D Game Programming with Direct 3D 10: A Shader Approach 
  2. 3D Games Programming: Using Directx 10 and Open GL
  3. Math for 3D Game Programming and Computer Graphics

So, I'll be needing my evenings and weekends...

I went for my Monday morning run today and it was a pretty good one, generally speaking: 

I did have a crash last week, not spectacularly but maybe that's because I got up so quick as if nothing happened - my ego was the most impacted by the slip-up. I basically was accelerating around a corner and it was wet so that's double trouble - a accident waiting to happenn. I did get a little scratch on my elbow and a little bruised on my ankle but other than that I wasn't too badly affected by the tumble. In fact, it was quite exciting to have things happen so quick. You can even see the dramatic drop in speed from around 3'30 to like 9'00:

My spelling there is a bit off - that is the effect of the fall I think. Its a waiting game now if I'll recover my speech and writing to a normal standard!

 

 

Rules then Since then

Details
Category: Blog
By Stuart Mathews
Stuart Mathews
08.Jul
08 July 2019
Last Updated: 08 July 2019
Hits: 5053
  • Math

Since Tuesdays, scribbling and haphazard interaction I've been a little in between things - take what you want your meaning from that as you like. I'm not sure if I've been productive or not but perhaps as I have to say that, its likely that I've not been as productive as I could. Let me work backwards then...

I started reading a a few new books yesterday, one called How to think like a mathematician and the other two are about the history of math which I find quite interesting generally. I also generated a C# Sdk for my investment tracker so that I can start building a nice looking GUI for it in WPF which was the last GUI framework I worked on since working for Citrix while working on Desktop Studio. That work kind of stalled as I fell into the spell of the previous math book, which keep me up until 11pm last night and why my run was so tough this morning. 

One of the interesting concepts about maths is how it came about - is it inherent in the nature of the world or did we invent it to fit our understanding of the nature of the world? I had the opportunity to revisit of fundamental concepts that bad math teachers never teach (because they don't know it themselves or don't see how essential it is for people learning maths to understand how its works, not merely that it does and be done with it) such my favourite concept which I brought up a while back as why a negative take a way a negative is a positive... Remember this:

no, not because that's the rule but because taking away less "lessness" gives your more positiveness. This was nicely explained by representing +number and -numbers are two different types of 'things' that have some sort of inverse relationship ie more +things means less -things and viceversa. You can describe a scenario in terms of these negative and positive numbers by representing the numbers as something else that also have a inverse relationship - Hot Air Balloons. Let me explain:

If you represent Heat as positive number and Ballast as negative numbers, then as these things are inversely proportional concepts to each other (in terms of altitude reached by a hot air balloon - more heat higher the balloon's altitude, less heat lower balloon's altitude and more ballast(weight) less altitude etc ) in the same way that negative and positive numbers share a similar inversely proportional relationship. The way to explain why (-6) - (-5) = -1 is that you start at a ballast of 6 and take away 5 ballasts so you have less ballasts left, so you only have 1 ballast left and a ballast is a negative number and thus -1. To explain (-6) + (-5) is saying you started with 6 ballasts and you're adding more ballasts, you're going to end up will a lot more ballasts, that is a negative number: -11.  The dumb rule that doesn't explain to who how a negative number subtracted from another negative number is that a "negative" and a "negative" is a positive but makes you dumber in the process : (-6) - (-5) as -6 (- and - = +) +5 = -11. But its important that -6 - -5 = -11 not because two negatives makes a positive and you just add the sum - who in their right mind would make rules up like this without the result actually being representative of the actual mechanical process of taking away "lessness" (ballast or negative). Its a tricky concept to grasp always but that doesn't mean that teachers should avoid explaining it. I think my pet hate is rules because they are so deceptive and don't provide you with any substance.

My explanation might stink but its damn well better than a "negative and a negative is a positive". That's a rule and I don't like rules. 

With the missing space in my schedule now that my C programming course is finished, I've found myself a little at a loose end though maybe I've coped just fine...

I also finished by Digital Forensics assignment which was quite interesting and thankfully I'd finished the majority of it last weekend and so this weekend was just filling in the blanks, referencing and making sure my spelling as OK (actually did I do that!?). That also marked the end of the study of English Law with respects to Computing. I've learned so much about it and I'm so much more informed about cyber crimes and how the law approaches them. For this alone, this study was beneficial. Can't much be said for the course I took on CPD which I've decided after a bit thought to abandon as I'm not interested in sweating blood in order to pass assignments - which is what is required. At this level, you can't really pass without being entirely "in it" and so I think I'll stick to what I know and what I'm "in" to: Simply put that Computing and programming. I'll leave the psychological stuff to their respective fields. This also means that I'll have a bit more time to study the more practical aspects of digital forensics which include static file analysis, dead machine analysis and network forensics which is shaping up to be an incredibly interesting 2nd half of the course(and I found the 1st part about law interesting). 

I also finished by Digital Forensics assignment which was quite interesting and thankfully I'd finished the majority of it last weekend and so this weekend was just filling in the blanks, referencing and making sure my spelling as OK (actually did I do that!?). That also marked the end of the study of English Law with respects to Computing. I've learned so much about it and I'm so much more informed about cyber crimes and how the law approaches them. For this alone, this study was beneficial. Can't much be said for the course I took on CPD which I've decided after a bit thought to abandon as I'm not interested in sweating blood in order to pass assignments - which is what is required. At this level, you can't really pass without being entirely "in it" and so I think I'll stick to what I know and what I'm "in" to: Simply put that Computing and programming. I'll leave the psychological stuff to their respective fields.

This also means that I'll have a bit more time to study the more practical aspects of digital forensics which include static file analysis, dead machine analysis and network forensics which is shaping up to be an incredibly interesting 2nd half of the course(and I found the 1st part about law interesting). I got sick of my glasses sliding down my nose when I'm looking down at my keyboard while typing so I found these which are super cool at fixing my specs to my face all snug. Apparently, as the guy at the optometrists said, they use them for sports like bagmington so that's a great vote of confidence from my perspective. I spend most of my day on Saturday not going to the gym. The reason for this was twofold. First I'd gotten pretty sick on the Wednesday (I think it was a bad cherry or I eat my food to quick) which saw me in a bad way for that evening(I won't go into details) and very tender on the Thursday and even on Friday I was a bit quite at work! My headache was I think the worst one I've had before and when I sneezed my head reverberated and hurt. So that kinda made me not want to go running or picking up heavy things that day. So instead I just planned, I planned feeverishly. I like planning.

I planned my upcoming Autumn term which starts in September and which I've really excited to start. Looking at the previous year's timetable, I think we start with Object orientated programming in C++ and Information Systems and then I think I'll only get to Computer graphics and Artificial Intelligence in the subsequent term (the Spring term). I need to brush up on my reading about 3D math around vectors and matrices and well as the coordinate systems soon. I think a lot of these concepts will be talked about but I always find reading upfront makes the teaching easier.

I also planned out how my I'd need to plan my other courses following that i.e making sure I've got enough run way to finish it all in time. That was fun. I'm currently thinking weather I should move houses but this is a priority that's loosing favour - I quite like living in Uxbridge actually. 

I've not really progressed my 2D game project with animation and I feel that this is somewhat dragging and I think a little has to do with the want I have install visual studio 2019 and see how it supercharges my syntax capabilities in the IDE but at the same time I don't want to break my running TeapotWars source code that I got up and running under Visual Studio 2017 and which was not that easy. Game Coding Complete 4 is on the list of recommended reading so I should problem not mess with Visual Studio 2017 (but I can run 2019 at the same time? but I don't have loads of ram) - Welcome to my world of comprimeses?

I also fixed my TouchId on my phone which I'd broken since I'd replaced by iPhone 5S battery. Its actually pretty useful when I'm using my banking apps or lastpass and my password is long so anytime I don't need to type it, the saner I am. So that was nice - I enrolled in my 2 little fingerprints last night. It took a bit of fiddeling to dismantle the device but I'd done it before.

 

Tuesdays, scribbling and haphazard interaction

Details
Category: Blog
By Stuart Mathews
Stuart Mathews
27.Jun
27 June 2019
Last Updated: 28 June 2019
Hits: 2764
  • Programming
  • Running
  • C++
  • Digital Forensics
  • Continuous Professional Development

Since Noughts and crosses and All Bran Flakes, things have been progressing at a much higher run-rate, mostly to do with my computer studies.I finished my C programming course last week and now I have a little more time to sleep on Tuesdays. I got an email from the university asking welcoming me to my next course which is starting in September so I've got about 2 months to complete my current 2 modules. If they could invent more time that'd be great.

Its been a welcome relief because I've been trying to focus on the journey home on my computer to either do some reading around Computer law (tort) and game programming however the latter is still taking a bit of a backseat. The concepts currently being investigated(irony) are :

  • Computer Misuse Act 1990  - Hacking (Criminal)
  • RIPA - Spying (Criminal)
  • Fraud et al (Civil)
  • Intellectual property laws (Civil)
  • Contract Law (Civil)

The contract law is quite interesting because its opened my eyes to a lot of considerations that are routinely taken for granted in forming contacts such as the constituents and requirements that make up a contract such as the qualifying what must be met for it to be legal and correct. Facinating really. It does feel however that there is a bit too much material to cover at times.

That said, I have managed to replace my primitive geometric representations of a Pong ball with pretty images of Aliens ie .png resources loaded into memory instead of drawing rectangles.

I've been somewhat concerned with the entangled nature of the approach being used and which is based on my learning material and I found some time on the train last night to try and untangle what it was that was bothering me about it. 

I have a few problems currently around me representing the game objects as strong, shared pointers in various places and when I unload the objects (in response to unloading the resources from memory due to a level/scene change) the event system is still considering its list of object subscribers to be there/active/alive/current, which obviously would be OK were they weak pointers to the now non-existent objects.

I'm not quite sure I like the architecture that I've been studying with respects to the casual regard it has for seemingly haphazard interaction of the various subsystems ie the graphics rendering system, the scene/level management system and resource management system all implemented as Singletons.

Part of my discomfort is in the seeming difficulty in trying to reason about when effect will occur but I'm wondering if this is a consequence of the concurrent and real-time nature of this type of development and I guess this is really what I enjoy about it: the application of programming in varying perspectives and circumstances. Its also great for practicing. This seemingly uncontrolled and uncoordinated aspect is especially true if you've got a disparate collection of singletons all managing their own subscriptions to the event manager.

What I think is required is a more centralized management of event subscription. Another good idea, perhaps at the expense of future flexibility is the coupling of related concepts which in effect would be OK as that would be increasing the utility and cohesiveness of strongly related components. Decoupling is not always the answer all the time though many people have mantras like this.

I certainly have a lot of regard for how the event management system works under GUI development frameworks such as Winforms, Gtk and Qt for instance. They do quite a good job at managing events. Indeed one of the reasons why C++ is so great is the low overhead in dispatching events however like most things, done incorrectly would diminish any potential benefit.

Was a good day for a run this morning, though although it says my relative effort was 8, it felt a lot higher. 

I ran my fastest 1km and 5km apparently this morning at 3 minutes 8 secs and 20.5 minutes respectively.

 

More Articles …

  1. Noughts and crosses and All Bran Flakes
  2. The Law, Being mental and Data Science
  3. Games, STL, Digital Forensics and a Fedora
  4. C, 64, Triple Black, Resource Management and a Game Prototype
  5. Easter, Heroku, Postmodernism, DataFlow, Math and Software Engineering
  6. Postmodern Software: Embracing complexity
  7. Mountain running and Zebras
  8. Another day in paradise
  9. Wet rain
  10. A rainy day
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28

Page 24 of 182