Translate

Wednesday, June 18, 2014

Skylanders Review



Howdy folks, EVA-Kirby here.

Today, I am going to go over a series that came out way back in 2011 and has continued to still be a smash hit today. That series I'm referring to is none other than Skylanders, Activision's latest cash-cow franchise that targets kids with the gimmick of mixing toys (...well, more like figurines) with video games. The biggest surprise is that it isn't entirely a bad experience.

Skylanders is a unique series where it offers the gimmick that "Toys come to life". Indeed, this is true, as the figurines released for this game have technology in them that allows them to be scanned into the game via the series' "Portal of Power", a USB peripheral that scans the figure and its characters' data and uploads it to the game. Any data that your characters gather while in the game, such as upgrades and money, are saved back into the figure so you could take that figure and plug it into your friends' copy of the game without having to lug the game system itself with you. It's a pretty neat idea, with the only flaw being that each figure costs about $10, excluding special variant figures, but if you're used to getting stuff like Lego's (Bionicle and Technic come to mind), this could be overlooked. Each figure plays entirely different from each other, even if the characters might be somewhat related. Take 3 dragons from this game: Drobot, Sunburn, and Spyro, who happen to be an Iron-Man style dragon, a phoenix dragon and... well, you should know who Spyro is by now. However, their gameplay is entirely different: Drobot acts like a SHMUP ship complete with a hover mode locking his shots in a direction, Sunburn focuses on flamethrowers and teleport spamming, and Spyro shoots fireballs and headbutts folks into submission. Not one character is ever the same gameplay wise, and allows for some nice variety.

The story for each of the games varies with each new release, but the basic premise is that there exists an alternate world named Skylands, and you the player have been chosen as a Portal Master to summon the Skylanders back to their home (always due to some in-game dues ex machina sending them to our world) and save the day from whatever evil the game throws at you. It's your typical Saturday Morning Cartoon plot, if anything, but it somehow manages to pull this off well enough so that you won't be groaning at how corny the dialogue can be at times. It also helps that the makers of this series have put a lot into fleshing out various background details of its main characters, which are often supplemented via storybooks. But, since this is about the games themselves, I won't be discussing those here.

So far, there have been 3 seasons of this game released, with a 4th one on its way this Fall as of this writing. The titles are Spyro's Adventure, Giants, Swap Force, and the soon-to-be-released Trap Team. Each game has offered a new gimmick in their figures to keep its players wanting more from each new title: Spyro's Adventure introduces the concept and setting; Giants adds in elite player characters known as Giants, who are used to unlock new features in the game; Swap Force adds in player characters that can swap the top and bottom halves of their figures for an insane variety of attack patterns; lastly, Trap Team uses crystals to allow you to capture boss characters and treat them as playable characters too. We're going to be looking at the seasons currently released, their games, and the figures released with them. Do note, I will not be covering the games not on the console and 3DS versions, like the games for the iOS, since those don't really feel like proper games to me and are more... mobile game-based.

Before we begin, Spyro's Adventure's conception is a bit odd, as originally this was intended to be a Spyro the Dragon reboot, hence why he has top billing in this title. However, due to the popularity of the other Skylanders, Spyro himself (as well as Sparx and Cynder from the Legend of Spyro series) has been reduced to a mix of a Guest Character/Canon Foreigner, not unlike another character named Reiko Kirishima, the main character from the Sega CD game Time Gal who would later appear in Castle of Shikinami 3 in a similar manner like Spyro does here.

The first game, Spyro's Adventure, was released on all major consoles and the 3DS at the time. It should be noted that the console versions and the 3DS version differ entirely that the consoles play like the Gauntlet games (think a beat-em-up) and the 3DS plays like a 3D platformer that each have their own stories. I'll be covering the console versions from here on, since I have yet to play the 3DS titles. The story for this game begins when the previous Portal Master before you, an elderly wizard named Master Eon, is utterly curbstomped by an evil little midget Portal Master named Kaos, who for all intents and purposes, is effectively a more competent Invader Zim (even right down to the same voice actor), and manages to fling the Skylanders to our realm so he can run unopposed to take over Skylands. Naturally, you have to go in and kick his butt.

Gameplay wise, this game displays elements of your average beat-em-up title like Gauntlet Legends and Castle Crashers. You proceed through each level defeating various baddies, solving puzzles along the way, and leveling up your characters along the way in either single player or co-op gameplay. Speaking of characters, this game introduces your basic characters that will be prominent across all the games thus far. Each character has their own attack style and stats, and by gathering experience points and money, you can upgrade your total health and buy new moves for your character. Furthermore, each character has 1 of 2 move branches, where a character can only choose 1 of these movesets to further power up a particular attack, and once you choose a branch, you cannot change it unless you reset the figure itself, so pick carefully. Also included is a VS mode, though it’s at its bare minimum. Considering this is the first title, I feel this could be forgiven.

Giants, the sequel to Spyro’s Adventure, picks up after the first title by introducing a team of Skylanders known as the Giants, who were able to quell an invasion of giant robots known as the Arkeyans 10,000 years ago, but as a result, were sent to our world. Flash-forward to today, and Kaos has returned from the last game to reboot the Arkeyans again to lead them to conquest. Fortunately, the Giants have also arrived as well…

Gameplay-wise, this game is effectively Spyro’s Adventure 2.0, offering a better framerate, longer levels, additional game modes, improved multiplayer, a better range of popular voice actors, and a difficulty level. Toy-wise, the game introduces several new types of figures, including the Giants, Lightcores, and Series 2 figures. Giants are the main feature of this game, as they’re effectively MUCH beefier player characters with better defenses and HP for starters, and they can access many of the hidden areas of levels through varying methods, such as being able to punch down walls, drop through floors, and even pull in islands and ships via their chains through sheer brute strength, and in one case, through sheer mental power. In addition to all that, they also have hardware that illuminates various parts of their body when put on the Portal. Lightcore figures also have this same feature, but instead they are reprints of the smaller figures who give off a smart-bomb effect when first placed on the Portal for any level. Speaking of reprints, the Series 2 figures are reprints of characters from the first game, who not only gain a new power in addition to their normal moves, but they can also swap moveset branches at various points in the game, making them a much more worthwhile investment than their Series 1 version. As one last highlight, all the Skylanders had gained new voice actors, even for ones that hadn't gotten any new figures in this game, and range from popular VAs like Tara Strong, Yuri Lowenthal, and many, many others.

