Jump to content

  • Log In with Google      Sign In   
  • Create Account

Retro Grade



[Development][C++11] Hooded Break!

Posted by , 11 January 2013 - - - - - - · 732 views

I've been working on Hooded, and having trouble.

I don't have a firm grasp of the C++ language.

When I got the new edition of "Teach Yourself C++ in an Hour a Day", I didn't finish reading it. And that was because I wanted to read through the whole book. I got bored eight percent in, and here's why:

I'm pressuring myself. I'm making myself read throughout whole specifications and books about subjects I either already know or only need to know an area about. So, today, I have a new goal:

To read throughout all of the C++11 Chapters of "Teach Yourself C++ in an Hour a Day", and some of the class / template chapters. And the reason why is simple: I already know everything else, and I've already read at least two beginner books about everything else. I do not need to re-learn any basic information, and if I attempted reading the first few chapters, I would bore myself and give up.

This is what I'm enjoying about my new C# book, also. The title is "A Programmers Guide To C#", and it doesn't waste any time with the basics. It goes in depth, using terminology I understand from other programming languages.

Considering how many books I'm currently reading, I am taking a break from Hooded. I am also making some more basic games (Space Invaders, Tetris) using C++ before I move on. I have been having trouble with Hooded, and have concluded that many of my problems stem from an in-complete understanding of C++ and game development.

I'm sorry, however at least I've made a lot of progress over the next few weeks. My next Hooded update should include a player that you can move around!

Cheers Posted Image!


[Web Development][HTML5] Aptana Studio Three File Systems

Posted by , in HTML5, Web Development 26 December 2012 - - - - - - · 1,599 views
Web Development, HTML5, Aptana and 7 more...
As some of you know (I've been starting many of my posts with those words, I do not know why :)) I've recently started doing some freelance web development on the side. I've always used CoffeCup's amazing free HTML editor, however it's lack of support for scripting (JavaScript, Asp.Net, etc.) led me to find another choice. And thus, I came to Aptana Studio Three.

Don't misunderstand me, I enjoy using Aptana Studio. It works great and is very advanced. However, it's a pain to begin using. This is mainly because of it's horrid file system.

For some reason, Aptana studio caused every file you make to be saved as a windows "file". These files are useless, cannot be linked throughout code, and are pretty much pointless. However, Aptana saves your files using this system, and makes it very hard to get around the fact that they, for some reason, enjoy these windows "files" in their programs.

There is a fix, however. When you go to save as, although it doesn't give you the option, type in "file_name.file_extension". The file will be automatically saved by that extension and referred to using that extension.

I honestly believe this was simply overlooked. It is using templates, however, which might be why everything is saved as a "file". It still is trivial to at least provide a drop-down box (Which is a standard windows function. It's almost as if they are trying to save your files with this extension).

Aptana studio is still a great IDE, however. The HTML5 support is amazing. It shows, next to every element, which browser supports it. When you use a tag, it will show you every attribute you can possibly give it, with browser support, of course. The code highlighting is top-notch. Coming from CoffeCup's minimalist design, with no syntax highlighting, it works great. However, the color scheme is very dark and makes the otherwise great-looking interface seem cluttered and dirty.

Another early problem was with projects. They have amazing Pre-Built projects, however the User Interface makes it harder to understand what's in your project. With a small change to the style (Mainly the background color), I believe Aptana would be far better.

Aptana is amazing and perfect for extremely powerful and productive web-site design, however if you are only designing web-sites as a hobby or are still in the beginner stage, it's best to use a minimalist editor (I recommend CoffeCup's Free HTML Editor!).

I hope you enjoyed my article, even if you're not a web developer! Cheers :)!


[Development] Hooded Development #8: Progress! Finally!

Posted by , 23 December 2012 - - - - - - · 718 views

I understand. You're mad at me. I effectively stopped working on Hooded.

Except I did not.

Life has really gotten in the way, however I have a large amount of free time over the holidays. I've spend 10-12 hours working on Hooded over the last few days.

It's made so much progress. It will hopefully be done by the end of December (This Month :)!)

So now, here's some screenshots.

( The reason I'm using Minecraft Art is because I currently don't have my own Tile-Art! If you know / are a pixel artist and would like to work on Hooded, please contact me! We can discuss splitting any profits that come from it! )

Posted Image

So, let me explain. My Map system loaded this file:
20 20
2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 3 1 1
1 1 3 1 1 1 1 3 1 1 1 1 1 1 1 3 1 1 3 1
1 3 1 1 3 1 1 1 3 3 1 1 1 1 3 3 1 1 1 1
3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3
3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3
3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3
3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3
3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3
3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3
3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3
3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3
3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3
3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3
3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3
3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3
3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3
3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3
3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3
3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3

And turned those numbers into a map! Once I finish the Player (and Collision, and Physics) I'll give you guys a game-play video!

Once again, I'm extremely sorry. I tried to keep up development, however it was harder to program with my limited time! I hope you didn't leave :).


