Sodabread 88 Posting Whiz in Training

One thing I notice is that in your checking code, you're running a for loop using the "no" variable that is not defined anywhere in the local scope. Define that and let's see how it works.

Sodabread 88 Posting Whiz in Training

They look good to me. Check this page out for a rundown of the ASP.NET page life cycle so you can get a good idea of what happens when: http://msdn.microsoft.com/en-us/library/ms178472.aspx

Sodabread 88 Posting Whiz in Training

Eric's link is definitely a good one to start with. I would also recommend that you check out www.connectionstrings.com for when you're trying to figure out how to connect to your specific database. If when you're implementing your database stuff you have any questions, stop back and I'm sure many here would be glad to help out.

Sodabread 88 Posting Whiz in Training

If it's necessary to find developers in Florida, the only other suggestion I can give is to look for students from Full Sail, which is up in Orlando, but many may not have the time because they have a pretty grueling schedule. Your only recourse may be to find several developers around the states or world that would be interested in helping you put your game idea into action and just deal with having a widespread team.

Also, for the publisher, you're going to have a very hard time finding one that will agree to publish the game with just an idea in your head. You'll need to develop the game to a nice and polished state (doesn't need to be exactly complete) then take it to an indie game publishing house, like Big Fish Games, and even that may prove to be difficult. No one like Activision or EA is likely to give you the time of day unless you're a proven developer, seeing as how game ideas truly are a dime a dozen.

Sodabread 88 Posting Whiz in Training

Is the ball collision volume an AABB (axis-aligned bounding box) or is it a circle (I'll assume AABB)?

If it's an AABB, you'll want to compare opposite sides of the ball and the brick, then reverse the velocity of the ball from the direction it hit:

if(ball->right >= brick.left && ball->top <= brick.bottom && ball->bottom >= brick.top)
    ball->yVelocity *= -1;

When checking for different sides, start with one side, then check against both perpendicular sides, then repeat for all 4 sides. Determine which sides here have collision, then take those sides and figure out which collision you want to use for your reflection.

If the ball is shallower on the vertical collision than the horizontal collision, you'll want to reflect the vertical, and visa versa. If it's a perfect diagonal hit, you can reflect whichever you want, or both.

If the ball is a circle, it will be a bit trickier. You'll be best off looking for a circle-line collision algorithm rather than me trying to explain it when I don't remember it so clearly.

Sodabread 88 Posting Whiz in Training

If you're just looking for a handout, you came to the wrong place. Try to actually code one and ask us for help where you need it.

Sodabread 88 Posting Whiz in Training

There is an unlimited number of resources on the net about using CSS with any web programming technology. Try searching on your engine of choice and you're bound to find many sites with the info you need.

Sodabread 88 Posting Whiz in Training

www.gamedev.net Good luck.

Sodabread 88 Posting Whiz in Training

I'm assuming you're not looking at the right "game programming" materials if you haven't found anything on the subject of adding graphics into an application. Look at OpenGL or DirectX tutorials or documentation for how this actually works. nehe.gamedev.net has everything you need to get started on OpenGL and Microsoft should have lots of stuff on DirectX (or XNA if you like C#).

Sodabread 88 Posting Whiz in Training

I know this is a little late, but you might also want to look into C# using the XNA framework. I prefer to code in C++, but using XNA really lends itself to getting games up and running rather quickly, plus you have the outlets of Windows, Zune & XBox as your publishing platforms.

Lusiphur commented: Thanks :) Good input +1
Sodabread 88 Posting Whiz in Training

So, after weeks of looking forward to the dinner & the party, I'm no longer able to attend. I had my day planned out to leave work and head right to the city, then take a half day on Thursday to get some sleep, but I got scheduled into meetings all day Thursday, which I need to be present for. I'd still go, but I've already got enough trouble sleeping to make it home at 1-2AM and get up at 4:30 for work. Hope everyone has a great time!

Sodabread 88 Posting Whiz in Training

What have you tried already?

Sodabread 88 Posting Whiz in Training

My recommendation for a C++ book would be C++ Primer Plus. Be warned, C++ is a tough language to learn. Make sure you do your research on languages before you go with one, just to make sure you go with the right one. You could spend years learning C++ well enough to make a game then realize you hate it. Look around, read some tutorials on different languages, see what you like.

Sodabread 88 Posting Whiz in Training

Your best bet may be using WMI. I've used it a bunch in VBScript, and it's quite powerful. There's guaranteed to be a boat load of resources out there for the combination of WMI and C#.

Sodabread 88 Posting Whiz in Training

For starters, gamedev.net is one of the best game development sites on the net. Lots of good tutorials and help there.

C++ is extremely widely used in game development for professional games for both PC and console. C# is also good, but its main benefit is the XNA framework which is Win/XBox only. There's also Java, Flash and Python which have some good game related frameworks. My personal favorite dev language is C++, because that's my first language and holds a special place in my heart. It's also damn powerful.

Sodabread 88 Posting Whiz in Training

Well, , first off, are you new to programming in general or just game programming?

Sodabread 88 Posting Whiz in Training

I tend to listen to trance (Tranzworld series, stuff off OCR), drum & bass (gotta love Roni Size & Dieselboy) or metal (Earth Crisis, Becoming the Archetype) when I code. I need something high energy that gets me motivated. On a rare occasion I'll throw in some ska or punk like Voodoo Glow Skulls, just to help lighten the mood a little bit.

Sodabread 88 Posting Whiz in Training

Wow, am I blind. I completely missed that >< Sorry about that.

Sodabread 88 Posting Whiz in Training

This might be a long shot, but have you tried

using System.Data.SqlClient

That's where the SqlConnection type resides.

Sodabread 88 Posting Whiz in Training

Ok. Here's one possible solution. Hopefully this will help a little bit. What you want to do is pass in the int[], as well as an out variable to put in either your run count or the final index of the longest run.

static public int Function(int[] table, out int count)
{
    int counter = 0; // The current count of the run
    int finalCount = 1; // The highest run count
    int lastValue = 0; // The value of the previous array index - can also use [i-1]
    int finalIndex = 0; // The final index of the run
    for (int i = 0; i < table.Length; i++)
    {
        if (table[i] == lastValue) // If the current index matches the last value
        {
            counter++; // Current run increases
            if (finalCount < counter) // Final count should only be changed if less than the current run count
            {
                finalCount = counter;
                finalIndex = i + 1; // Current index is end of current highest run and accounts for base 0 indexing
            }
        }
        else
        {
            counter = 1; // Not a match, so the current run is now 1
        }

        lastValue = table[i]; // Set the lastValue to the current index
    }

    count = finalCount; // Set the out variable to the current count
    return finalIndex; // Return the last index of the highest run
}

With this method, you'll be able to take the final index, subtract the run length (out variable), and get the initial index.

I hope that all makes sense.

Sodabread 88 Posting Whiz in Training

Becoming the Archetype - Dichotomy

Sodabread 88 Posting Whiz in Training

Yeah, sorry about that. I didn't realize there was a second page when I posted and didn't notice that your stuff was due so soon. Best of luck to you, though. Hopefully you'll get something accomplished by the end of the week.

By the way, if that file shows up as all little squares and/or a random assortment of characters, then yeah, it's unfortunately a binary file.

Sodabread 88 Posting Whiz in Training

I believe it should. Most keywords work across a good chunk of the databases out there. Give it a shot and see if it works for you.

Sodabread 88 Posting Whiz in Training

Have you tried opening the file in a simple text editor (notepad)? If the file itself is in binary and you don't have the map editor the writer used to create it, you may be slightly out of luck. But, lucky for you, you're a programmer. You may want to take this as an opportunity to write your own map class and determine how YOU want it to work, rather than just following the tutorial. You can follow the main idea of how this map class works, or write it from scratch, thinking it through as you go.

I'll give you one tip from how I write my 2D stuff, whether or not you care to read further and/or use it is up to you... Draw everything relative to your character's position. If your character is at position x:763 and y:129, draw everything -763 and -129 (values may differ depending on rendering technology used). If you have a tile at x:0 y:0 (left, bottom) and your character has run super far to the right, then it should draw super far off the left side of the screen. If you're really into games, this will also help you get a handle on culling, which is not drawing anything that isn't actually supposed to show up on screen.

Sodabread 88 Posting Whiz in Training

Take a look at adatapost's above code snippet. That statement will sort your selected values from highest to lowest. The table itself may not be ordered that way, but it doesn't need to be when you use the ORDER BY statement.

Sodabread 88 Posting Whiz in Training

Look into the Microsoft.Office.Interop.Excel namespace. You might need the Primary Interop Assemblies depending on what version of Office you have. There's a bajillion pages out there about that namespace and using/troubleshooting it. Good luck.

Sodabread 88 Posting Whiz in Training

Make sure you're taking it in as a System.Web.UI.WebControl or System.Web.UI.HtmlControl, whichever it is. If you've tried this already, post some code so we can have a better understanding of how you're doing what you're trying to do.

Sodabread 88 Posting Whiz in Training

I would agree with Ket or firstPerson. A* and Dijkstra's algorithms are going to be your best when you need to do a heuristic search involving cost for moving between nodes. I prefer A* most of the time for most purposes, but most all algorithms have their merits.

Sodabread 88 Posting Whiz in Training

As much as I always hate to burst the bubble of an aspiring game developer, J has a good point. How simple are these games you're talking about? Are they just tic-tac-toe and checkers or something similar? For people to buy your games, first you'll need to build something that people want to pay for. If they want to pay for it, but it's not distributed in a really easy way (see: Apple's app store), then you won't get sales because people don't want to go through trouble to download a simple game.

