Sidebar Menu

Projects

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

Login

  • Login
  • Webmail
  • Admin
  • Downloads
  • Research

Twitter

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

Mazer Game Design and Network Security

Details
Category: Blog
By Stuart Mathews
Stuart Mathews
03.Nov
03 November 2019
Last Updated: 08 November 2019
Hits: 5440
  • Programming
  • Game development
  • Networking and security

Since I finished my Digital Forensics Course (wrote the exam on the 24th Oct), I've moved on to a new course on Network Security. 

So far,  I've already been disassembling networking protocols using Wireshark from almost every layer within the OSI network stack. This is a similar thing I had to do when designing/debugging the networking protocol I designed in my broker a while back when sending TCP/IP packets back and forth between the client, server and broker, though this formalises the theory somewhat.

I've been always interested in the technical aspects of network routing but now, I'm able to incorporate principles of network design, routing and security into my study which is great. We're using a build of ArchLinux provided by Cisco as part of their CCNA CyberOps and CCNA Security modules, which the course is based primarily on.

I say primarily because I still have to write essays and reports alongside being graded by the CCNA exam subsystem, so there is no chance to escape being assessed on all the material.

I made great progress recently in my understanding of IP routes and routing in general, particularly with regards to layer 3 IP address and subnet calculations and Layer 2 routing is also something I've come to appreciate so far, particularly the Spanning Tree Protocol.

I've also been learning about elements of the Game Design process which is actually quite fun and more recently we've started learning about Unity a 3D C# game engine which makes things ridiculously easy to create a 3D game. It also shows how much is involved in creating a game engine. I'm only touching the surface with my own prototype which is rudimentary at best.

I've been working on my Game pitch for a game I've designed called Mazer. Designing games is a very creative process, something I've not really experienced before and while it's new and interesting, it's also quite tricky because it's not just about development/programming.

I've got to give a presentation on my design-pitch next week. I'm prepared, I've designed a pretty cool game which I think with a little blood, sweat and toil, I can pull off.

It's basically a mix between Pac-man, space invaders, a puzzle/jigsaw and a maze. Here's the presentation/pitch for far:

11/08/2019: I gave the presentation yesterday. It was a bit nerve-wracking talking up in front of the people but I did ok, which for a creative exercise like this - I'm happy with as public speaking is not usual for me.

I've now got to write up a game design spec and then produce a prototype. I've been designing Mazer in my spare time using my C++ game engine prototype but for assessment, I'll be using unity which means I'll need to port my maze generation code into C#, which should be easy. More about that below.

I'm interested now in learning more about quantitative research approaches and sampling techniques, in view of exploiting stuff I've not learnt about before. For example, basic statistics describing populations and central tendency via standard deviation, dispersion and variance might be vastly improved upon using aspects of theory testing via statistical inference which I've not got much experience with. So I'd like to learn more about that.

On Friday(my day off) and Saturday, I spend time reading about the different research strategies including Design and creation (I'll probably use this predominantly for developing my Game idea), Experiments, Case Studies, Interviews, Observation and general Questionnaires in obtaining sample research data.

On the game development front, I've had to cut back on my 3D ambitions and branch off new code base that focuses solely on 2D graphics for Mazer because mazer is basically a 2D maze-shooter-puzzle.

I've implemented a rudimentary algorithm which is not based on the well-known Prims algorithm but my own (dangerous!) 'it-makes-sense-in-my-brain' algorithm to create sub pockets of mazes.

The net effect is a maze-like construction, as Mazer is not really a traditional maze, as it requires you blow your way walls via procedurally generated pseudo-sub-mazes(pockets) in order to make your way towards a destination(see the presentation for the game idea).

So, unlike prim's algorithm and other's like it, I don't need a maze that has a solution (But I'll need two solutions paths for the enemy patrol routes), but something that the player can be trapped in and blow themselves out of!

Here is what my 'Pockets of destruction' algorithm does so far:

Granted, it doesn't look like much now but it proves that the algorithm can generate these kinds of open-closed room systems that I'm after. That little white dot in the middle, well that's the player.

I'm working on the collision detection now as my player can just go through walls like a ghost, which is not part of the game!

