Archive

Archive for the ‘FuchsGUI’ Category

Genetic Algorithms Lab

27/09/2014 Leave a comment

Genetic Lab

 

So a few years ago I did a project for the Genetic Algorithms assignment at college. My idea was to have tiny multi-cell organisms that have a simple goal: travel as far as possible! maybe to find new resources or escape from predators, you pick one đŸ™‚
So the fitness of a creature is measured by how far it can go during its life span.

The creatures will start with random moving cells and evolve to more organized creatures with organized movements.

Please watch the video before reading. If the video failed to make you interested then I doubt that the text would succeed. You can also download the executable and the source code available at the end of this post.

 

Read more…

FuchsGUI Update

09/08/2011 Leave a comment

Hello there, sorry for being inactive lately but I don’t feel like programming or learning something new :(.

Anyway, I fixed the issue in FuchsGUI where some text was blurry, the reason was that the text was being rendered with floating point values for position, something like (20.3f,29.4), this meant that spriteBatch should split physical pixels :(.

Anyway, thanks to a guy named Fab who told me how to fix this, the solution was something like this:

position.X = (int)Position.X;
position.Y = (int)Position.Y;
// Render here

So, here’s the fixed version (XNA4 only):

   FuchsGUI v1.1 Source Bin XNA4 (Blurry Text Fixed)

I hope to see you later :)…

Busy busy busy busy :@

29/05/2011 2 comments

It’s been more than a month since my last post, I didn’t run out of ideas yet! but I’m really busy with college & its projects :(.

One of the projects I’m working on is a game for a Graphics project. it’s a third person shooter game, you can watch this short video to get an idea about the game đŸ˜€






Stuff to share later when I get the time to:



1-XNA Glow effect (post processing) : how to make your models glow!

GlowPP

Glowing Effect : Look how the red parts of the object are glowing, the glow extends towards the out side of the mesh



2-Third Person Shooter aiming :aiming in third person shooter is Read more…

XNA FuchsGUI part V

16/02/2011 6 comments

___________________________________________________

1-Introduction to the GUI.
2-Hello control :D.
3-Hello form.
4-Exporting forms easily from Microsoft Visual Studio Designer to FuchsGUI :D.
5-The future of FuchsGUI & some notes.

___________________________________________________

This part of the tutorial is the last part of the series..

I don’t know how to organize this post since it’s not a tutorial đŸ˜‰ so I’ll start with some notes on FuchsGUI.

FuchsGUIDemo

A post without an image is a dull post đŸ™‚


Textures & Fonts:

As you saw each control takes a Texture2D parameter in the constructor, well… having many textures might have a bad impact on performance, because if you first draw a Button and then a TextBox the GPU will have to change textures.

A better solution is Read more…

XNA FuchsGUI Part IV

15/02/2011 4 comments

___________________________________________________

1-Introduction to the GUI.
2-Hello control :D.
3-Hello form.
4-Exporting forms easily from Microsoft Visual Studio Designer to FuchsGUI :D.
5-The future of FuchsGUI & some notes.

___________________________________________________

Okay, if you’ve been following the tutorials, you should have noticed how creating controls is somehow uncomfortable :(…
The first place where I used my gui was an artillery simulation project in XNA.
I had to make lots & lots of modifications to the forms of the simulation, If I wrote the code for every form manually I might have lost my mind and started screaming something like “Damn! this button should be 3 pixels lower”, “ops! this textbox should be wider :(“

But before getting deep inside the gui of the simulation an idea came to my mind :D.
Why troubling myself with writing 1** lines of code for a single form while I can generate the code from Microsoft Visual Studio??

I’ll have to admit it’s a little lame to use the Visual Studio designer but I found it better than wasting time programming a designer :).


The main idea of the code generator is:
-Running a pre-made Visual Studio project (windows forms application) with a reference to the dll  FuchsGUICodeGenerator ( Looooooooong name :D).
-Creating a new Windows.Forms.Form in the project.
-In the file Program.cs choose the form you created (more details later).
-Compile & run the project.
-A pre-made form will show and ask for generation options.
-You click a button and a complete class code is generated & copied to clipboard on demand :D.

We’ll recreate the calculator from Part III.

That ends the headlines :), let’s get to the details. Read more…

XNA FuchsGUI Part III

14/02/2011 6 comments

___________________________________________________

1-Introduction to the GUI.
2-Hello control :D.
3-Hello form.
4-Exporting forms easily from Microsoft Visual Studio Designer to FuchsGUI :D.
5-The future of FuchsGUI & some notes.

___________________________________________________

In part 2, I demonstrated how to create two types of FuchsGUI controls : Button & TextBox.

Well, most FuchsGUI controls have similar constructors, this lesson should be quite simple, what we will do is a simple calculator that adds\subtracts two numbers, the reason for this is to show you how to get values from TextBoxes & how to use Forms.

So create a new XNA 4.0 game , add a reference to FuchsGUI.dll (you might wanna go back and read step a in Part II)

Add the using directive first

using FuchsGUI;

Add these fields to Read more…

XNA FuchsGUI Part II

12/02/2011 4 comments

___________________________________________________

1-Introduction to the GUI.
2-Hello control đŸ˜€.
3-Hello form.
4-Exporting forms easily from Microsoft Visual Studio Designer to FuchsGUI :D.
5-The future of FuchsGUI & some notes.

___________________________________________________

Okay! let’s get our hands dirty :D.
In part I, I talked about my GUI in theory, what we will do now is:
a-Creating a new XNA4.0 game and preparing it to use FuchsGUI.
b-Adding two Buttons and one TextBox.
c-We want to achieve the following : when a button is clicked, the text in the TextBox will change to the name of the clicked button.

Three simple steps, but first you’ll need Read more…

Categories: FuchsGUI, Graphics, Programming, XNA