In 2013, Swap Force was released, providing yet another entry into the series. In this game, the Swap Force Skylanders had defended the Cloudbreak Islands, a source of vast magic power used to replenish Skylands’ magic, from the darkness 100 years ago, but upon staving it off, they too were sent to our world, but not before gaining the ability to mix and match bodies due to the Islands’ magical energies. As they finally emerge and head back to Skylands, Kaos returns again, and now it seems he has a new ally to assist him…

This game had made the biggest changes to the game’s formula compared to the last two titles, and to put it simply, it’s glorious. For starters, you can now jump much like in the 3DS games, which allows a lot of stuff to happen due to just one action being allowed, from integrating it into puzzles and platforming, to dodging stuff in combat. When you play Co-op with a friend, both players get the gold and experience points one player gets, so that it doesn’t become a mad dash to get more stuff than your bud. In addition, the graphics had gotten a complete overhaul so that the game’s cutscenes can flow seamlessly into gameplay, and they look as good as many recent CG movies released these days. In addition, the graphics now have a more cartoonier feel to them; for instance, the series’ “Goomba”, the Chompy, looks less like a ball with antennae and teeth as it did in the past and became more goofier, with the teeth losing that ferocious edge on them and the antennae becoming more like those eyes you’d see on Courage the Cowardly Dog’s weirder characters. Altogether, the additions have only made the series look more impressive overall.

Of course, nothing in life is ever perfect, and that even applies to Skylanders. Each game has had numerous flaws in them that must warrant looking into, aside from the huge price tag of the games and the figures. For the first game, SA lacks any real difficulty during the various stages, save for the bosses, which display some shocking surprise difficulty by featuring attack patterns you would expect in the Touhou games: the final boss is especially egregious on that matter. There’s also a lack of replayability once you 100% the levels due to lack of multiplayer modes outside co-op and the limited vs. modes. Also, the Wii version has fewer issues than the other console versions since it was supposed to be the intended version, so there are quite some numerous bugs present in the X360 and PS3 versions, such as some things not loading properly. The only reason you might want to consider this game is if you’re just curious to see how the series started.

Giants seemed to have worked out the difficulty problems and lack of multiplayer modes, but it in turn seems to have generated issues of its own. The main complaint is that it feels heavily like an expansion game rather than a full-blown game, where several levels don’t even have that much impact on the plot, such as when you’re attacked out of the blue by ghost pirates for no reason, merely to pad out the game. There’s also a complaint that some Skylanders got a nerf when making it to this game, mainly due to some figures not getting repose, but also because the developers forgot to try and improve their damage rating from the last game.

And lastly, since Swap Force presented the greatest amount of changes, so too did it open up its own flaws. One of the biggest faults with this game was the inclusion of the Swap Force areas: while they were fun little diversions from the main game, the fact that these were treated much like elemental zones and not optional if you wanted to get 100% in the game was rather annoying, considering you had to buy an entire new set of figures in addition to at least 1 figure from each of the 8 elements if you had played the earlier games. …sure, the idea of buying new stuff for a game is marketing reasons, but it still hurts. Also, unlike the last games, where it introduced only so many side characters but at least saw them make some character development to like them better (as much as you can have for a lil’ kid series like this, anyways), characters are introduced almost with each stage, but forget to actually give them some development, making many of them unmemorable in the long run. Another thing that got hit was the Vs. mode, where we went down from having at least 5 modes with at least 6 stages for each mode… to only 3 Vs. variations with about 3 stages at best. After forcing us to get more characters, you skimp out on the Vs. modes? The heck, Activision, I might want to beat up my friends w/ these new guys, and you only give us 3 stages to work with? Lame, mates.

Skylanders is a fun lil’ series that folks of all ages could enjoy, despite the flaws each game has had. There is a good variety of characters to play as, solid gameplay, and humorous lore to keep folks entertained for a good while. The price tag might seem expensive, but with a series like this, you should worry more about getting figures you happen to like: it’s best to enjoy a game with gameplay that suits you to a T. Of course, my only concern for this series is if Activision doesn’t keep things fresh in a good way; Trap Team’s starting to push it by making items that seem to be required for its gameplay… but it’s too soon to be making accusations. We’ll just wait and see how this will go.

Until next time, See ya!

-EVA Kirby

Wednesday, May 21, 2014

State of Affiairs

Hello everyone!

I apologize for the low uploads these past weeks. I kinda got a bit depressed when I couldn't get my team and I to E3 this year.

I also said I planned to record, but literally just when I started getting into it, my headset broke. So now I can't do commentary until I receive my new one. I could do a non-commentary run, but I've already started playing into Pokemon Ruby on my emulator, meaning I would have to start over if I want to record. Uhm, starting over a Pokemon game? Doesn't really sound very nice.  I could also start recording where I am now, but I dont know about that, plus it just sounds weird. I will think about it.

Speaking of Pokemon, my 3DS doesn't work anymore because it got soaked in soda, and it was far beyond fixing. So, until further notice, I no longer have my 3DS to play on.

So yeah, this what has been happening. I know its a bad excuse, but it has brought my motivation down in wanting to do things. I will get back on a regular posting schedule soon enough.

Until then, have a good day.

~Jelly

Friday, May 9, 2014

OmegaRuby and AlphaSapphire

Good morning/afternoon/evening fellow watchers.

So, as far as I know of, yesterday it was announced the release of the Pokemon OmegaRuby and AlphaSapphire in November of this year. It was also announced by Iwata ( Go here for the whole "Finacial Results Briefing" ), these two games are going to be full remakes, while the trailer...well why don't you just see for yourself?



 I don't know about you, but this news blew my mind. Generation Three was my favorite generation of all time. Contests, Ash collecting, Hot Tubs, but most of all: Secret Bases. That was my favorite feature of that generation, the secret bases. While it has been noted that these games are going to be full remakes, there is the fact that it is going to be "a new adventure" in a "brand new world". This makes me think of two things: They are going to add extra things to it, or it's going to be in 3D like X and Y. Maybe it will be both, but oh man, the thought of decorating my secret base while in 3D gets me excited! So all I know is, if they make any changes, they BETTER not take out the secret bases! Or else...I'm going to be sad. D:

Anyway, in celebration of this announcement, I am planning doing some sessions of me playing Pokemon Ruby. I will update here when I post them up, so if you are interested, you can come watch. If you don't know my YouTube channel, you can check our info page, where it should be listed there.

