Jump to content
  • Advertisement
Sign in to follow this  
  • entries
  • comments
  • views

Entries in this blog



Hey all,

So progress on my concept prototype continues. I'm currently using XNA to quickly pump something out as I feel comfortable using it, however since it seems that XNA is dying out, I'll probably switch to something else like SharpDX or Mono Game once I've ironed out my idea.

So what is my idea? I can't think of any game that is played like this (I could be wrong, I haven't actually done any searching on the subject) so I'll just explain it.

Pretty much it will be like a traditional turn based strategy game, where the player and AI will have units of different classes, and the battle maps are broken into squares where units can move a specific number of squares and have specific attack ranges. You all know the type.

The battles themselves will be broken into two phases: Tactical and Action.

In a Tactical phase the user selects where he wants his units to move, where to attack, use skills, etc. However the unit will not perform any action in the Tactical phase, you simply tell your units what you want to do.

In the Action phase, all of your units (and the AI's) then execute there actions all at the same time. I hope this adds a different level of strategy to the game.

Obviously this is a very brief overview of what my plan is and many things will have to be taken into account to make the action balanced and interesting(and fun!).

Anyway that's all for now! back to coding!




Been a while...

Jeeze school work sneaks up on you. I feel so rusty and out of the loop, its not a good feeling. Anyway, I'm currently underway in my 4th year in Computer Science at university and that is eating up the bulk of my time. The other week however I got an idea for a game, A slight twist on a turn based game that I want to try out.

Usually this is where I get all caught up in making a complete game and overwhelm myself before I even get started. Not this time! HA, I'll try a different approach. I'm going to work on my concept first, see how it plays out and THEN worry about the game. What is a game with out a good mechanic to keep a player interested? Nothing! So instead of worrying about art, or story or anything else, I'm going to hammer out this concept first.

The idea is still brewing in my head so I don't have to many details on what the whole concept will be but what I want is to end up with something that is part turn based strategy but yet a real time aspect as well to it. As I'm writing this, I realize this sounds like something along the lines of Valkyria Chronicles, but its not what I am thinking.

Anyway more on the way....stay tuned...




Couple Things I've Learned

I just completed my research project my professor had given me to work on. I am very happy that it is finally done, and I feel I have learned quite a bit from the experience. This was the first project I had done that was outside of standard school assignments or for my own interest so I am proud to get that under my belt. I think I leveled up.

If you are curious as to what the encrypted data is like compared to the original here is a sample pdf file I made to use as a test, and a 'share' that was generated from it:

Here are a couple things that I think are important that I learned that I feel need to be shared or written down for my own benefit:

Comment your own code often and clearly
I thought I did this well, or at least thoroughly enough that I would not run into any issues during the project, but I was wrong. A majority of the time I was working on this I was in school, so while I didn't work on it enough as I would have liked, it was easy to pick up and go whenever I could. However in April I ran into exam crunch time and almost a month had passed between time that I worked on this project. Needless to say there was quite a few WTF moments as I looked over my code for errors or tweaking sections of it and what not and most of my comments made little sense to me. commenting often is not always enough to get by, being CLEAR in your comments is equally, if not more important. Just because you can easily understand a block of code one day does not mean it will as easy in a week or two.

Make sure you understand someone else's code well before using it
I was given some code to use as a base for my project for which I am thankful for. However I learned that its not all benefit when dealing with other peoples code. One issue is like I mentioned previously, if their comments are not clear, you are going to have a tough time understanding whats going on or how they are going about doing it. The person who had written the code used lots of abbreviations with variable names, which is fine since I know the code worked, but in many cases when I was trying to track down bugs and had to step through the code, looking at variable names such as MI and pt are kind of a pain in the ass.

Taking a step back can help
Some times I found myself working on this project for hours straight and would get hung up on a bug or ironing out a certain method. I usually found that taking a small break 15-20 minutes helped me immensely with completing tasks or finding a bug with a fresh eyes.

Finally...test,test,test and then retest twice
I ran into a bug that I had created early, but did not come across until months later and the day before I was giving my professor a demo(Yikes!). If you have read my earlier post, I had mentioned that my project involves Secret Sharing and encrypting data in pdf files. Anyway when I was originally testing my code, I was just using text documents as it was quicker and easier to do. The problem was that shares were created were stored in variables and then reconstructed into a text document. That all worked perfectly fine. So I then moved onto doing the same with pdf files, where my share files would be outputted to pdf files this time, and then I would select which ones I wished to use, read them back into my program and then reconstruct my original document. The problem that I ran into was that reconstruction of my secret only worked if I used shares 1,2 and 3, any other combination would result in gibberish. It didn't make any sense! I went back over to my tests with tests and the code was the same, I would add the shares, and then it would produce the correct secret values regardless of what combinations of shares I used. I was baffled. I was beating my head trying to figure out the problem, my assumptions were that there was an issue reading/writing pdf documents that I did not know about, and spent hours trying to pin point it. Needless to say I came up empty handed. Finally one night when I was losing sleep over this problem, it just popped into my head: The share objects from my text documents were just being directly passed into the object that would handle reconstruction, however in the case of the pdf documents, I had to create new share objects, fill them with the content of the pdf 'shares' and then add them to the reconstruction object. The key issue here is that since they are new share objects, their share numbers were being defaulted to 1,2 and 3, when in reality they should have been any combination of 1 to 5. Without getting into details on reconstruction, the share number is equally as important as the share content in reconstruction and since I was not giving the shares the correct number, this resulted in an error if Shares 4 and/or 5 were being used. In conclusion, since the text document code worked with any combo of shares, I had wrongly assumed the same was true for the pdf shares and simply always used shares 1,2,3 when running my program and continuously over looked such a serious flaw!

These were just a few 'gotcha!' moments that I had over the course of this project, If you have any yourself you wish to share please do so!





I don't know about you, but I am not much of a creative person.

I think it is a contributing reason why I struggle with personal projects as I have trouble coming up with ideas for games. Just now however I have been inspired, or at least have the start of something that I find very interesting. I went to Google, and the 'doodle' for the day was of Howard Carter. If you don't know who he is, he's the guy that was part of the team that uncovered King Tutankhamun's tomb in Egypt. Not a big deal or anything right? I LOVE Egyptian history, I think it is one of the most fascinating subjects in history, and I wish more classes were available at my school because I would take them in a heartbeat.

Now I don't know what kind of game I want to create, but I think having an Egyptian back drop would be pretty neat. Like God of War, but with Egypt as the settings would be amazing but out of my skill set

Anyway, it is a start, we'll see how this goes.




PDF secret sharing

Finally exams are done and I have (barely) survived!

Even though classes are over for me, I am continuing to work on a project for one of my professors, who has an interest in data security/privacy. What the work is, is to attempt to create a program that can encrypt and decrypt pdf files using Shamir's Secret Sharing effectivly and efficiently.

If you don't know what Secret Sharing is regarding to encryption it is the following: We take a 'secret' and generate an arbitrary number of shares from it, which can be then distributed safely accross what ever medium. Individually these shares are useless, but when a specific number of shares, k, are combined, they reconstruct the original secret. An easier way to think of it is say you have a switch to deploy a bomb, however it is kept protected by locks. 5 people have keys for the locks, therefore you need 3 of the people to use their keys to open the 3 locks in order to flip the switch. Read the Wiki for more details on the technique. In my project, each letter in the PDF document is treated as a secret, and split into 5 shares. 5 pdf documents are created to hold the corresponding shares for the entire document and 3 share files are required in order to reconstruct the original document. Reconstruction is done by calculating Lagrange basis polynomials. Again read the wiki for more info.

One problem that arises is that this technique is weak to frequency analysis attacks. This means that characters are directly mapped to a different character. So so say we have the letter 'a' as a secret to be shared then as example the following secrets are generated for it:

Secret 1: b
Secret 2: D
Secret 3: j
Secret 4: 8
Secret 5: y

This seems fine as there is no way someone looking at those 5 shares could figure out our secret is 'a'. However the problem lies in the fact that EVERYTIME the letter 'a' is shared in our document it will appear as 'b' in secret 1, 'D' in secret 2, etc. This is fixed by modifying how we create the shares which now uses the sumation of the degrees of our polynomials as the functions for computing secrets.

Secret sharing is not restricted to text, since to calculate text values, we use the numerical equivilant and share that value, what is stopping us from sharing images and sharing the RGB values? nothing at all! If we take a pixel from an image, and create shares of the R, G and B values of that pixel, our image is virtually destroyed in the shares, and can be reconstructed in the same manner as text is. This is however more computationally expensive as instead of performing one 'sharing' operation per character, we are performing 3 operations for every pixel.

As for the progress of the project, I have implemented the text features fully, and currently am working on image sharing. Unfortunately taking a 2~ week break for exams has made me feel rusty on the project and I REALLY wish I had commented my code better at the time

Anyways, I hope I enlightened you slightly on a strong encryption technique which isn't too hard to implement in code yourself as the computer will deal with all the actual math for you! If you have any questions feel free to ask, time for me to re-aquaintent myself with my code!




First Entry! Good book suggestions?

Hey all!

This is my first entry ever! woo hoo.

Anyway...The point of this journey is a way for me to stay on track in my journey to learn the C++ language (quite the challenge I know!) over the course of summer now that my exams are almost over.

So why C++ you ask? Well in highschool we were taught it breifly, but then we switched over to C# which I grew to love and it is now my favourite language to program in. In university we are taught java, which is fine, but I really want to learn a 'native' language as well as managed, because you never know! Also all this talk about the C++ renaissance has perked my interest in the language. When looking up videos on C++11 though, they talk a lot about things that are changing in C++ and I havn't the slightest clue what they are talking about as it is way to advanced for me currently.

So the game plan is this: Learn C++, Learn 'new' C++ techiques, Learn DirectX, Make games [s]and become rich[/s]. I realise this is alot for roughly 5 months of summer before classes begin again so HOPEFULLY, I'll at least have a solid grasp on C++11 before school in the fall.

The books I plan to read through are the following:
Begining C++ through game programming
Thinking in C++ Vol1, 2 (Seems to touch on slightly more advanced concepts like templates, more STL, etc)
Exceptional C++

If anyone has any suggestions for other books that they have used in the past that were helpful let me know! You can never have to many programming books I say!

So long for now!



Sign in to follow this  
  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!