There are distribution channels out there for your games besides Apple's store, but you'll need to build something a lot more impressive than some simple WinForms games (although I would pay for a copy of Castle of the Winds if I could find one to run on Win7). My advice is to get past the simple games and build something bigger & better using C++ & OpenGL/DirectX or C# & XNA or whatever combination of tools you see fit. Using the latter (XNA), you can distribute your games on XBox Live Indie Games, but also through he Zune app store for the more simple ones.

There are a LOT of ways to get your games out there, they just need to be worth buying.

Sodabread 88 Posting Whiz in Training

UML is pretty much the classes and associated methods & members, so actual graphics, sounds, etc.. wouldn't be needed besides the members that cater to playing sounds or displaying graphics.

Sodabread 88 Posting Whiz in Training

Have you tried OnSelectedIndexChanged? Don't forget to check Google too when you have questions, as this is one that's got gobs and gobs of information out there.

Sodabread 88 Posting Whiz in Training

If you want something really challenging, you can try to diagram out a game, and by game I don't mean Snake. Something bigger like an RPG or first person shooter. You can then make these as simple or complicated as you want.

Sodabread 88 Posting Whiz in Training

I don't mind that the quotes are hidden, but what bothers me is when the rollover occurs accidentally, it completely throws of my train of thought. I wouldn't be so bothered about a click to view style, but I think I still like the always there version the best. We'll have to see as I continue getting used to the new site.

