Hello Guest, please login or register.
Did you miss your activation email?
Login with username, password and session length.

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Topics - Hero of Vortex

Pages: [1]
1
Coding / (C++) Window Size in Allegro
« on: July 09, 2009, 07:13:00 pm »
So, yeah, I've been learning more about Allegro, but I haven't actually seen anything about changing the size of the screen when in windowed mode. When I tried, I ended up just messing around with the resolution (which, of course, didn't work, and made me feel stupid when I realized what it was I was changing).

If anybody here knows how to do this, then any help would be appreciated. Thanks!

I'm sure this is the right forum this time.

2
Entertainment / New Metroid Game announced
« on: June 03, 2009, 01:54:00 am »
So, Nintendo announced Metroid: Another M, developed by Team Ninja, at their press conference. The accompanying trailer showcased some gameplay and full cutscenes.

Personally, I think the cutscenes look a little generic/Final Fantasy-ish. The rest of it also seemed pretty generic and non-Metroid. Et vous?



Trailer link: http://wii.ign.com/dor/objects/14354733/metroid-other-m/videos/metroid_trl_e3_otherm_060209.html

3
Discussion / Java Compiling
« on: May 31, 2009, 10:02:23 pm »
I was wondering whether it is possible to create a Java application which can run outside of the IDE with basic code. I don't intend to create a GUI; what I'm trying to do is get a Java application with is basically a console sort of thing.

I'm using JCreator, which allows me to run a Java thing with a pure text output. I just want to know whether programs can be compiled and just do that.

Thanks!

4
Coding / Know Your Ancestors!
« on: May 22, 2007, 12:31:32 am »
Hi, I know it's been a while since I've posted, but I had other things to do and stuff.

Code: [Select]
// Know Your Ancestors 2:53 2-15-07

#include <iostream>
#include <string>
using namespace std;

int main()
{
    string Bling;
    int Splint;
    const long int BaTint = 999999999;
    const string Spwing = "Ghengis Kahn";
   
    cout << "Thank you for using KYA.\n";
    cout << "Please enter your last name: ";
    cin >> Bling;
    cout << "Please enter the year you were born: ";
    cin >> Splint;
    cout << "Calculating...";
   
    for (int Glint = 0; Glint < BaTint; Glint++)
    {
        // Do nothing
    }
       
    cout << "\nYour ancestor is: " << Spwing << "\n";
   
    cin.get();
    cin.get();
    return 0;
}

So... yeah. I'm pretty sure posting these still isn't againt the rules..

5
Is it just me, or does the opening cutscene in that Ultimate Alliance game look a lot like the All Your Base thing?

EDIT: Fixed the spelling mistake in the title.

6
Coding / [HELP, C++] Detecting ASCII codes EDIT: New question
« on: September 26, 2006, 12:03:39 am »
I'd just like to find out how to know how to detect what the ASCII code of something that has been entered is. Thanks.


EDIT: How do I detect a key being pressed in console mode? Or just tell me what text to google. >.>

7
Coding / [Question] Learn more, practice, or something else?
« on: September 17, 2006, 07:53:18 pm »
I would just like to know if classes, references, pointers, loops, strings, arrrays, i/o, variables, switch/if things, a bit of stl, functions, and about 1/20 dynamic memory is enough to get started on games. Should I practice more? Learn more advanced classes? Learn polymorphism, inheritance, etc.? Give up hope because I'm far to young to understand C++? Graphics? Keyboard?


Thank you for your time in helping me be a bit less n??ive.

8
Coding / [HELP] New types? O_o
« on: September 12, 2006, 11:49:44 pm »
Okay, I'm using Dev-C++, I'm playing around wih classes:

Code: [Select]
// Class practice
// I need it

#include <iostream>

using namespace std;

class Text
{
      public:
             int m_six;
             void Say();
}
     
Text::Text(int b)
{ // Line 16 right here for ya ZFGC
           
           m_six = b;
}
     
void Text::Say()
{
     cout << "Rawr";
}
}

int main()
{
    Text tootoo(8);
   
    cout << Say() << endl;
   
    cin.get();
    return 0;
}