With that, I hope you have a great day. :)

~Jelly

Monday, April 28, 2014

New Super Smash Bros Pt. 2

Good morning/afternoon/evening fellow readers!

So if you haven't already seen the Nintendo Direct about the NSSB, you can watch and react along with these guys here.:


Now that we are all caught up, let's talk about the awesomeness of these upcoming games. In the last installment of my NSSB, I talked about how they are releasing the game on the 3DS, as well as the WiiU, which was amazing enough as it is. The 3DS will be coming out first, and I believe it will be coming out this summer, while the WiiU version comes out in the winter.

The next thing you will notice most likely when you see the Direct play is how beautiful this game is. Not even going into how crisp, smooth, and HD it looks (seriously though, have you looked at the substitute plushy?), the art direction is just fantastic in this game. They added new stages, and all of them beautiful, the characters look so much detailed, and the backgrounds are just really pretty to look at. I can literally pick up this game, go into a stage, and just gaze as its design for a while because of how spectacular it looks. You can tell that Nintendo put a lot of time and effort into this game, as if it was their little child. Oh Papa Nintendo, you really did raise them well.

In our next installment of NSSB, I will talk about the new and old stages they show off in the Direct, as well as other awesome things in relation to the stages.

Until then, have a great day~! :)


~Jelly

Sunday, April 27, 2014

Construct 2: Fighting Game Tutorial

Hi everyone! How's your week been? It was a busy for me. Finally, landed myself a small part-time job to tide me over for my money troubles (in other words: More games to buy XD), but I'll still be active on my blogs whenever I have chance.

So on that note, allow me to share with you something interesting that a friend showed me that you can make in Construct 2. It's a tutorial you can use to create your own fighting game! Following the tutorial, it's your basic setup on hitboxes, character sprites, lifebars, and directional inputs for move commands for your character. If you ever played with M.U.G.E.N, and used one of Elecbyte's creative tools (Fighter's Factory), it shouldn't be that difficult to see some similarity on how you create and modify your game for your characters. The only difference you'll see is the parameters that Construct 2 offers to make the process a bit easier in developing.


If you're interested in trying it out, just click on the link I provided for the tutorial. If you want to learn more about Construct 2 and how to use it, I also placed a link to the site if you want to download it and try out its free version before deciding wanting to buy the full version of it.

Well that's it from me for now. I'll be sure to drop more news with you guys and provide some more useful stuff that you guys may have interest in gaming development.

Laters :)

Construct 2:
 
https://www.scirra.com/construct2

Construct 2 - Beginner's Tutorial:

https://www.scirra.com/tutorials/37/beginners-guide-to-construct-2/page-1 

Construct 2 - Basic Fighting Tutorial:

https://www.scirra.com/tutorials/468/part3-basic-fighting-game-tutorial-video-series

Saturday, April 26, 2014

Displaying an image with SDL - basic C++ class structure

Today, we will create a simple image displaying program with SDL 2.0 and Mingw. This will help you understand some of the program structure related to C++ and how SDL used objects to render images on screen. We will be making a class to hold our program logic, and using that class to render an image to the screen.

Create header file; this file will hold our class, the one we will be building our program with. With a class, an entire object, with it’s variables and methods, can be encapsulated into a single object, to be used as needed or desired by a program. In our example, this class will run the loop for displaying our image to the screen, and for testing for user input.

Add the two includes at the very top of the file:

#include "SDL2/SDL.h"
#include <stdio.h>

And enter the following to start the class definition: class cpp_Application {

The class keyword will start the class definition for this header file, defining the name for the class as cpp_Application when an object of this class is created. After this definition, enter the next line below and type public: . This will define any method or variable with a public scope, meaning any method or variable can be used or see by anywhere in the program.

On the lines below, define the following 4 methods:

cpp_Application()   //The default constructor for C++ classes
~cpp_Application()   //The default constructor for C++ classes
Int executeProgram();   //Method to run the program in a loop; this method will be called to call all other loops
Int getInputEvent(SDL_Event* event)   //This method takes in a parameter of ‘SDL_Event’ type to check for user input. For this tutorial, it simply tests for interaction with the window.
Then, while still defining the class in the header file, type private: . This will define any methods and variables defined after this line only viewable and usable to this class only. This helps with a lot of the concepts that make C++, such as enabling data encapsulation to protect the data from being altered by another component in the program. In the next few lines in the header file, below the private: declaration, enter the following few variables:

bool running; //Boolean for program execution
SDL_Event    applicationEvent; //Event object for user interaction
SDL_Window*  applicationWindow = NULL; //The window to open and use for our program
SDL_Surface* windowSurface = NULL; //Surface object to be used with window for rendering.
SDL_Surface* testImage = NULL; //Basic bmp image for tutorial use

End the class definitions with };, like any other method. Please remember the semi-colon ‘;’, this tells the compiler that our class definition is done at this point.

Create another file, this time a .cpp file, but name it after the .h file. When this file is opened, type #include “headerName.h”. This line will ‘include’ the header file in the source when compiling this cpp file, looking at it for the definitions and boundaries of the data.  Don’t forget to also include the “SDL2/SDL.h” file as well.

In the cpp file, we add the definitions to all the methods defined in the class in the header file. Starting with the constructor method:

CPP_Application::CPP_Application(void) //Default constructor
{
   running = true; //Set running boolean to true
   SDL_Init( SDL_INIT_VIDEO ); //Initialize SDL
   applicationWindow = SDL_CreateWindow("SDL Tutorial", SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED , 800, 600, SDL_WINDOW_SHOWN); //Create Window for SDL
   windowSurface = SDL_GetWindowSurface( applicationWindow ); //Get the surface for the created window, and return it to a Surface object
   testImage = SDL_LoadBMP( "imagefilename" );
   if( testImage == NULL ) //Tests to see if image loaded properly, if not, then an error message is displayed
   {
       printf( "Unable to load image %s! SDL Error: %s\n", "testImage.bmp", SDL_GetError() );
       running = false; }
};

First note, this method starts with the class name and :: . This is because we are defining the function of the method declared in the class, and ‘::’ tells the compiler that this function’s scope is being defined for that classes method. So every method declared in a class that needs a definition should start with the original classes name and ::.