Sodabread 88 Posting Whiz in Training

What does he see as being the next big "boom" in technology? What's his view on the current IT market as far as unemployment and potential future growth? What big mergers and/or acquisitions does he see in the near future that could have potential impact on IT?

Sodabread 88 Posting Whiz in Training

Hmm. What are your thoughts on C# and do you see C++0x taking back some of the C++ programmers lost to C# and other .NET languages?

Sodabread 88 Posting Whiz in Training

I agree that kids shouldn't be playing inappropriate games and watching inappropriate film, but they're trying to make the game industry the only entertainment medium that is enforced by governmental laws. The ESRB is currently doing all it needs to in order to prevent kids from playing these games by having an incredibly easy to understand rating system. The government has no need whatsoever to step in on this issue, but the PARENTS need to step up and actually raise their kids, rather than letting media raise them.

Sodabread 88 Posting Whiz in Training

Ah, good. For a lot of your issues you may find that just running your app in debug (F5 to stop at the first breakpoint or F10/F11 to step through from the beginning) will help you find those small errors. Learning the debugger is HUGE in development rather than just trying to guess what you did wrong from the output it gives you.

Sodabread 88 Posting Whiz in Training

Ebay, does the compiler/IDE you're using have an integrated debugger?

Sodabread 88 Posting Whiz in Training

The better thing to do would be to let us know where you get stuck so we can help you *learn* specifics, rather than just getting a finished product and plugging that code into your project. I'm not saying that's exactly what you'll do, but it seems to be a habit of many around this site.

Sodabread 88 Posting Whiz in Training

Well, what kind of games do you want do make? If you want to make shorter quick play style games, then go with Flash. If you want to make longer games with bunches more content, go with C#. If you want super rapidly developed games, go with Flash. If you ever want to be able to make real money with your games, go with C#. Or just learn a bit of both and figure which one you like better =)

Sodabread 88 Posting Whiz in Training

SodaBread in your Defence that isn't the most easiest code to explain.

Lets take you original code.

Look at attachment


Now when you make X= Recursion(X);
X is Redifined when the stack is returned because X= is left waiting until it is done. So when You return X; the new value is returned.

Hope this makes sense.

Maybe not, but I was trying to explain it in the sense of what he's actually trying to accomplish.

Sodabread 88 Posting Whiz in Training

As said by a shirt on ThinkGeek, In order to understand recursion, one must understand recursion.

Honestly, I think it's much easier to explain in pseudo code than actual code.