My "pockets of destruction" maze algorithm (for now, it basically plops a series of squares down and randomly removes walls):

	auto screenWidth=800;
	auto screenHeight=600;	
	auto roomWidth = 25;
	auto maxRows = screenWidth/roomWidth;
	auto maxColumns = screenHeight/roomWidth;
	
	 vector<shared_ptr<Room>> mazeGrid;
	 stack<shared_ptr<Room>> roomStack;

	for(int y = 0; y < maxColumns; y++)
	{
		for(int x = 0; x < maxRows; x++)
		{
			auto gameObject = shared_ptr<Room>(new Room(x*roomWidth, y*roomWidth, roomWidth));			
			mazeGrid.push_back(gameObject);			
		}
	}

	auto totalRooms = mazeGrid.size();	
	
	for(int i = 0; i < totalRooms; i++)
	{
		auto currentRoom = mazeGrid[i];
		auto nextIndex = i + 1;
		auto prevIndex = i - 1;

		if(nextIndex >= totalRooms)
			break;

		auto nextRoom = mazeGrid[nextIndex];
		auto row = abs(i / maxColumns);		
		auto lastCol = (row+1 * maxColumns)-1;
		auto col = maxColumns - (lastCol-i);

		bool withinRowsRange = row >= 0 && i <= maxRows;
		bool withinColsRange = i >= 0 && i <= maxColumns-1;
		
		int roomAboveIndex = i - maxColumns;
		int roomBelowIndex = i + maxColumns;
		int roomLeftIndex = i - 1;
		int roomRightIndex = i + 1;

		bool canRemoveAbove = roomAboveIndex >= 0;
		bool canRemoveBelow = roomBelowIndex < totalRooms; 
		bool canRemoveLeft = col-1 >= 1;
		bool canRemoveRight = col+1 <= maxColumns;

		vector<int> removableSides;
				
		if(canRemoveAbove && currentRoom->IsWalled(TopSide) && mazeGrid[roomAboveIndex]->IsWalled(BottomSide))
			removableSides.push_back(TopSide);
		if(canRemoveBelow  && currentRoom->IsWalled(BottomSide) && mazeGrid[roomBelowIndex]->IsWalled(TopSide))
			removableSides.push_back(BottomSide);
		if(canRemoveLeft  && currentRoom->IsWalled(LeftSize) && mazeGrid[roomLeftIndex]->IsWalled(RightSide))
			removableSides.push_back(LeftSize);
		if(canRemoveRight  && currentRoom->IsWalled(RightSide) && mazeGrid[roomRightIndex]->IsWalled(LeftSize))
			removableSides.push_back(RightSide);
	        // Choose a random element wall to remove from possible choices
		int randSideIndex = rand() % removableSides.size();
		
		switch(removableSides[randSideIndex])
		{
		case 1:
			currentRoom->removeWall(TopSide);
			nextRoom->removeWall(BottomSide);
			continue;
		case 2:
			currentRoom->removeWall(RightSide);
			nextRoom->removeWall(LeftSize);
			continue;
		case 3:
			currentRoom->removeWall(BottomSide);
			nextRoom->removeWall(TopSide);
			continue;
		case 4:
			currentRoom->removeWall(LeftSize);				
			auto prev = mazeGrid[prevIndex];
			prev->removeWall(RightSide);
			continue;
		}
		
	}
	
	/* Queue each generated game object to be added to the current scene */
	for(auto gameObject : mazeGrid)
	{
	std::shared_ptr<GameObject> cpe = std::dynamic_pointer_cast<Room>(gameObject);
	auto event = std::shared_ptr<AddGameObjectToCurrentSceneEvent>(new AddGameObjectToCurrentSceneEvent(&cpe));
		
		EventManager::GetInstance().RegisterEvent(event);
	}

Still got a long way to go, and still needs to be ported to C# for prototyping but its a start.

Oh, and in other far better news - we won the Rugby World Cup, which really made my day :-)

So proud of them.

I even wore my Springbok rugby jersey at half time (Transported back to my 9-year old self)

 

Thoughts on Creativity And Originality

Details
Category: Blog
By Stuart Mathews
Stuart Mathews
02.Oct
02 October 2019
Last Updated: 02 October 2019
Hits: 2555

I attended a talk recently about creativity. This was with direct reference to undertaking a dissertation or thesis in further academic study. The key aspect discussed was that of creating a new and useful outcome that contributes to the field in which you are in. 