This first method is the constructor method, which is called first every time an object of className type is created. This constructor method will initialize every variable needed to start this class; in our case, it will set the running Boolean variable to true, initialize SDL with SDL_Init(SDL_INIT_VIDEO), and initialize all the objects in our class by calling the appropriate methods. applicationWindow will be created when SDL_CreateWindow() returns; windowSurface will be initialized with SDL_GetWindowSurface(), that method being passed the already created window for our program. And finally, our image object testImage will be called and initialize with our image file to display with SDL_LoadBMP(). If the image file is NULL, our program tests for this, and ends execution if the testImage is NULL. Note that the window dimensions are 800 to 600, this will e important for our image. Note also our image being loaded is a .bmp file; we will need this format for this tutorial. This image format is easily found in MS Paint, which will suffice for our needs.

With our constructor defined, defining our destructor will be easier. Enter the following:

CPP_Application::~CPP_Application(void) //Default destructor
{
   SDL_Quit();
};

Again, note the class name and use of :: for scope definition. This method simply calls SDL_Quit(), which will end execution and use of SDL and close all objects related to SDL before closing the object itself. Also note the tilde ‘~’ character by the number 1 on your keyboard; this character is specifically for defining a destructor.

The next method to define will give us our program loop:

int CPP_Application::executeApplication() //Function to run when program starts execution, main loop
{
   while(running)
   {
      //Render the image
      SDL_BlitSurface(testImage, NULL, windowSurface, NULL);
      SDL_UpdateWindowSurface(applicationWindow);
     
      //Get the input from the window
      getUserInput(&applicationEvent);
   };
};

The function starts with a while loop, with our running Boolean as a conditional; when this Boolean is set to false, this loop ends and the program with it. While this loop executes, the following methods will be called repeatedly:

SDL_BlitSurface() : Taking four arguments, this method will blit, or draw an image to our surface. The first parameter is our image to blit, the second one is NULL (normally used to define the boundary size for the first parameter), the third parameter is our window surface (the one defined in the constructor), and the fourth is NULL (again, used for boundary sized for the third parameter). This method tells the computer to draw this first image unto the latter image defined in the third parameter.

SDL_UpdateWindowSurface() : Taking the SDL_Window object as an argument, this method simply redraws our window to display our current image.

And the third method called in the loop is the fourth method defined in our class, getUserInput().

The fourth method defined in our class is the getUserInput(SDL_Event) method. This method takes an SDL_Event pointer object as a parameter, which is a way for SDL to check for user input from various devices. When a user event is detected, this method will call to check for what kind of even has happened by calling SDL_PollEvent(event) != 0 . If the event object isn’t NULL, then it is compared to several flags that indicate the current status of the program: in our tutorial, all we do is check for end program conditions, and set the running Boolean to false if the window was exited out of by the button at the top-right.

From here, in the .cpp file, define the main() method below the other definitions. Once ready, simply enter the following code in the main:

CPP_Application application;
application.executeApplication();
return 0;
These lines will define as object of our class by name for its type, and by the name application for its object name. The object name is the name called by the program to reference the object of the class type defined. This object will have its executeApplication() method called, which will start the loop to run the program and display our image. And the last line will return 0, ending our program execution after the loop exits.

With these two files, create and enter a new directory and find the SDL2.dll – you will need to move that .dll into your new directory to make this program, or any program that uses SDL2 to even start up. When you have the .dll file for SDL2 inside the same directory as your .h and .cpp files, start up MS Paint.

In MS Paint, simply create an image of 800 by 600 pixels (or as close as you can) and add whatever colors, text, or drawing you would like to see displayed to the window. Remember to save this image as a .bmp file, so that our program can load it into our Surface object. Save this file in the same directory as the other files, and save it to an easily remembered name, like test.bmp or image.bmp. Before compiling the source code, remember to go back into the .cpp file and add the image file name to the SDL_LoadBMP method between two quotation marks, with the .bmp file type at the end (i.e : “image.bmp”).

With all this done, enter the command prompt and maneuver to the directory with all the files you’ve just made. Enter the following command to compile and link this program:

g++ -o SDL2.exe cpp_Application.h cpp_Application.cpp –lmingw32 –lSDL2main –lSDL2

If the compilation and linking goes well, the execution of your program should display the image you just drew in MS Paint!

Wednesday, April 23, 2014

New Super Smash Bros.

Good morning/afternoon/evening fellow readers!

So let's be honest here: Who ISN'T hyped about the new Super Smash Bros game? It has been a popular brawler since its first game, Super Smash Bros. I personally started on the Smash Bros. Train when Melee came out. But this isn't a Nintendo 64 or a GameCube we are talking about today. We are talking about the new one coming out soon, first for the 3DS and finally for the WiiU. 

First of all, it's already an awesome surprise that they are actually making this game for a handheld. Usually when Nintendo has something they know the audience likes, they don't stray too far from what they usually do for that type of title. Now they are expanding a popular series to a handheld system! That is one of the coolest ideas they have done. Not only do people have two different ways of playing the game, each game for each console having its own benefits, but it also ensures that people that don't have the WiiU get to enjoy the awesomeness that is Super Smash Bros.

Now if you saw the Nintendo Direct for the new Super Smash Bros. game, you know how awesome the game looks for both systems. This was the game everyone has been looking forward to for the longest time. I don't know about you, but even though I have a 3DS and not a WiiU, I really want to get a WiiU so I can play the NSSB game. The question is "Will this game save the Nintendo WiiU?" 

Well, it's definitely a possibility. There is SO much hype for this game, it could blow you away. Look at it this way, even if everyone one is like “Oh no, why should I get the WiiU when I can play it on my 3DS?” there’s still a lot of people that don’t have a 3DS.  With so many people on the edges of their seats, barely able to wait for the 3DS release, there’s no way that this is going to have a bad turnout.  Most people aren’t going to let this game pass by them. If they did, they probably aren’t into brawlers or just don’t like Nintendo very much. You can bring up the “Oh, I’m too broke” but let’s be honest: How many times have you splurged money on something that you really couldn’t afford?  About everyone at least once, unless you are a child that can’t afford those things, but in a lot of those cases, most of those families live in homes and can already afford these products if they don’t have them already.

Let’s face it; people are going to get what they want, even if it’s not good for them.  And there is a LOT of people that want this NSSB game. There will be systems bought, whether handheld or console, and there will be a lot of game stores having long lines of people waiting for their preorders and others feeling pretty bad that they didn’t preorder. I know I’m going to get the NSSB game no matter what it takes (except for stealing, because I wouldn’t do that, and you shouldn’t either!).