Directory dir = <location>
call renameFilesInDir(dir)

function renameFilesInDir(Directory dir)
    
    foreach(file f in dir)
        rename file

    foreach(directory d in Dir)
        renameFilesInDir(dir)

end

The directory ("C:\" as an example) is created, sending that down into a function. The function does its renames the files, then calls itself for each directory in the root directory. The subsequent call(s) treats the passed in dir (let's use "C:\Windows") as the root, then loops through that entire directory, performing the same exact steps; it renames the files, then calls the function once again for each directory that is in C:\Windows.

In this example, the function will continue to do this until it gets into a folder which has no more folders, so the renameFilesInDir function is not called, the function goes back to the previous call and calls the function again for the next Directory in dir.

Call 1:
dir = C:\

Call 2 (from C:\):
dir = C:\Documents and Settings\

Call 3 (from C:\Documents and Settings\)
dir = C:\Documents and Settings\User 1\

No directories in User 1
Fall back to Call 2

Call 3 (from C:\Documents and Settings\)
dir = C:\Documents and Settings\User 2\

No directories in User 2
Fall back to Call 2

No more directories in Documents …

jonsca commented: Good explanation +4
Sodabread 88 Posting Whiz in Training

A game engine is what runs the game. This can be any combination of rendering engine, input, sound, messaging, saving/loading, and more. The game is then built on top of this underlying framework.

Sodabread 88 Posting Whiz in Training

And this is exactly what I'm talking about. Shouldn't the terminology be taught early on with stuff like cout, variables and if statements? I would think that it would be a big topic so that students & self-learners can be proficient in talking to others about it and understanding others' material that may not be so reserved in their tech talk.

C++ may not be his native tongue.

Sodabread 88 Posting Whiz in Training

I know this doesn't really fall under computer science, but it's the only forum that this would make sense in.

Is it just me, or does it seem like there are a lot of new programmers that don't understand basic terminology about their language of choice? I don't mean this in any way to be derogatory toward those who are beginners, but I'm curious as to why many of them don't get even the most basic explanation when talking in coding terms.

An example:
I made a replied to a post in the C++ forum and let the OP know that the reason for their error was that the variable they were trying to use (and was coming up with a random number) was uninitialized and/or unassigned. The next reply was "I'm not sure I understand what you mean exactly." Now, that could have been because I didn't delve deeply into the post, just let them know that an uninitialized variable is filled with junk and needs to be initialized or assigned before it can really be used.

Shouldn't this be something that's learned early in tutorials, books & classes? Is there a major deficiency in the way programming is taught? Or do I just happen to run into the certain folks all the time that copy & paste code then try to modify it without having a clue what they're doing?

Sodabread 88 Posting Whiz in Training

Well, some code tags & code formatting would help us help you. It also helps to know what your error is.

Regardless, I'm going to assume that the compiler is spitting back an error saying that it's throwing back that ave needs a different type of variable passed into it. With that guess (however wrong it may be), ParentsAge itself is a pointer (as are all arrays). Just pass ParentsAge instead of &ParentsAge.

Sodabread 88 Posting Whiz in Training

You never initialize score. If you don't initialize or assign a value to a variable, it's filled with crap. No one likes a crap filled variable. No one.

Sodabread 88 Posting Whiz in Training

Well, here's one way you can do it. I'm not sure on the efficiency in general, but it will clean up the code a little bit and make it look pretty =)

static int main()
{
    List<List<string>> listList = new List<List<string>>();
    
    for(int i = 0; i < numLists; i++)
        listList.Add(new List<string>());
    ...
    if(ListsHaveVals(listList) == "")
        ...
}

private string ListsHaveVals(List<List<string>> listList)
{
    StringBuilder str = new StringBuilder();
    int counter = 0;

    foreach(List<string> li in listList)
    {
        if(li.Count <= 0)
        {
            str.Append(counter.ToString());
        }
        counter++;
    }
    return str.ToString();
}

Not sure if this fits your requirements, but it makes it easier if you need to change the number of lists. This way it will stay dynamic so you can have 3 lists for 40 lists and it will still work.

Sodabread 88 Posting Whiz in Training

What have you tried so far?

Sodabread 88 Posting Whiz in Training

That I'm not too sure about. You may want to mess around with the points/dimensions a little bit to see what fits your requirements but mostly what works. You may be able to search for the ratio between application coordinates and actual distance. Print something out, see where it lands on the piece of paper, put the paper back in, oriented differently and try again. There's got to be a way to do it without trial and error, but I don't know how.