In summary any thing new does not really have to mean the same idea I.e creating a not-been-created-before thing, instead it can merely represent an unpreviously done thing. I think this is key because I for one, usually regard ‘new’ as something like an invention, or theory or something that is ground breaking. It doesn’t have to be this extreme and indeed that is not the limiting definition or outcome of what ‘new’ is to be. 

A newer view, in my opinion of the term ‘new’ encapsulates a more diverse representation of n new, and that is ‘creativity’ and ‘originality’. Doing something in a new way, particularly in a way or in a situation that has not been seen or done before is worthy of being classed as ‘new’. Framing a new means of thinking about a problem, cross referencing it with something not every considered with it before is new. These kinds of creative approaches to research are important and do enrich what went before - because you’re providing a means that hasn’t been done before - its almost an invention in itself - a previously not considered and innovative approach to aspects of your research is something that hasn’t been done before!

In this way, looking at it this way shows that their is enormous scope for research and creativity helps in looking for those gaps that have not been done before.

Here are some examples:

  • Asking questions that bring in a consideration that’s not yet been documented 
  • A way in which you cross-reference your research or compare it to similar research
  • The way you undergone the research process that predisposes you to insights that others would not have had
  • Combination of different perspectives that illustrate interesting and new insights to your study

And as it happens, you can achieve this variety of endeavour, by being yourself and what I mean by that, is by being who you are and representing your characteristics on the research you are undertaking because you are unique and you’ll have interests and insights that should be integrated into how you undertake your research. That by default will do a few things:

  1. Allow you to follow your interests in different and seemingly peripheral things and integrate those into your research and thus making it unique to you and thus a definition of ‘new and unique’ which is what you want.
  2. By investigating those aspects that are close to your heart and characteristics will provide your with motivation as this process will be interesting
  3. You’ll discover interesting things about your research because you are genuinely interested in doing so as it relates to your own relatable ideas.
  4. It will be more fun

It’s really real - being yourself with all your weirdness and uniqueness already by default precludes you to applying those aspects to your study. So perusing this is so important and being original then is a function of being yourself, and that’s easy right?

If the person you are enjoys thinking about abstract concepts, enjoys sports and enjoys social gaming nights - there are wired and wonderful ways that you with your ways of thinking can frame and apply yourself to research just by being yourself and asking questions that you might be interested in.

This brings me to my next topic which is motivation, which I believe you have by default when its to do with the things you like and enjoy and the things that make you unique and who you are. What I’m saying is that its not difficult to be motivated if you apply your ideas and interests to your research. Also, I’ve been reading the notes and recommended reading from this talk and a lot of it its trying to be formal in applying ways to be creative and thus by definition perhaps ‘new’ and original when in fact this stuff comes for free and is more organic if you’re up for doing the research in a way that interests you and thus will simulate creativity by default.

In this way, you cannot force creativity and try to learn it so that you can ‘apply’ it to something. Also if you’re not motivated, you really cannot apply creativity to something. What you can do is put yourself in a state of mind that allows your to enjoy yourself and facilitate perhaps a creative atmosphere or environment where you can easily play with your own interesting ideas and thoughts. So these can be seen as trigger mechanisms for creativity, ways to explore ad reflect on your own uniqueness. 

Some examples are brainstorming your ideas, spreading them out on a mind map or just thinking about them in a place that allows you to think differently about them - perhaps think while your in a library, then think while your in a neighbours(new) garden or even while watching a scorcher match or going for a walk. In effect, what your doing is giving yourself room to enjoy your own ideas in different ways, places perhaps to stimulate those ideas with peripheral ideas that stem directly from your surrounds or that come from observations that you make and perhaps having new types of observations of new types of things that interest your can influence your existing interests.

Having said that, you can’t force that either - you just must do what you feel is what you want to do and in doing so, you’re living out your own motivations.

So being interested and motivated and being yourself is already unique and creativity is an extension of that and you don’t have to invent it, if can just be a function of who you are.

What you can do with formal views of creativity is introduce them to your already interested mind. These views are things like asking different questions, thinking laterally, ways for striking new perspectives on what you’re doing etc. For example using the 5W+1H and SCAMPER and ENTRE methods. They wont help you become interested or fascinated or motivate you; you need that by default. They work when you’re already there and need more support. 