Now in my next post, we will start talking about the game itself. Until then, though, I hope you have a great day! :)


~Jelly

Saturday, April 19, 2014

My Apologies

Good morning/afternoon/evening to my fellow readers.

I would just personally like to apologize for not being as active as I should. I have been trying to think of what to talk about with you guys and gals. I was thinking that maybe I can record me playing some games and show them here.

Then I ran into computer problems, and now it's really slow. And I don't know why yet. I've deleted and uninstalled things that I don't need, and I've ran Antivirus, Anti-malware, and Anti-spyware. It seems like its gotten a little better, but then again, I haven't tried multi-tasking that I like to do. Anyway, I have to make sure my computer is ok before we talk about other subjects. I apologize for the inconvenience.

But when you see me again, you bet that you will here a lot about the new SSBB. I know everyone is excited for that game, and so am I.

Until then, I hope you have a great day! :)

~Jelly

Friday, April 18, 2014

SDL 2.0 - Integrating with MinGW

Today, I’d like to start working with a multimedia library known as Simple Direct Media Layer (SDL.) SDL is a cross platform development library that provides access to low-level functionality, such as audio, graphics, and HID (human interaction devices) such as a keypad and a mouse. Written in C, it has become one of the most popular and widely used libraries for multiplatform development available, and utilizing it will help us understand all the components that make up a game to a whole.

We will be downloading SDL 2.0, the latest release, and extracting the library into our MinGW folder. GO to the sdl homepage and click on ‘SDL 2.0’ near the left, and click the link that says SDL2-devel-2.0.3-mingw.tar.gz to start the download for SDL 2.0. When it finishes, move the .tar file to a directory on you C:\ hard drive. From this directory, we will be utilizing the tar command (tape archive) to extract this file, using the following flags:

Z: Indicates using the g-zip command to extract the files using the DEFLATE algorithm.
X: Flag that tells tar to extract to the disk from the archive.
V: Verbose; a command used to show the progress and file names while extracting from a file to the disk.
F: File flag, points to the string of the object being extracted, indicating it’s a file.

While in the directory that .tar file sits in, type the following command :

Tar –zxvf SDL2-devel-2.0.3-mingw.tar.gz

This will extract the files for SDL2 from the .tar file, into the directory. You should now see SDL2-2.0.3 for a folder in this directory. This contains all the files to work with SDL 2.0 in your projects, including header files, library objects and the necessary dll.

Now then, we will be extracting all these files into you MinGW directory and moving the .dll object into the Windows system, that way our compiler can utilize SDL without having to look through different directories. First, use the move command from one of our earlier tutorials, and find you MinGW directory (likely right on the C:\ drive) to find it’s include directory in the x86_64-w64-mingw32 folder. This directory holds the include files for your current platform (Windows 64-bit) which will be searched through for the libraries and header files. When you know where this file’s location is, write down or memorize this string name at the top, in the address bar – you will be moving a lot of files from your SDL 2.0 directory into this directory here.

Navigate to the SDL directory and find and enter the same x86_64-w64-mingw32 folder as found in the MinGW directory, and from there find the include folder. Enter this folder, there should be a folder named SDL2, move this folders into the include directory of MinGW with the move command, like so:

Move SDL2 C:\MinGW\x86_64-w64-mingw32\include\

This should be a quick procedure for the computer, since the files won’t be copied, but simply moved instead. From here, enter cd .. to move back to the previous directory, and then cd lib to move into the lib folder, containing the necessary .a files for MinGW to utilize. From here, take advantage of the wildcard character ‘*’ and move the .a files by typing:

 move *.a C:\MinGW\x86_64-w64-mingw32\lib\
 
Then, with the libraries and header files in the right places, simple navigate back with cd .. to the bin folder (cd bin) and type:

 move SDL2.dll C:\Windows\sysWOW64\

This will move the .dll into the windows directory for the dll files (You may need to restart the command prompt with administrator privileges to be able to do this right.)

With all the files in the right places, the only thing left to do is test this with a simple program. Move to an empty directory or create one, and from there, enter notepad sdl-test.cpp to create a file for testing sdl. In this file, enter the following source:

#include "SDL2/SDL.h"

int main( int argc, char* args[] ) {
    //Start SDL
    SDL_Init( SDL_INIT_EVERYTHING );
    //Quit SDL
    SDL_Quit(); 
    return 0;    }

This code will simply initialize SDL and then quit SDL. If this simple program compiles and links properly, at least we will know that SDL2 has integrated with MinGW. Enter the following into the command prompt:

g++ -o sdl2.exe sdl-test.cpp -lmingw32 -lSDLmain –lSDL.

If you get an error stating that the header file cannot be found, then the include folder is likely in the wrong include folder in the MinGW directory. If the compilation states that the libraries are missing, then the libraries are in the wrong lib folder. Remember to insert these files into the x86_64-w64-mingw32 directory in MinGW.


Well, this was quite a bit of work, but assuming it went as planned, we should finally be ready to begin coding with C/C++, making a game with SDL (and OpenGL for graphics later on). Have a great day, and read up on SDL for future reference! :D

Friday, April 11, 2014

Batman: Arkham Origins, Tomb Raider

Yo Y'all XD!

How has everyone's day been? Good I hope. It's been a tiresome week for me. Been traveling around job searching and not much luck so far. I'm still trying though until I land one eventually. How else am I going to be able to get a PS4 someday, lol.

Anyways, just picked up Batman: Arkham Origins from Gamefly. Been getting some bad reviews on it though, including the fact that this game wasn't primarily made by Rocksteady. So we'll see how it is through the first 10 mins. If not, that's why you got to love Gamefly. I'll be looking forward to Batman: Arkham Knight when it comes out though. It's going to be epic XD.

As for Tomb Raider, I haven't played it in a while. I'm still mid-way through the game so I'll catch up on it sooner or later.

Well...that was short and sweet. Hopefully, I'll have more content and news for you guys on my next post. For now, that's enough spit from me.

Have a good weekend break :)

The GNU Debugger (GDB)

Hello, and today, I’d like to guide you through the GNU project DeBugger, also known by its command line name of GDB. GDB is a debugging program that can stop and start your program executable, and analyze it’s variables and methods as it runs. Using GDB, you can stop your program at break point to study and analyze the current state of the executable, and get a better glimpse of any issues or errors in the program. A debugger is the best tool to find bugs like faulty variable values, and for finding the reason certain programs crash.
 