Guess what error I get for line 16?


16 C:\Documents and Settings\Josh\Desktop\Saved Data\Savingstuff\c++\newBook\classpractice.cpp new types may not be defined in a return type

Is this just some new version error? I have version 4.9.9.2


HEELLPPPP

9
Coding / Favorite Game List Program
« on: September 06, 2006, 11:56:24 pm »
In other words: Iterators and vectors = CONQUERED!

Code: [Select]
//Favorite Game Listing program
// Thing

#include <iostream>
#include <string>
#include <vector>

using namespace std;

int main()
{
    vector<string> gameList;  // This is what will contain the list.
   
    vector<string>::const_iterator count; // This is what I'll use to display the list.
   
    short int areYouDone; // Will be used in both loops to see if the user is done with the loop
    short int whatToDelete; // Will be used in the delete loop to see which item to delete from the list
   
    enum stat { CONT, END }; // Declare the enumeration type I'll use for both loops. CONT means continue. END means... duh.
    stat Adding = CONT; // The enumeration I'll use for adding items
    stat Deleting = CONT; // The enumeration I'll use for deleting items
   
    string Add; // The string I will use for entering the next game title
   
   
    cout << "Welcome to the Favorite Game Listing Program (FGLP)\n";
    cout << "Add to and delete from a list of favorite game titles.\n";
    cout << "Saving isn't implemented at the moment, so every time you start" <<
         "\nthe program up you'll have to start over. ^_^ \n";
    cout << "First thing, of course, will be to add to the list.\n";
    cout << "To add to the list, type in the title of the game.\n";
    cout << "Please remove any spaces from the title.\n";
    cout << "Press enter when you are done typing.\n";
    cout << "If you want to continue, type one at the next prompt.\nIf not, type 0.\n";
    cout << "The adding phase will continue until you type 0 instead of 1.\n";
    cout << "After this is the deleting phase. Enter the number of the item you want to\ndelete.";
    cout << " Make the loop continue in the same way as the adding phase.\n";
    cout << "Enjoy! :P\n";
   
   
    while ( Adding == CONT ) // While the user still wants to continue adding...
    {
          cout << "Please enter the game title: ";
          cin >> Add;
          gameList.push_back(Add); // Pushy back the number of items in the vector and add the value of Add.
          cout << "\nWould you like to continue adding to the list: ";
          cin >> areYouDone;
          if ( areYouDone == false )
             Adding = END;
    }
   
   
    short int whatAt = 1; // What we'll use to show which number of title
    for (count = gameList.begin(); count != gameList.end(); ++count) // Creates a loop that adds to count until it goes through
    {
        cout << whatAt << ". "; // the whole loop.
        cout << *count << endl; // Here, I dereference the iterator to display the value.
        whatAt++;
    }
   
   
    while ( Deleting == CONT ) // While the user wants to continue deleting...
    {
          cout << "Please enter the number of the game title you would\nlike to delete: ";
          cin >> whatToDelete;
          whatToDelete -= 1; // Set this to the zero-starting-point value
          gameList.erase((gameList.begin() + whatToDelete));
          cout << "Would you like to continue deleting? ";
          cin >> areYouDone;
          if ( areYouDone == false )
             Deleting = END;
    }
   
   
    whatAt = 1; // What we'll use to show which number of title
    for (count = gameList.begin(); count != gameList.end(); ++count) // Creates a loop that adds to count until it goes through
    {
        cout << whatAt << ". "; // the whole loop.
        cout << *count << endl; // Here, I dereference the iterator to display the value.
        whatAt++;
    }
   
   
    cout << "Thank you for using the FGLP!\n";
    cout << "This was made to do an excercise in a book.\n";
   
    system("PAUSE");
    return 0;
}

Oh, and I only used system pause because cin.ignore() always immediately closes if I've already used it or entered a value for a variable. I don't feel like figuring it out right now. DON'T TELL ME!

10
Coding / (C++ and other programming languages) Pseudocode
« on: September 05, 2006, 10:51:40 pm »
Yes, I was just making some Pseudocode and decided to randomly do a tutorial. I will be using C++ but you can use pseudocode for whatever as well.


