Welcome!

Hey, I'm Skylar, a kid aspiring to become a competent programmer. This blog is here to detail my dabbles in development.

My dream is to one day become a professional programmer and do some game development in my spare time.

Thanks for visiting my blog, and I hope you'll come back!

Pages

Showing posts with label SDL Framework. Show all posts
Showing posts with label SDL Framework. Show all posts

Audio Manager = done!

Well after a few days, it's finally done. Sorry it took so long, I've been pretty lazy.


So basically here's how it works: There's two abstractions CMusic and CSound (Mix_Music and Mix_Chunk).

Sound holds a channel, and volume, and music just holds volume (other than the actual piece of audio, that is).

You can call methods from them, which in-turn, call methods from the AudioManager. The AudioManager acts as a 'messenger' between SDL_mixer and the two abstractions. It performs checks on the various data of the abstractions, and then calls the appropriate SDL_mixer method.

It works great as of now, but I may add more later.

So now there's one last thing I will definitely get finished, and that is the Debug 'Manager'. I just want it to have functions to print to file and the screen. It will have it's own CText object to use TTF to print to screen. I also want to create some way to bound text to a rectangle, so that I can specify a specific rectangle, and the text will automatically be formatted to fit in the rectangle.

So after that, I'll definitely be having a code cleanup, and I'll implement Debugging code in many places (I have it set up already, I just gotta add the method call).

After that, I will decide to make a bitmap font engine and/or a GUI portion. At the moment, I'm really hesitant for the bitmap font engine, but slightly enthusiastic about the GUI 'module'.

Well I'm going to stop talking now, and hit the sack... Night Guys...

Secret Project Already Gone With The Wind =(

So the 'secret project' was a bot for the game Conquer Online. My friend had it working, and a lot of it worked quite well. I guess they released something that shut it down though, and my friend doesn't want to continue with it. More time for me I guess.


I was gone most of the day, so I didn't get anything done, but I'm starting to debate on whether I should actually make a bmp font engine, I might skip it for now, and make the audio manager, and then come back and make it, who knows.

But I already got a small start on a 'GUI' portion to the framework, but I'm not planning on finishing that until after I finish and sync up everything else.

The next two days are going to be quite hectic for me, so I don't know if I'll be doing anything. I want to get a good start on the homework I have though.

Well that's all for now, Peace, and Merry Christmas !

New Video

Well I finished kind of cleaning up my code, and made a 10 minute long video... with my own audio commentary =D.


Well I just wanted to announce that. I'm going to change one quick thing in the framework before I go to bed, and tomorrow I'll get started on the Audio Manager.

In the video, I think I said that I may do some SDL tutorials... So I'll see how I feel about that tomorrow, and maybe start making them.

Here's a link: Link

Enjoy.

New Update (Finals are OVER!)

Well Finals are over =D. I got As on all my finals, and have a 4.3 GPA for the semester, so I'm in good shape. Anyways, back to the actual development stuff.


So I made myself a check list of things I want done before I make a video. I've started on it, and have already completed half of it.

Right now, the current issue at hand, is my surface abstraction. I made an example real quick to test image loading/clipping. Everything compiles and links just fine, but when I execute it, I get an Access Violation error whenever it comes to the abstracted surface in the code.

So I have a LoadImage method in my abstracted surface class:

void LoadImage(std::string filename)
{
if(m_pSurface != NULL)
{
delete m_pSurface;
m_pSurface = NULL;
}

SDL_Surface* loadedImage;
SDL_Surface* optimizedImage;

//I don't feel like typing the rest, but basically
//I load the image into loaded image, and if it isn't NULL, then I format the image,
//Then I assign the value of optimizedImage (which is now loaded and formatted)
//To m_pSurface(which is the abstracted surface).


Anyways, right here: if(m_pSurface != NULL), is where it happens... I take that out, and it has an access violation the next time I mention m_pSurface.

I'll find the problem today hopefully. But after that, my checklist is:

*Extend functionality of surface abstraction to allow direct pixel manipulation
*Add support to select an icon for the window
*Place everything in a namespace
*Clean up and comments

so after I do everything, I'm going to go through, and organize things a bit better, and get things ready. I also haven't been consistent with comments, so I'm going to comment it as I'm reorganizing things.

But as it is now, to make anything, all I will have to do is:

Create a derived class from CApplicationManager (or use the basic one I made, which will just be used for simple demos) and then make my own set of states.

Well that's it for now, I'll make another post if I get anything done

Real Quick Update

Just wanted to say that I finally took care of all those errors, and the project now compiles fine, with just a single warning (just a little tidbit about losing data, because I convert from a double to an int) =D. Anyways, the event handling works well.


Tomorrow I have finals the next three days, so I probably won't work too much on the framework.

What I need to do, is study the structure of both SDL_mixer and SDL_ttf, because those are the last two things I want to implement.

After I do that, I'm going to make a much better Debug class, so that you can debug to the screen.

So just off the top of my head for the text stuff, I want to be able to do the following:

*Specify a Rectangle that text keeps itself in (not sure how possible this is... I'm sure there must be a way though)

* Select font, color, and string of text

* Find some way to manage fonts (Maybe not though...)


So that's just a few things that I want... Simplistic, but it's just off the top of my head. I'll be taking a lot of notes on SDL_mixer and SDL_ttf from Focus On SDL, LazyFoo's tutorials, and their respective documents.

Well that's the update. I definitely should finish this over this break that's coming up =D