In order to work with GDB, you will need to compile your programs with the ‘–g’ flag on the command line. This will enable the gdb to read the source file along with the executable by compiling the necessary information from the source with the executable, and it is necessary to enable and access a lot of the features available in gdb. For this tutorial, please compile the tokenizer code from the last tutorial for our experiment today, like so:

G++ -Wall commandlinearg.cpp –g –o lineArg.exe
 
This will set the program just compiled with the necessary debugging information for GDB to perform actions such as back tracing and break points. It will also enable GDB to print variables found in the program as it runs, so that we may analyze them for possible errors, or to simply see them perform in action.

Now, in the directory of the executable you’ve just compiled, type GDB executableName.exe. You can also This will run the debugger in the command line, with the executable loaded and ready for running. Before running the executable, set some break points by using the keyword break, followed by either a number, or a function name from inside the source used to compile your executable (or in case there are multiple files used break filename.*:number or method).

 If you use the number, the number used will represent a line in the source file used. It isn’t necessary to have access to the source, because everything is included in the executable, or the object file. For our example executable, please use break 27 and break wordCounter, which will set two break points at the line specified, and at line 43, the beginning of the wordCOunter method.

Also, before running the program, type display argc. This will display the value of the command line argument argc, which gives the number of arguments being passed to the program. This value will be displayed every time the program stops execution at a break point.

Now, to run the executable with an argument, type run “Command Line Argument” which will run the executable with “Command Line Argument” as a parameter.

Execution stops first in the wordCounter method; when it does, it will display the argc variable, and the value it holds (it should be 2). It should also display the current line the debugger has stopped at, along with display the source line. To see the next line of code, type step. This will move the program and debugger to the next line of code, redisplay argc along with the line of code at the next line of the source. Type step again to get to the next line, this will initialize the wordCount variable to one, like in the source. Type print wordCount to confirm the integer has been initialized. When your finished, type bt or backtrace to see the path of execution for methods used in this program. This command will display the methods used up to the current position of the program the debugger is in. When your finished with this method, type continue to finish the method and continue back to main, to the next break point, at line 27.

Use this point to practice the command I’ve shown you; use the source file as a reference, and try to use break with a file name to practice it’s use with multiple file when the time comes. Also, try using the debugger with other executables, like the other executables in previous tutorials. Using the debugger is extremely useful for programmers, and learning this will help you figure out how a program ticks, and where problems are at to fix. And getting comfortable with GDB is a lot quicker that going in-between many different debuggers like in Visual Studio, or other IED-based debuggers.

Monday, April 7, 2014

Tokenize a string with command line arguments

The tutorial for today will explore how to parse a string in c++. Parsing a string or line of characters is a crucial exercise in programming, as many programs will need to read lines of code for bites of data, usually held in character-based strings. Parsing is seen in many different aspects of programming, from networking programs that need to parse a URL, to a graphics engine that needs to parse a model file for a 3D shape, to a program like Microsoft Office that measures then number of words in a document or selected line of text.

Further, we will be implementing this program with command line arguments. These are the parameters found in the main() function: argc and argc[], which respectively stand for argument count and argument vector. Argc is an integer type that holds the number of arguments being passed to the program when it runs, and argv[] is an array of C-style character strings, the size of argc. These strings in argv can be simple strings, such as in our case; but they can also provide strings like address paths for files like image files and text files that hold data.

We will be taking normal string arguments for our program, and parsing them by counting the number of words inside each string by checking for whitespace i.e. ‘ ‘ in each string to determine an instance of a word. The strings will be normal, double quotation strings (“ ”) like in C++.

The first line in the main() function is a call to printf(), with a string supplied as the first argument and argv[0] as the second. The string "Program name %s\n" will output “Program name” and the name you give the program when you compile it: it is the name of that application being ran, and this is the case for every application that the first argument in argv[] is the applications name. The %s inside the string is a flag, indicating where certain text goes in that string. The %s indicates a string variable, with argv[0] being supplied as the string to copy into the position ‘%s’ is at in the string.

An important point to make for argv[]: it is always ended with a ‘NULL’ value. This means that that value will need to be tested for when parsing our command line arguments, which is what we do in the first ‘for’ loop in the ‘if’ loop, and again in the second ‘for’ loop below the first. This also means that a minimum of two arguments are in each instance of argv; the executable name and a ‘NULL’ value to indicate the end of the argument list. This is to enable the argument vector to have an end point to test for, to prevent an infinite loop in the main function.

The second ‘for’ loop will be the loop where we tokenize our string, meaning to break the string into several words, or in our case to simply count the words inside a string. Tokenization is crucial for areas of programming that require the analysis of strings, and in the case of data security, the masking of sensitive data with reference variables. Our argument is passed to a string variable, which is then passed to the wordCount method.

Each character in the string supplied with the call to wordCounter(string) is analyzed in this method. The if() loop will test each input character to determine two conditions; A: if that first character is whitespace, and B: if the character before the first is not whitespace (to prevent counting multiple spaces as a word). If these two conditions are met, then the integer wordCount is incremented. When the line is fully read, the method will return the value of wordCount to the count variable in the ‘if’ loop. After that, the program will output a message with the count variable, displaying the number of words counted in the string.

Navigate in the command prompt to the location of your testing area, start notepad and create a .cpp file, and copy and paste the code below; when finished, save the file and compile it using:

G++ -Wall filename.cpp –o applicationName.exe
And when you run the executable, on the right hand side, add some strings in double-quotation marks, like so:

applicationName.exe “Hello There!” “:D How are you?” “Good, thank you very much”
Your program will output the application name, followed by the strings you’ve input. Then the strings will be analyzed by the method wordCount, which will output both the string, and the message with the word count.

New Terms:

Tokenization: The programming act of separating the words in a string, either counting them or moving them into separate data structures altogether.

argc: The main() parameter that holds the number of arguments passed into the application. Use this to keep count of the arguments: remember that there will always be at least two elements, so test for a number >= 2 to test for any arguments passed into the application.

argv[]: The second main() parameter; this one holds the actual string arguments that the application will be working with. Remember that the first value (argv[0]) will always be the application name, and that the last element (argv[last]) will always be a NULL value. Remember to test for the NULL value, and never pass it to any methods.

Code

#include <stdio.h>
#include <string>
#include <iostream>