So, suppose this was actually a very big program.

Code: [Select]
#include <iostream>

using namespace std;

int main()
{
      cout << "I'm a big program.\n";
      return 0;
}


Pseudocode is like a programming language in english. In pseudocode, that would be:

Code: [Select]
Say "I'm a big program."
Of course, you could write it like this as well:

Code: [Select]
write out "I'm a big program."
But, you want to make it really real language-y, so...

Another example would be initializing a variable called eaten. You could say:

Code: [Select]
Initialize eaten to 0.
So, just plan out your code in pseudocode and you won't make as many mistakes when actually writing the program. YAYYYY

Pseudocode is not a recognized programming language. Please do not try to compile pseudocode. It won't work. Vortex Inc. is not responsible if, by trying to compile Pseudocode, you trash your computer.

11
Coding / RPG Shop Program (C++)
« on: August 29, 2006, 05:23:17 pm »
No, it does not have graphics. If I were up to grapics I'd be doing serious tests, not fun tests.

Anyways, I have discovered the importance of arrays, strings, stuff, and supplies.

Code: [Select]
// Shop program
// Testing my knowledge of arrays
// Shop items: Cowdude Breakdance Tutorial, Reltbot, Time Orb, Pie, Smoo's Lawyer

#include <iostream>
#include <string>

using namespace std;

void noMoney(void);

int main()
{
    typedef const short int IR; // IR stands for item related, but typedef is used for shortening things, sooo...
    IR MAX_ITEMS = 3;
    IR COWDUDE_BREAKDANCE_TUTORIAL = 1000;
    IR RELTBOT = 51;
    IR TIME_ORB = 51;
    IR PIE = 1050;
   
    int money = 50;
   
    string Buy;
    string Sell;
   
    string inventory[MAX_ITEMS];
   
    int numItems = 0;
    inventory[numItems++] = "Saber";
    inventory[numItems++] = "VortexPointModule";
   
    cout << "Your items:\n";
    for ( int i = 0; i < numItems; ++i )
        cout << inventory[i] << endl;
   
    cout << "You have " << money << " gold.\n";
   
    cout << "What would you like to sell?\n";
    cin >> Sell;
   
    if ( Sell == "Saber")
    {
       cout << "You sold your Saber!\n";
       money += 100;
       cout << "You now have " << money << " gold!\n";
       inventory[0] = "VortexPointModule";
       inventory[1] = " ";
       numItems--;
       }
    else if ( Sell == "VortexPointModule" )
    {
       cout << "You sold the VortexPointModule!\n";
       money += 1000;
       cout << "You now have " << money << " gold!\n";
       inventory[1] = " ";
       numItems--;
       }
    else
    {
       cout << "Invalid selection.\n";
       cout << "Can't you read!?\n";
       }
   
    cout << "Your items:\n";
    for ( int i = 0; i < numItems; ++i )
        cout << inventory[i] << endl;
   
    cout << "Your buying selections are:\n";
    cout << "CowdudeBreakdanceTutorial: 1000 gold\n";
    cout << "Reltbot: 51 gold\n";
    cout << "TimeOrb: 51 gold\n";
    cout << "Pie: 1050 gold\n";
    cout << "Smoo'sLawyer: 1600 gold\n";
   
    cin >> Buy;
   
    if ( Buy == "CowdudeBreakdanceTutorial" )
    {
         if ( money >= COWDUDE_BREAKDANCE_TUTORIAL ){
              cout << "You bought the breakdancing tutorial.\n";
              money -= COWDUDE_BREAKDANCE_TUTORIAL;
              inventory[1] = "Cowdude Breakdancing Tutorial";
              numItems++;
              }
         else
             noMoney();
    }
   
    else if ( Buy == "Reltbot" )
    {
         if ( money >= RELTBOT ){
            cout << "You bought a Reltbot!\n";
            cout << "BA-DA-DA-DAAAAA!\n";
            money -= RELTBOT;
            inventory[1] = "Reltbot";
            numItems++;
            }
         else
             noMoney();
    }
   
    else if ( Buy == "TimeOrb" )
    {
         if ( money >= TIME_ORB ){
              cout << "You bought the Time Orb.\n";
              money -= TIME_ORB;
              inventory[1] = "Time Orb";
              numItems++;
              }
         else
             noMoney();
    }
   
    else if ( Buy == "Pie" )
    {
         if ( money >= PIE ){
              cout << "You bought some Pie!\n";
              money -= PIE;
              inventory[1] = "Pie";
              numItems++;
              }
         else
             noMoney();
    }
   
    else if ( Buy == "Smoo'sLawyer" ){
         cout << "SUE!\n";
         money -= money;
         }
   
    else
        cout << "Silly rabbi, kicks are for trids!\n";
   
    cout << "You now have " << money << " gold.\n";
   
    cout << "Your items:\n";
    for ( int i = 0; i < numItems; ++i )
        cout << inventory[i] << endl;
         
   
    system("PAUSE");
    return 0;
}

