Comparative differences between games design and simulation design - Part 8: Learning new coding languages

Learning new coding languages 

Introduction

In my time within my new job, I was given one of my first projects that orientate around me having to learn and make a project using a program.  Although, I can't talk about the project itself, what I can talk about is in regards to what I learnt and re learnt with the project and my skills.  My skills are not specifically based around the necessary skill set, it was a useful way to push my skill set and learn something new.

My past

So my past orientates around the usage of coding with three separate languages specifically for certain projects or units that i had to teach specifically or cover.

I taught python to level 2's coding specifically in orientating about learning the basics of coding with developer structure and also to cover the main areas of coding necessary to progress onto more complicated languages.

I also had a year of C# language development orientating around console coding and 2D level design in XNA developing a framework to design and create a 2D side scrolling game where the player has to jump around enemies to get their assignment into school.  Learning about parallax backgrounds, use of animation and mechanics from the perspective of a developer.

I also taught / worked a couple of years on C++ in two different aspects.  1 year was to relearn C++ from the ground up and then develop those skills into a C++ Framework for games design.  With some aid, I developed a DirectX 9c framework to build on and then developed a side scrolling game with enemies and a menu systems.  Then when working with unreal (UE4), I used the visual scripting API to work on and develop some tools such as scripting of loading and optimising an open world, as well as developing a AI enemy to hunt, stalk and kill the player using nodes.

Context of project and The new language: Java

So the context of the project is to collect data from two sets of sources, the data needs to have information extracted, held until a command is made and then calculation is done and the results are posted to a web server.  When initially working with this, I immediately looked into two languages specifically based around web servers which is C# and Java.  I was provided a mentor whom suggested Java due to the allowance that some aspects of my program would be based around servers and JSON and with that, i went away and started to learn how to work with Java and how I can work with it to collate data going from the first step that all devs go with, the hello world statement.

The project itself was a short development cycle (3/4 months) with the aim of having a program that fit the criteria and within that time, the idea was to also develop / de-rust my skills and abilities whilst learning the positives and negatives with working within a team to create a product used to answer a question.

What I learnt / re-learnt


Variables

Variables were interesting to relearn with Java is that the formatting of variables uses both a lower case and upper case of declaration which was the hardest thing that took the longest time for me to understand and get my head around.  It was dumb as the issues was affecting how the program was error-ing against me in regards for this which mentally gave me a negative feeling specially when I had to go and ask for some aid. That however is nothing to do with this.

A good process that I learnt is to go comment pseudo coding when writing out what i want to do step by step.  Once that's set then slowly writing with the goals in hand became incredibly helpful in speeding the development along.

TCP Connection Reading

TCP was the first massive hurdle that I found to be a major issue, Having to make a connection to read a port number that will have raw data coming from it and then process that data and convert it so it can be easily understandable and processable for the program and not clog up the memory to make it crash.  I initially set up and had it crash constantly as it wasn't listening properly, then I had locked the ports several times as well as i accidentally tried to communicate and listen which is a bad move.

Word to the wise, if you try to speak and listen on a single port... it will not work at all and can lock up your network.. It was not fun trying to fix that issue.

When networking, i think any information in that area for server communication is beneficial but they information is very difficult to find and only place i found stuff was mostly stack flow which can have issues.

JSON Object

So JSON was an interesting process to learn.  JSON was a weird structure to get my head around but it makes sense especially when sending data or using search engine tagging.  Within our system, I used a json object to provide the necessary data out of the project.  JSON is interesting as it's a tag that holds whatever data is important in a way that it can be used with anything that reads JSON and can easily read that data.

I specifically used a JAR library as well as with Java, it's incredibly helpful to have 20+ versions of JSON libraries.  The one I used is a simpleJSON which means all the coding and setting up is done via the library and easy set up of the JSON object.

I have a good strong idea of what I can do with the game.

Making things public to be picked up by other classes

This was a massive issue, due to how the program was set up, I was specifically designing it to have three processes that was collating, processing, validating and holding for calculations for the process to do the maths when the process is called to give an answer.  In games design, especially within visual coding, it's easy to make things visible and private to that class, this would automatically assume that I when developing code for this project would be easier for me to make sure its streamlined?  Believe it or not, no.  It's weird to describe but when you work with unreal and you understand the process, when you go into the idea of development with a whiteboard development (Text on a screen) instead of a visual script... you forget most things and through development on transferring information, I made a lot of variables public that didn't necessarily need to be made public which if it was made for multiple users would have really caused an issue in later development (if it does).  Overall, i think one thing I will be taking away from this project is how easy it is to make it messy or loud (data transferring from a class to another) but overall it's something I will take away from that project.

How can I affiliate this against Games Design?

JSON

JSON would be so beneficial to holding data about the players within a server or network.  For instance as a observation idea; think of it like a multiplayer game possibly like an fps or a free roaming game where you can see loads of players every so often.

Your players on the server will be held by a set of data tags and locations in the world via stats that gets updated every tick.  A player data especially their clothing and equipment could be kept on a list database and then each player could have a JSON object tag of all the clothing and equipment for each person

so it could be as an example:

<"Player ID": "001", "Name": "Nebby", "hat": "003", "top": "005">

and when the player is in the vicinity of you, the data is transferred to the gamer PC for it to be held so it can call the data and hold it in memory until it's not needed and then call it every tick.  As an overall concept this could be incredibly viable if done properly with the server holding and calling this information all the time.

Unreal And BPs

One thing during the development of my prototype that I found is the idea of coding within a gaming engine and what does the visual script actually do?  Through the process of the project, the idea of stream lining for calling multiple threads working made me see something within the project that is making me curious.  Occasionally via BPs it feels like it's not as responsive or there is a delay which makes me think something isn't right or slowing it down.  After the speed to run 4 consecutive threads via Java for calculations and BP takes times, I'm curious to know why.

I'm going to do some research into this and see if there is a correlation in regards to this and expand on this and see what I can learn.

Comments

Popular Posts