int wordCounter(std::string);

int main( int argc, char *argv[] ) 
{
   printf("Program name %s\n", argv[0]);

   if( argc >= 2 )
   {
      for(int i = 0; i <= argc; i++)
         {
              if(argv[i] != NULL) printf("%s \n", argv[i]);
              else continue;
         }
        
         for(int i = 1; i <= argc; i++)
         {
              if(argv[i] != NULL) {
                     std::string argument = argv[i];
             
                     printf("%s \n", argv[i]); //Print the argument
             
                     int count = wordCounter(argument);

                     printf("The number of words in this line is %i \n", count);
                     }
              else
                     continue;
         }
   }
   else
   {
      printf("No arguments were supplied.\n");
   }
  
   return 0;
}

int wordCounter(std::string line)
{
       int wordCount = 1; //initialize to one word counted
      
       for(unsigned int i = 0; i < line.length(); i++)
              {
                     if(line[i] == ' ' && line[i - 1] != ' ')
                           wordCount++;
              }
       return wordCount;

}

Thursday, April 3, 2014

Blazblue: Chrono Phantasm, Tomb Raider (2013), Construct 2

Hey Everyone!

How's everyone? It's been a cold week with a lot of strong winds hitting around. Hope the weather has been nice for you.

Blazblue: Chrono Phantasm had come out this past weekend on PS3 (Darn it Microsoft! Why fail so hard in getting Blazblue: CP to work on Xbox!?).  *Ahem* Yea...it is finally out on shelves to play and I don't have the luxury of playing it until Arc Systems gets it going with its PS4 version, or digital download for PSN Plus+. Orrr....I could steal my sister's PS3 and use it to play it until I get a PS4 (lol, jk). But I am miffed that others are already lucky enough to play it aside from those that played from it's Japanese import. My time will soon come for it sometime...eventually...

Anyways, on to other news, I picked up Tomb Raider on Steam during one of their daily deals. Did a small playthrough of the game and liking it some far. The button sequence though kind of throws me off a bit when it unexpectedly enters you into it. Died quite a lot a few times after finally getting it. Now the choice is how will I grow in this game, shall I be a Survivor....or the Hunter :).

As for my gaming developments, I'm toying with Construct 2. I've seen some good platformers made by various people, and I still have yet to ponder what I could create myself. For now, I'll try building off some examples and test out some AI programming.

Well that's all for now folks. Hope you have a great day :)

Saturday, March 29, 2014

Sims 3- MAGE Club

For the next household, we have folks that represent my club. For their safety, I won't use their full names in this blog. We have the Club President, and there we have all the clubmates. This isn't even all the members, so I'll have to make another household for the other half. But I'm not that far in yet. I know this seems confusing, but when I come across the individual characters themselves, I'll be sure to distinguish who is who.

Do. M(ember)

Ad. M

Al. M

B. M

C. M

Da. M

J. P(resident)

S. M
For now, have a great day! :)


~Jelly

Thursday, March 27, 2014

Basic Server/Client Application - Network Programming

   Today, I’d like to get into programming sockets, and help explain a little about network programming.  While network programming is a lot to understand, it is easy to understand once you get the hang of the basic functions needed to get a client-server connection established. First let’s go through some basic terminology of networking.

Sockets: There are object inside of the source code that create an interface with the network, and act as a connection to the transport layer of the IP(Internet Protocol).

Client: The local application a user starts is called the application.

Server: The application on the end that receives messages from the client’s application instance.

Protocol: A protocol is a system of rules for the exchange of data across a network. There are many protocols, made up of layers for each protocol used by an application. For this tutorial, we will be utilizing the UDP protocol for passing a basic message. There is also the TCP protocol, which came first and serves a different purpose, but with the same principal; to enable the transfer of data.

Port: A number, specifying the location for the protocol to be used on the transport layer (i.e. 80 is for HTTP, which is used to browse the web.)

Internet Address: A 12 character number, which describes the location of the physical computer used for an application; Necessary for finding and establishing a connection to the client’s and to connect to the server.

   Ok, now that we have an understanding of the terms for a network application, let’s get into a basic networking application. Both files are quite similar, so lets start with defining the methods used:

struct sockaddr_in sockServer, sockClient;
WSADATA wsa;
SOCKET s, c;
int slen = sizeof(sockClient) , recv_len;
char buf[BUFLEN];

   The first few lines in main() set some variables and data structures to be used in the application. The first two are structures, called sockaddr_in. These are socket address interface object, and they store the socket information for our application, for the client and the server. The second of the two variables are the SOCKET variables, which act an the interface objects to the transport layer of the IP suite. The next variable is the WSADATA variable; this is a winsock specific variable, and we will need to initialize this in order to get the application to work on windows correctly. There is also two integers for measuring the length of the socket (slen) and of the data incoming (recv_len). The final variable, buf[], is the buffer for our data; an array of characters, with BUFLEN as a defined value constant for determining the length of the message.

if(WSAStartup(MAKEWORD(2,2),&wsa) != 0)
       {
           printf("Failed. Error Code : %d",WSAGetLastError());
       }

   This if loop will setup WinSock for our application with the wsa variable, and return a error message if it can't initialize properly.

s = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP);

   This is where the server socket is initialized. AF_INET tells this socket that it will be used over the internet. SOCK_DGRAM tells this socket to send data as a datagram, and the third parameter, IPPROTO_UDP will set the protocol used to UDP (User Datagram Protocol).

sockServer.sin_family = AF_INET;
sockServer.sin_port = htons(SERVERPORT);
sockServer.sin_addr.s_addr = inet_addr("127.0.0.1");

   These lines of code will initialize the sockaddr_in object with information about the computer being connected to. The first line is AF_INET, which tells the structure to use the IP suite. The second one assigned a port number - this instance has the user assigned a port number to a specific number, but normally this area is used for port numbers used for protocol numbers like HTTP (80) or UDP (67). And inet_addr assigns a numerical address to the structure, to identify the specific computer to connect to. In this case, the number "127.0.0.1" is used to indicate the local host, meaning that same computer used for the server is also the same address for the client; we will be using this for the tutorial to keep this simple, and I will go into this later on.

bind(s , (struct sockaddr*)&sockServer, sizeof(sockServer) );

  Before the main loop our application utilizes, we call bind, to bind the socket 's' to the address structure 'sock'server'. This means calling the sizeof() method for the structure as well.