void noMoney(void)
{
     cout << "You don't have enough money for that!\n";
}

EDIT: Oh, yes, and about two fifths of it are modified from the book I'm using. There, no plagarizing.

12
Coding / [HELP] Broken do while loops
« on: August 18, 2006, 12:16:51 am »
My Do While loop is broken.  :'(

Here is the code from it:
Code: [Select]
    do
                                       switch ( turn )
                                       {
                                       case 1:
                                            compGuess = rand(); // Randomize the var.
                                            compGuess %= 100; // Get the remainder, which is within one hundred.
                                            compGuess += 1; // Make sure it isn't zero.
                                            break;
                                       case COMP_TURN:
                                            status = END; // Set the game status to END, which means lost.
                                            break;
                                       default:
                                            tempHold = compGuess; // Hold the var.
                                            if ( hiLo == 1 ) {
                                                 compGuess = rand(); // Randomize
                                                 compGuess %= 510; // Make the var  something 0 through 9
                                                 compGuess += 1; // 1 through 10
                                                 compGuess += tempHold; // Add the result to the previous guess.
                                                 }
                                            else if ( hiLo == 3 ) {
                                                 compGuess = rand(); // Randomize
                                                 compGuess %= tempHold; // Make it a number 0 through one number less then it's
                                                                        // Last guess.
                                                 compGuess += 1; // 0 through last guess.
                                                 }
                                            else if ( hiLo == 2 )
                                                 status = WIN; // Set it to LIEK YOU WINZ0RZ
                                            else
                                                status = END; // Punish the player for being stupid and
                                                              // typing in an unvalid input.
                                            break;
                                       }
                                       cout << "\nThe computer's guess is " << compGuess << ".\n";
                                       cout << "What say you? ";
                                       cin >> hiLo;
    while ( status = CONTINUE );

The error messages from my compiler are:

63 C:\Documents and Settings\Josh\Desktop\Saved Data\Savingstuff\c++\newBook\Rebmun Ym Sseug Desreved.cpp expected `while' before "cout"
63 C:\Documents and Settings\Josh\Desktop\Saved Data\Savingstuff\c++\newBook\Rebmun Ym Sseug Desreved.cpp expected `(' before "cout"
63 C:\Documents and Settings\Josh\Desktop\Saved Data\Savingstuff\c++\newBook\Rebmun Ym Sseug Desreved.cpp expected `)' before ';' token


Oh, and line 63 is that first cout.

What stupid thing am I doing this time? >.>

EDIT:
Changed the icon to the C++ icon because I'm nit-picky like that.

13
Debates / Embryonic Stem Cells
« on: August 03, 2006, 10:25:44 pm »
Well, what do you think about them? Is making them in the interests of medical science ethical or no? Personally, I think it is, seeing as while it is a life form, it is still just a clone of a cell from an already existing person, and would never become a human anyway, since it would have to be... re-inserted... for that to happen. Source of my argument and knowledge of embryonic stem cells: Nova Science Now.

14
Coding / (C++) What's this thing do?
« on: August 02, 2006, 06:25:44 pm »
I found something called cin.ignore on Cprogramming.com, but it seems to do the same thing as cin.get. What's the difference?

15
Coding / Boredness Rater
« on: August 01, 2006, 12:42:23 am »
I was bored, so I decided to make a boredness rater. Note how I was so bored, I neglected to comment it.

Code: [Select]
//I'm bored
//:D

#include <iostream>

using std::cout;  // This is how we show things.
using std::cin;  // This is how we get things to influence our show things.

int main ()
{
    int amountBored; //How much the person is bored.
   
    cout << "I'm bored.\n";
    cin.get();
    cout << "Are you bored as well?\n";
    cin.get();
    cout << "You are? Neat!\n";
    cin.get();
    cout << "On a scale of one to ten, how\n much are you bored?\n";
    cin >> amountBored;
   
    switch (amountBored) {
           case 1:
           case 2:
                cout << "You are NOT bored.\n";
           break;
           
           case 3:
           case 4:
                cout << "Eh, I don't think you can call\n yourself bored. =|\n";
           break;
           
           case 5:
                cout << "You're getting there!\n";
           break;
           
           case 6:
           case 7:
                cout << "That's about as bored as I am right now.\n";
           break;
           
           case 8:
           case 9:
                cout << "Woah, you'd better find someting to do!\n";
           break;
           
           case 10:
                cout << "I pity you, lost soul.\n";
           break;
           
           default:
                   cout << "Invalid input. Can not compute.\n";
           break;
    }
   
    cin.get();
    cin.get();
   
    return 0;
   
}

16
Entertainment / Legend of Zelda: Twilight Sandbox?
« on: July 17, 2006, 12:39:52 am »
So, I was Boy Scout camp, and I was thinking about how I was in the mood for a sandbox game Eventually, my thoughts turned to how they said TP would be long, and then I thought "wouldn't it be great if TP were a sandbox game? Post your opinions here... or, you know, don't post at all, but I'd prefer ifd you did. :D

Foir those who don't know what a sandbox game is: Wikipedia Entry

17
Hi, I'm trying to get Gamemaker to make the number of player objects in a multiplayer game the amount the player wants.

In other words, I have the player say how many players they want in their game, that number is saved to a variable, and then an object in the playing room creates the correct number of player objects. I'm trying to do this with only one object, so that I don't have to make it so that you have no control over the amount of players... Is this possible?

18
Code: [Select]
// Gold Fish Feeding Simulator
// Another Ranom Product from Vortex Inc.
// Wait, hold on, I could turn this into a game...

#include <iostream>  // What we have to do to be able to show anything.

using std::cout;  // This is how we show things.
using std::cin;  // This is how we get things to influence our show things.

#include <iomanip>  // No idea, going to have to read my C++ book again. And maybe finish it. >.>

using std::setw;

#include <cstdlib>  // I THINK this is for something random.

#include <ctime>  // I know this is the time function that we use for true randomness.

int main() // The main program, this is what determines what we see.
{  // I got this far and then I realized game potential. >.>
   
   enum Status { CONTINUE, LOST, SSSS }; // Enumeration for the game status.
   
   int aFeed; // This is the amount you feed the gold fish on your turn.
   int aTake; // This is the amount the gold fish can take total, it's seperate because I don't want it to
              // randomize each turn.
   int rTake; // What I'll use to determine how much it can take. It will get a random amount, and that aTake will
              // Recieve it's value.
   int hTake; // This is how much the goldfish has already taken. When this is equal to or above aTake, the goldfish
              // will... err... explode. >.>
   int cTake; // How much the player enters in the while loop, this is added to hTake.
   int aNeed; // You still have to feed the gold fish enough. This is the non-random part.
   int rNeed; // This is the random variable from which aNeed gets it's value.
   
   Status game;
   
   srand( time( 0 ) ); // I'm using this to make the amount random.
   
   rNeed = ( 20 + rand() % 25 ); // Find out how much the gold fish needs.
   aNeed = rNeed; // Assign the value to aNeed.
   
   rTake = ( 24 + rand() % 26 ); // Find out when the gold fish will explode.
   aTake = rTake; // Assign the value to aTake.
   
   cout << "Gold Fish Feeding Game!\n"; // The title.
   cout << "Feed the gold fish enough food to survive, but \n"; // Instructions.
   cout << "Don't overfeed it or it will explode!\n"; // Some more instructions.
   cout << "When it asks you, enter how much food you feed the goldfish.\n"; // Instructions.
   cout << "Enter 7777 to not feed the goldfish any more.\n"; // How to break out of feeding.
   cout << "\n"; // To put some space in between the game and the instructions.
   
   cout << "How much will you feed the fish?\n"; // First prompt.
   cin >> hTake; // Give hTake the value of the amount.
   
   game = CONTINUE;  // Do this so we don't skip the while loop.
   
   while ( game == CONTINUE ) {  // The while loop.
         cout << "How much more will you feed the fish?\n"; // The second occurence of the prompt.
         cin >> cTake; // The player enters the amount.
         if ( cTake == 7777 )// If the player wants to stop feeding the fish...
             game = SSSS;
         else
             hTake + cTake; // Add the amount of cTake to hTake.
         if ( hTake >= aTake )
            game = LOST;
         }
   if ( game == LOST )
      cout << "Oh no! You exploded the fish! Now \nLittle Joey will throw a tempertantrum.\n"; // Tell the player it exploded!
   else if ( game == SSSS ) { // I'm using an else if so that I can have an error message option.
        if ( hTake > aNeed ) // If you fed the fish enough...
           cout << "You fed the fish enough and it survived! Yaayyy!\n"; // Give a victory message.
        else // Otherwise...
            cout << "You didn't feed the fish enough and it died. \nShame on you!\n"; // The fish died! Punish the player!
            }
   else // If the game isn't experiencing either of these options, we have a problem.
        cout << "This game has had an unexpected error\n and needs to close.\n"; // Give the error message.
   
   system("PAUSE"); // Allow the player to read the message he got before closing.
   
   return 0; // Signal success.
   
} // End the program. That's it, folks!

Oklay, I think everything else is going fine, but when I put in an amount I know is enough for the fish, it still says I didn't feed it enough. I know I fed it enough because I temporarily made hte variable of how much it needs a certain amount (22). Any suggestions? Comments? Code that would optimize the game but is cryptic to me?

19
Code: [Select]
// I had an urge to program something...
// I know, I'm crazy.

#include <iostream>

using std::cout; // These were either made for the lazy or to save space.
using std::cin;

// I don't think I'll need any functions.

int main() // Start main program.
{
   
    int YourNumber;  // The variable that I'll use.
                     // Not that it changes anything. :D
   
    cout << "Hello there.\n"; // Says a greeting.
   
    cin.get(); // Some wierd thing I see on the internet a lot that
               // is supposedly better than system pause but does the same thing. =\
   
    cout << "I would very much like to \nknow your favorite number.\n"; // The indication of what to enter.
   
    cin >> YourNumber; // This is how we input our variables. Input our variables,
                       // input our variables...
   
    cout << "WTF? Your favorite number is "; // Insult. Note how putting
    cout << YourNumber; // the variable there makes it show the number.
    cout << "?! \n";  // Just putting this here to show that it is part of the insult.
                                                                 
   
    cin.get(); // That wierd thingy again...
   
    cout << "You're strange.\n";  // Last message and insult. :D
   
    cin.get(); // THat thing one more time.
   
    return 0;  // Signal the compiler that everything was succesful.
   
} // The end of the main program! Though calling it "main" is kind of innacurate when
  // there aren't any functions.


And you can see that when I say random, I MEAN random. >.>

20
Entertainment / Your Thoughts/Theories on Metroid Prime 3
« on: April 03, 2006, 12:04:09 am »
I think the reason they showed a new ship was because Samus's gunship couldn't penetrate the Phazon rich atmosphere, maybe because it was more of a shell. I think the basic enemy (i.e. Zoomer in Metroid/Zero Mission) will be a glob of Phazon. I also think that Dark Samus/Metroid Prime still won't fuggin die! She/he/it will probably mutate into the X parasite, go back in time, and infest SR388 or something...

Pages: [1]

Contact Us | Legal | Advertise Here
2013 © ZFGC, All Rights Reserved



Page created in 0.086 seconds with 33 queries.