So as audio salve once said, ‘Be yourself for that’s all that you can be’ and I think that pretty much means enjoy what you enjoy and if that sounds like you need someone else to give you permission to enjoy what who enjoy - then you’re wrong. You can always enjoy what you enjoy!

 

 

 

 

 

 

 

 

Game Dev, Forensics, Math and stuff

Details
Category: Blog
By Stuart Mathews
Stuart Mathews
29.Sep
29 September 2019
Last Updated: 29 September 2019
Hits: 2899
  • Running
  • Gym
  • Reading
  • Game development
  • Rule systems
  • Presentations
  • Math
  • Software Engineering
  • DirectX

Since Fortune favours the brave, its just over 8 weeks until I need to present my concept for a new game. Something that’s called a ‘game pitch’ in the industry.

We already hit the ground running in the first lecture by discussing an playing a board game designed by one of the course lecturers.

Basically, we had to assess what the game rules were and then play it, and then talk about what makes a game fun or challenging and then discuss how we could make it better.

pic.twitter.com/xV90gGGvTL

— Stuart Mathews (@stumathews) September 29, 2019

It was actually quite empowering because right there you could decide to change the dynamics of the game, throw away stuff you didn’t like and add new stuff you thought was cool. And just to think, we’ve really always had the ability to define what we like or dislike if we take the plunge and take ownership and make the rules - that's the privilege of the creator, and that's something we can do in life too and not be subjected to. Sometimes we just don’t know that we can do anything, we look for permission when the choice is right there in front of you, and only you need permission from yourself. I think that’s what makes creating things so empowering – you’re the big boss dude.

The game was a strategy game like say, StarCraft or Age of Empires, where you have units and they give/take battle damage, gather resources etc. and though I've never been into turn-based games, board or virtual alike, it was fun to be doing something so radically different in a computer lab.

Mind you, at one stage they were talking about 'back in the day' playing dungeon keeper and I'm like thinking instead Doom, Quake, WarCraft etc... I ain't no dice-throwing hippie ok? I did that when I was like 4 and outgrew it, but ok, I can see how it maps to say real-time strategy games that I used to play, so that's fine by me. But dice is old school. 

I got to play in a group of four people (there were 18 of us in total so around 4 groups), three of the people I’d already met very briefly in the pre-course introduction a week earlier.

Although I don’t really know these people that well - what we all have in common is that we want to learn how to create computer games and so we’re not too hung up on ceremony or bureaucracy – we just want to talk about and engage in all things games and stuff that we like.

Ok, we're not yet talking about the physics, the AI, 3D  or even any programming at this stage and that's what I'm looking forward to but the ease of social integration felt great and social interaction is stimulating when everyone is interesting(and everyone's story about why they want to create games is interesting).

During the lecture, we were asked what was our favourite games and I said Kingdoms of Amalur: The Reckoning and the guy next to be nodded in approval and it was awesome because at the break we and some others got talking in the corridor about our backgrounds. It was a good ice-breaker (not like corporate ice-breakers, those are the worst!).

So far, I’ve enjoyed the interaction with like-minded people, even the group work and the lab activities are stimulating. Usually, there is always a disconnect during peer-to-peer activities which I find boring and awkward but this hasn’t been like that at all.  People want and the same thing and are interested in the same thing. 

This one guy was a software engineer in electronics and automation (he had a mofo beard), another was already in the gaming industry making games, another had a Software Engineering background like me, another was a consultant for IBM and others were a mixed bag really. Some were looking to break into the gaming industry, others just fascinated with the tech.

From a practical course content point of view, It looks like there is going to be a lot of content in this course and this course is setup to not only design a game concept but also ‘pitch’ it in front of your peers and then create a game prototype in Unity. All within 10 weeks! Or at least that's only the first module. 

The game design and concept are more a theoretical and creative endeavour and as such will probably stretch me the most, I'm no debater, but maybe I am (sometimes a little variety and change is all your need!), however, there is a series of computer lab work using Unity which we’ll use to implement our ideas which I think will be interesting for those more technically motivated. I’ve not created a unity game, but the scripting engine is in C# so this will be interesting.

I’ve been revising my digital forensics course work each morning, and have therefore started revising for the upcoming exam which is nearly upon me. I got my last assessment back and am relatively happy with the feedback I got around my intelligence report and investigation. I’ve not yet got feedback about my interview but that went fine too.