[Book] HTML Made Easy (By Paul Browning)

Posted by , in Book 14 December 2012 - - - - - - · 1,109 views

If you've seen some of my last few posts, you might know that I recently started learning web design. Don't worry, I'm still working on hooded. I just wanted something new and fresh, so web design it was. I started with HTML, using HTML Made Easy by Paul Browning. This is my book review. HTML made easy also covered CSS.

HTML made easy by Paul Browning is great. Definitely the best book I could have bought, and it made the language fun, simple, and easy. It all started with HTML.

The HTML section is great. He goes through a chapter explaining to you, with rich formatting including tables and everything the Kindle Fire has to offer. Then, at the end of the chapter, he gives you an example including everything you've learned. At the beginning he keeps everything simple. I love his writing because, unlike other programming writers, he doesn't foreshadow far more advanced topics (I'm looking at you, C++ Primer Plus). He offers a clear concise explanation without the "We'll learn more about this in Chapter 5.2". He makes sure to never get off track from the content of the book.

A great example of this writing style is when he talks about forms. While talking about them, at the end he says (I'm paraphrasing) "Normally, you'd pass this information into a database. That is beyond the scope of this book, and if you'd like to learn more try to get a book on PHP.". This is great. Rather than confusing me, he offers a easy to understand explanation of what I would normally do in this situation, and then gives me the resources to find information. There's no weird code snippets that have PHP just to show an example of databases. The only time he breaks this rule is at the end of the book, when he talks about extending your knowledge with JavaScript and PHP, while giving an example of each.

Another great part of the book is his great know-how of actual programming. The only thing I could frown upon from this book surrounding this topic is him only mentioning PHP as a dynamic programming language. I felt like he was a little too new to the subject to be writing a book about it, mainly because of the fact that the only dynamic programming language he mentions or gives examples of is PHP. He picked the most popular one, rather than the best.

The CSS section is shorter, yet still good. You can still create good websites, however not professionally. Although he doesn't cover <div>'s or <span>'s, those are part of the box model and at the end of the CSS section he talks about the box model, stating that if you want to get more advanced you should do some reading on it.

Overall, the book was amazing. It is a great way to learn HTML, and surprisingly cheap at $3.99. If you want to learn web programming and want a less costly beginner book, this is it. After reading, I still went and read through the HTML and CSS sections of html.net, which definitely helped me get more advanced. The CSS section especially. Although the book is HTML made easy, he covers the essentials of CSS, and nothing more.

Cheers, please tell me your thoughts on the book or web programming in general :)!


[Case] Breakout!

Posted by , in Case 30 November 2012 - - - - - - · 701 views

Wow, it's been a very long time since my last case study! Well now, I'm here to give you a great one: Breakout!

Let's start with the mechanics, as usual:
  • You control a single paddle that can move left and right.
  • There is a 2D array of blocks.
  • The Paddle is at the bottom of the screen, the blocks are at the top.
  • There is a ball that bounces off your paddle, the walls, and the blocks.
  • If the ball hits a block, it will destroy the block, making it disappear.
  • If the ball goes past the players paddle and hits the bottom of the screen, you lose the game.
It's pretty simple, however to help you, here's a picture:

Posted Image

So, this was extremely popular back in the day. What made it so popular?

Well, it was a single player game. At this time, Pong required two players and was very simple. This simply blew people away, and it didn't require someone else.

It also had interesting game-play. Pong was relatively simple compared to this, and this was far more addictive. Failing when you were only 1-3 blocks away was common, and kept people hooked. Newer versions of breakout (Such as Arkanoid, etc.) also had power-ups and more levels, making them even more addicting. Working your way up a steady stream of harder levels, and trying to get the next power-up, still remains fun and challenging. (If you want to try, I've attached DXBall, a newer version of breakout, for you to play :)!)

Polish

This game doesn't really need to be that "polished". The one "polish" aspect of it that I see being important is the GUI, however besides that, this game is fun even with bad sprites/collision detection (In this time period, of course. Back when it was an arcade game and it cost a quarter to play, having buggy collision detection would make no-one play it because you could randomly lose your quarter. Now, however, it's free and having slightly buggy collision detection isn't that big of a deal.)

Implementation

Implementation is very important. If the ball is moving too fast, you can't survive long enough to get rid of all the blocks. If there is too many / too little blocks, your player will get bored / feel ripped off. Level design isn't that important, considering you can really do whatever you want for level design and it still is generally fun to play. The actual core values of the game is important (Like the Paddle Speed, Ball Speed, Amount of Blocks, etc.) however many of the extra things (Power-ups, special blocks, etc.) are nice extras that really help tie it together, yet aren't needed if you can make sure your player is having fun without them.

Fin

Well, I hope you enjoyed it! Keep calm and sneak on Posted Image!

Attached Files




[Structure][C++11] The Auto Variable

Posted by , in Structure, C++11 30 November 2012 - - - - - - · 1,321 views

How many C++ programmers reading this know what an auto variable is. Come on, raise your hand. I count 1... 2... 3... Almost all of you!

However for those of you that don't know the basics of the new standard yet, auto is a new variable that works like this:


Code:

// Hooded.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
int _tmain(int argc, _TCHAR* argv[])
{
auto Compiler_Determines_This_Is_An_Int = 5;
auto Compiler_Determines_This_Is_An_String = "I Am A Auto-String";
auto Compiler_Determines_This_Is_A_Float = 3.14;
auto Compiler_Determines_This_Is_A_Char = 'C';
auto Compiler_Determines_This_Is_A_Boolean = true;
std::cout << Compiler_Determines_This_Is_An_Int << std::endl;
std::cout << Compiler_Determines_This_Is_An_String << std::endl;
std::cout << Compiler_Determines_This_Is_A_Float << std::endl;
std::cout << Compiler_Determines_This_Is_A_Char << std::endl;
std::cout << Compiler_Determines_This_Is_A_Boolean << std::endl;
system("pause");
return 0;
}
Output:
5
I Am A Auto-String
3.14
C
1
Press any key to continue . . .


I can't believe it! It's the equivalent of a "var" in other, newer programming languages! It's perfect!

So, what just happened? The compiler used the values I initialized the variables with too set their type. Essentially, an auto variable that's type can be determined by the compiler.


There are some rules, however:
  • Auto variables have to be initialized to a value when they're created.
  • Auto variables can't have their types changed after initialization.
There are many uses for this in advanced and generic programming, however I'm going to talk about it's use for the beginning C++ programmer.

First off, I believe that using this for generic programming is fine, as clarified by Aardvajk.

The problem arises when beginning programmers want to be lazy and use these for everything. That is bad programming practice, and a lazy work ethic. You should know the types of your variables in your program, and using the auto variable because you don't want to memorize the names of the basic types defeats the purpose.

Now, where can I see myself using this variable? When I don't know the type of a variable I'm receiving. This generally doesn't happen very often unless you're dealing with generic programming, in which using this value is perfectly fine.

I also believe auto variables could be very confusing. If someone defines all their variables as auto variables, than I'll have no idea what the type of each variable is. This is especially noticeable in classes with an auto variable in them. If the variable is initialized in the constructor of the class, then I'd have to hunt through your code to find the type. This can be overcome by leaving a comment telling me what type the auto variable is, however that seem to defeat the purpose.

I hope you enjoyed my (now corrected) blog post. Cheers Posted Image!


[Development] SCREENSHOT (Hooded Development #7)

Posted by , 29 November 2012 - - - - - - · 595 views

Posted Image

It's a Screenshot!

Of Grass.

That looks like crap.


What you're seeing right there is an image of grass that my Tile System loaded from a file.

The Tile System is currently in the process of getting scrapped and rewritten, so there you go. Isn't it amazing!

I hope to load more tiles, and show you a big array of different tiles, soon. However, on Black Friday I got a new monitor (Which I'm using right now). It was hooked up today. I'm going to be gone on the weekend too, Posted Image! I feel terrible, I want to stay and program, get some work done, however life keeps on getting in the way. So enjoy the screenshot. Also, as of now, I am looking for an artist that would like to do some Tile / Sprites. I'll put your name on the credits, etc., yet the game won't be sold, so there will be no profit. No pressure, however just look at that crappy grass!

Sorry about the crappy screenshot. I'll hopefully have some new code to show you next week, that's shiny and fun Posted Image!


[Development] Hooded Development #6

Posted by , in Development 18 November 2012 - - - - - - · 796 views

I know, I know, you want screenshots. However very unfortunately I am away from the computer all of thanksgiving week, so you'll have to wait.

I haven't been very active recently, and I'm very sorry. I've had many things to do recently, however I've freed up a lot more time this coming month. I hope to have a fun game (albeit not a finished one) within this month. To keep my mind thinking (And to learn C++11, the only book I've ever used was published 15 years ago Posted Image (I'm not kidding)) I just bought on my kindle "Learn C++ In An Hour A Day". I was very sad when I found out the new edition was the first one not co-authored by Jesse Liberty, because I enjoy his writing and was kind of scared this wouldn't be as good. I'll probably end up giving you guys a review soon, however it's looking good so far.

Also, Here's how I'm handling everything:

structs / enums

For example, I'm going to have a "Tile" struct. That will mean my vector of blocks I'm using for the board will be made of Tiles. Each Tile has a TileType (Enum), a position on the board (In X / Y, mainly to simplify collision and movement.)

The reason I'm doing this is because, well, it's simpler. I realized It's going to take many frames to play my animations (spritesheets), so I should have an Enum that holds the players current action. For instance, if the player is currently in a "Jumping" state, I'm not going to let them "jump" until they are in a "Standing" or "Walking State". This will make it so much easier to handle the players movement than the system I was originally going to use, so I'm happy that I thought of doing this. There's many more examples than the two above, however so far I believe this strategy will pay off.

Overall, I'm extremely sorry about no screenshots. I'll get you them, I promise.

Also; I just finished Portal 2 yesterday. Lots of fun was had, and I loved the characters. Now I'll get back to being productive Posted Image!


[Development] Hooded Development #5

Posted by , 04 November 2012 - - - - - - · 623 views

Hello guys! This is another Hooded development post, so here it goes:

I haven't started refactoring yet. This weekend I was away from the computer, however this week I'm officially starting refactoring. Here's my official project scope (For you people who want to know how far along I am!)

SCOPE:
+Swords
+4 Enemies
+Loading maps
+Platformer Elements
+RPG Elements
+Tile Based

I'm making all my code centered around this feature set, however I'm also trying to make it more expansive in case I want to add Bows or More Enemies.

Expect the first screenshot in 1-2 weeks!


[Intro] It's Halloween! What are you dressing up as?

Posted by , 31 October 2012 - - - - - - · 489 views

Hello everybody! Here in the U.S., It's Halloween! So, what are you dressing up as? I'm going as a nudist on strike (Look it up Posted Image!)








PARTNERS