recv_len = recvfrom(s, buf, BUFLEN, 0, (struct sockaddr *) &sockClient, &slen);

   This line of code start with the variable; that variable will get the number of bytes received from the incoming data. That value is returned from the recv_from() method.

   The recv_from() method receives data from another computer; this is the method to test for incoming data. The first parameter in the recv_from method is the bound socket, for our current application. The second and third parameters are the buffer for the data and the buffer size, respectively. The fourth parameter is for setting flags ('0' in this case). The fifth parameter take a sockaddr_in object, passing the address information from the source into the object. And the sixth parameter takes the size in bytes of the fifth parameter's structure.

sendto(c, buf, recv_len, 0, (struct sockaddr*) &sockClient, slen);

   This method finally sends the data out to another computer; the sendto() method. The parameters in this method are identical to the recv_from arguments; the main difference is that all the parameters are inputs, meaning all the objects in the sendto() method are being utilized, and no data is sent out from this function to any of the objects passed as arguments, unlike recv_from().

closesocket(c);

   Finally, we call closesocket() to close the socket in use. This takes a single parameter, the socket. It is pretty simple to understand.

I’ve included the source code for both the client and the server instances below for you to run; just remember to run the server application first before using the client. I hope this tutorial was helpful in illuminating exactly how an application works over the internet. It serves to show exactly how an application works from a windows stand point.

   To compile, simply put both files in a directory, navigate to that directory with cd, then, assuming you have GCC, type g++ -Wall server.c –o serverAppName.exe –lWs2_32. Please remember the –l and Ws2_32, as these are the libraries for Windows to work with sockets. Without them the application will not work.
Have a fantastic day! :D
Server Code:
#include <stdio.h> //printf
#include <string.h> //memset
#include <stdlib.h> //exit(0)

#ifdef WIN32
#include <winsock2.h>
#include <winsock.h>
#else
#include <arpa/inet.h>
#include <sys/socket.h>
#endif

#define BUFLEN 512  //Max length of buffer
#define SERVERPORT 1111   //The port on which to listen for incoming data
#define CLIENTPORT 1112

int main(int argc, char **argv)
{
    struct sockaddr_in sockServer, sockClient;
       WSADATA wsa;
    SOCKET s, c;
       int slen = sizeof(sockClient) , recv_len;
    char buf[BUFLEN];
      
       if(WSAStartup(MAKEWORD(2,2),&wsa) != 0)
       {
           printf("Failed. Error Code : %d",WSAGetLastError());
       }
    
    //create a UDP socket
    s = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP);
    
    // zero out the structure
    memset((char *) &sockServer, 0, sizeof(sockServer));
    
       //Assign IP address and port number for the server
    sockServer.sin_family = AF_INET;
    sockServer.sin_port = htons(SERVERPORT);
    sockServer.sin_addr.s_addr = inet_addr("127.0.0.1"); //Localhost
    
    //bind socket to the port number
    bind(s , (struct sockaddr*)&sockServer, sizeof(sockServer) );
    
    //keep listening for data
    while(1)
    {
              //Send message and clear standard buffers
        printf("Waiting for data...");
        fflush(stdout);
              fflush(stdin);
        
        //try to receive some data, this is a blocking call
        recv_len = recvfrom(s, buf, BUFLEN, 0, (struct sockaddr *) &sockClient, &slen);
             
              //print details of the client/peer and the data received
              printf("Received packet from %s:%d\n", inet_ntoa(sockClient.sin_addr), ntohs(sockClient.sin_port));
              buf[recv_len];
              printf("Data: %s\n" , buf);
                    
              //Create client socket for server side connection.
              c = socket(AF_INET, SOCK_DGRAM, 0);
             
              sockClient.sin_family = AF_INET;
              sockClient.sin_port = htons(CLIENTPORT);
              sockClient.sin_addr.s_addr = inet_addr("127.0.0.1");
        
        //now reply the client with the same data
        sendto(c, buf, recv_len, 0, (struct sockaddr*) &sockClient, slen);
             
              //Close the socket connection the server to the client
              closesocket(c);
    }
      
       //Close the server socket and close the application
       closesocket(s);
    WSACleanup();
      
    return 0;
}

Client Code:
#include<stdio.h> //printf
#include<string.h> //memset
#include<stdlib.h> //exit(0)

#ifdef WIN32
#include <winsock2.h>
#include <winsock.h>
#else
#include <arpa/inet.h>
#include<sys/socket.h>
#endif

#define BUFLEN 512  //Max length of buffer
#define SERVERPORT 1111   //The port on which to listen for incoming data
#define CLIENTPORT 1112

int main(int argc, char **argv)
{
    struct sockaddr_in sockHost, sockServer;
    SOCKET s, c;
       WSADATA wsa;
       int slen = sizeof(sockServer) , recv_len;
    char buf[BUFLEN];
    
       if(WSAStartup(MAKEWORD(2,2),&wsa) != 0)
       {
           printf("Failed. Error Code : %d",WSAGetLastError());
       }
      
    //create a UDP socket
    c = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP);
    
    // zero out the structure
    memset((char *) &sockHost, 0, sizeof(sockHost));
    
    sockHost.sin_family = AF_INET;
    sockHost.sin_port = htons(CLIENTPORT);
    sockHost.sin_addr.s_addr = inet_addr("127.0.0.1"); //Localhost
    
    //bind socket to port
    bind(c , (struct sockaddr*)&sockHost, sizeof(sockHost) );
    
    //keep listening for data
    while(1)
    {
              //Get input from the user, and put the data into the buffer
        printf("Input data...");
        fflush(stdin);
              fgets(buf, 512, stdin);
              printf("Client: %s", buf);
             
              //Create the client-side socket for the server
              s = socket(AF_INET, SOCK_DGRAM, 0);
              sockServer.sin_family = AF_INET;
              sockServer.sin_port = htons(SERVERPORT);
              sockServer.sin_addr.s_addr = inet_addr("127.0.0.1");
             
        //now reply the server with the input data
        sendto(s, buf, BUFLEN, 0, (struct sockaddr*) &sockServer, slen);
             
              closesocket(s);
             
        //receive some data, this is a blocking call
        recv_len = recvfrom(c, buf, BUFLEN, 0, (struct sockaddr *) &sockServer, &slen);
        
              printf("Server: %s", buf);
    }

    closesocket(c);
       WSACleanup();
    return 0;

}