I’ve definitely got forensics on the brain at the moment. For example, the other day, I was walking to lunch and one of the guys was talking about surveillance and my brain just flashed RIPA (Regulation of Investigatory Powers Act)! I'm also quite relating various computer crimes I hear about in the media to the laws that surround it, mostly unauthorised access, DDOS and fraud, that sort of thing...

With respects to my game dev coding project, I’ve put the brakes on it for now (timing) however I’m at a good position in my knowledge from a technical point of view. I’ve got a solid theoretical viewpoint and understanding of the concepts and having talked to my course director, we’ll be focusing more on OpenGL instead of the DirectX that I've been learning but they are much of a muchness themselves and a lot of what I’ve learnt around DirectX will be transferable so that’s ok and I’ll continue forward with it in the future. My understanding of 3D vectors, affine transformations and Matrices will still apply. So I’m happy about that.

So, while I ease back on the game programming, I have been reading about Game Architecture and Design as this is now required reading for my course.

During the week I caught up on the highlights of the Rugby World cup and this weekend I watch some more.

I Watched a bit of Athletics(World champs) and Rugby (Wales vs Australia) on T.V and I read about the new 43-year-old world-champion walker which is inspiring and well I'm not dead yet! Then again, look at Rodger Federer and Serena Williams as cases in point. Anway, Christian Coleman blew away the competition in the 100 meters but South Africa made the top 4(not bad for a 3rd world country eh?).

South Africa's defending champion in the long jump, Manyonga bailed out, unfortunately, and I enjoyed watching the Netherlands' Sifan Hussain in the 10,000 meters employ a sound strategy, to overcome Kenya's Helen Obiry and Ethiopia's Gidey and become the world champion.

 

Ik ga tijdens de @FBKGamesHengelo mijn Europees record aanvallen en ik kan je support goed gebruiken! Kom je me aanmoedigen? De code: FBKSIFAN25 geeft je 25% korting op je tickets! Koop ze op https://t.co/ejfeZkmUQu.

Tot zondag! pic.twitter.com/gxNwJA5HGf

— Sifan Hassan (@SifanHassan) June 5, 2019

Did some more Digital Forensics, read more of Andrew Rollings and Dave morris's Game Architecture and design"...

Now that I'm thinking about it, I’m slightly apprehensive and nervous about coming up with all the elements necessary to design a game, including thinking about the gameplay, plot, settings, story, interactivity etc. I think a large part of game design is about creativity and artistry which I’m not that well practised in. But this can change.

As with my C/C++ course that I took earlier in the year, I tend to get home around 22:30 on lecture nights but that does give me some time to think about it all on the train back. The other bonus is I tend to get a seat but strangely enough its quite busy around 20:00 onwards. I figure its the people who stay after work for drinks because they are always slightly animated.

That's my gaming endeavours at the moment. I’ve also invested part of my time to learning and defining my knowledge of number theory which has been interesting. I’ve finished reading a brief but excellent survey of Mathematics by A.D Aleksandrovy way of the first part of the book, Mathematics: Its Contents and Methods and Meaning which I’ve found both insightful and interesting. This has sparked a newfound enthusiasm for describing generalities and properties of generalities in things. Obviously quantitative generalities and spatial generalities form the basis of arithmetic and geometry and generalities of functions and dependencies are the basis of analysis. 

I’ve also decided to take a course on Network Security, so that should kick off the month after my Exam and partway into my Games course which should provide an interesting contrast in the subject matter and provide some opportunity for creative time management!

I’m still not running but I’ve compensated by going to the gym before work, which is great and while it does tire me out and make my day that much longer, it does provide the necessary compromise I require.  I’ve been thinking of including a run during the week but so far the balance between being healthy and not getting sick is a fine one, managed only by my perception of sleep fatigue.

More Articles …

  1. Fortune favours the brave
  2. Changing object states and 3D transformations
  3. Autopsy, a crash and some DirectX10
  4. Rules then Since then
  5. Tuesdays, scribbling and haphazard interaction
  6. Noughts and crosses and All Bran Flakes
  7. The Law, Being mental and Data Science
  8. Games, STL, Digital Forensics and a Fedora
  9. C, 64, Triple Black, Resource Management and a Game Prototype
  10. Easter, Heroku, Postmodernism, DataFlow, Math and Software Engineering
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26

Page 22 of 182