62 Replies - 89187 Views - Last Post: 20 April 2016 - 09:00 AM
#16
Re: Request a Tutorial
Posted 19 August 2009 - 06:30 AM
#17
Re: Request a Tutorial
Posted 19 August 2009 - 11:41 AM
NeoTifa, on 19 Aug, 2009 - 05:30 AM, said:
yes. i made a poor attempt myself, here:
#include <fstream> #include <iostream> #include <string.h> #include <windows.h> using namespace std; int main() { HANDLE hConsole; hConsole = GetStdHandle (STD_OUTPUT_HANDLE); int buyinput [0]; int choice [2]; int num_items = 0; int potion = 0; bool glov01 = 0; bool belt01 = 0; bool vest01 = 0; bool shoe01 = 0; bool pant01 = 0; bool whip01 = 0; int proj01 = 0; int bloo01 = 0; int poti01 = 0; int anti01 = 0; const int max_items = 10; // list of items for user to pick// cout<< "Items for sale:\n"; cout<<"0. a leather belt with pouches 15G\n"; cout<<"1. a pinstripe vest 15G\n"; cout<<"2. suede boots 10G\n"; cout<<"3. durable cargo pants 20G\n"; cout<<"4. warm knitted gloves 5G\n"; cout<<"5. a plain leather whip 50G\n"; cout<<"6. throwing knives [5] 30G\n"; cout<<"7. a vile of blood 30G\n"; cout<<"8. a healing potion 20G\n"; cout<<"9. an antidote potion 20G\n"; // player asked if they want to buy something printf( "Would you like to buy an item?\n1=Yes\n0=No"); fgets(buyinput); if (buyinput){ printf( "please pick an item to add to your inventory\n"); printf("The ammount of weight you can hold will drop 5 points for every item you have.\n\n"); fgets(choice); if numitems < max_items { if (choice, "0" ) == 0 ) //add item '0' to inventory { printf ( belt01 "has been added to your inventory."); numitems = +1; belt01 = +1; } else if (choice, "1" ) == 0 ) //add item '1' to inventory { printf ( vest01 "has been added to your inventory."); numitems = +1; vest01 = +1; } (choice, "2" ) == 0 ) //add item '2' to inventory { printf ( shoe01 "has been added to your inventory."); numitems = +1; shoe01 = +1; } (choice, "3" ) == 0 ) //add item '3' to inventory { printf ( pant01 "has been added to your inventory."); numitems = +1; pant01 = +1; } (choice, "4" ) == 0 ) //add item '4' to inventory { printf ( glove01 "has been added to your inventory."); numitems = +1; glove01 = +1; } (choice, "5" ) == 0 ) //add item '5' to inventory { printf ( whip01 "has been added to your inventory."); numitems = +1; whip01 = +1; } (choice, "6" ) == 0 ) //add item '6' to inventory { printf ( proj01 "has been added to your inventory."); numitems = +1; proj01 = +1; } (choice, "7" ) == 0 ) //add item '7' to inventory { printf ( bloo01 "has been added to your inventory."); numitems = +1; bloo01 = +1; } (choice, "8" ) == 0 ) //add item '8' to inventory { printf ( poti01 "has been added to your inventory."); numitems = +1; poti01 = +1; } (choice, "9" ) == 0 ) //add item '9' to inventory { printf ( anti01 "has been added to your inventory."); numitems = +1; anti01 = +1; } else printf( "That is not a valid option." ); }} if (numitems = max_items) { printf( "You cannot buy this--\nYou are carrying the maximum ammount of items for your level."); { cout << inventory[i] << endl; // get data from player's inventory.txt file and list it. cout << "Your items:\n"; cout<< "The ammount of items you may now carry is\n"; cout<< x-10<<endl; } else cout << "You have too many items and can't carry anymore weight."; // get data from player's inventory.txt file and list it. cout << "\nYour items:\n"; getchar (); return 0; } cout<<"Would you like to buy an item?\n1=Yes\n0=No" cin>> buyinput; return 0;}
which is failing terribly-- mainly (so i'm told) because i made the mistake of defining the items, which ended up replacing the bool names (ie. glove01 is 'warm knit gloves', so bool glove01 = 0 is now bool 'warm knit gloves' = 0) which i somehow need to change, while making it so that if you 'look' or 'buy' the gloves, it will show the defined version. such as, "'warm knit gloves' has been added to your inventory", rather than "'glove01' has been added to your inventory."
i can't find a decent inventory or store tutorial out there, and i think that such a tutorial would help a lot with developing other aspects of the game, too.
#18
Re: Request a Tutorial
Posted 19 August 2009 - 12:47 PM
#19
Re: Request a Tutorial
Posted 19 August 2009 - 01:02 PM
NeoTifa, on 19 Aug, 2009 - 01:47 PM, said:
Creating a nice GUI with C++, with out using something like MFC or other libraries, can be a pain in the a**. It is not as easy as Java and .NET languages.
#20
Re: Request a Tutorial
Posted 19 August 2009 - 07:39 PM
#21
Re: Request a Tutorial
Posted 25 August 2009 - 03:13 AM
Language: Java
Subject: Modelling a tech tree, for a strategy game, with dependencies.
Purpose: To generate example code for implementation in an actual game, and generate example code, as there does not appear to be anything around.
Comments: I havent seen anything like this, anywhere I've looked, and given that alot of games have some sort of tech tree, or other tree like structure. I think it would help alot of users.
#22
Re: Request a Tutorial
Posted 20 September 2009 - 07:50 AM
Im looking to start from basics and ive been reading so much OpenGl but its all 3d. i wanted to make a simple 2d game to start.
I use DEV C++, which i definately prefer but if it becomes neccessary i have visual studio XP2008.
So now what i was wondering if anyone knows of an existing tutorial for this or if anyone could make me one. Id like it if someone would make a simple tutorial for making OpenGL render 2d and use 2d co-ords. Surely other people like retro 2d games and also use open gl so hopefully someone can help.
I have all the windows elements from example codes i assume they wont change much or atall.
Thanks so much.
If anyone wants i have attached the code i have so far which does little more than create a window.
Attached File(s)
-
2D.zip (168.82K)
Number of downloads: 840
#23
Re: Request a Tutorial
Posted 20 September 2009 - 07:50 AM
I've been looking around alot for a FMOD Ex tutorial in c++ (on linux). But can't seem to get any luck..
Does anyone know the low-level FMOD API?
template:
Title : Using the FMOD Ex low-level api
Language : c++
Subject : FMOD is a sound manipulation library
Purpose : 3d sound, game sound
Comments : This would be helpful for many
#24
Re: Request a Tutorial
Posted 20 September 2009 - 09:08 AM
DustyD, on 20 Sep, 2009 - 06:50 AM, said:
I've been looking around alot for a FMOD Ex tutorial in c++ (on linux). But can't seem to get any luck..
Does anyone know the low-level FMOD API?
template:
Title : Using the FMOD Ex low-level api
Language : c++
Subject : FMOD is a sound manipulation library
Purpose : 3d sound, game sound
Comments : This would be helpful for many
I made a nice little sound manager using the FMOD library, it is here http://www.dreaminco...wtopic61042.htm. Its should help you to get started.

#25
Re: Request a Tutorial
Posted 06 October 2009 - 01:37 PM
Language: C#/XNA
Subject: Creating games with XNA Game Studios
Purpose: To learn how to create games for Xbox 360
Comments: This would really helpful for me. I have a strong desire to work for Microsoft's Gaming Section
This post has been edited by programmerguy: 06 October 2009 - 01:38 PM
#26
Re: Request a Tutorial
Posted 28 November 2009 - 04:21 AM
BTW, in the above example, I would create a variable for the amount of sweat your character produces based on stats, gender and a boolean flag that returns true if there is deodorant in the inventory... then measure the distance between the ogre and the player, triggering the flag bool CanSmell if the delta between them is less than or equal to the square times two of the ogre's nostril
#27
Re: Request a Tutorial
Posted 29 November 2009 - 04:47 AM
Everything is outdated and the one in the xna game creators club is already written without any steps or guide
on how to make one plus i want to make my own custom menu.
Goals:
Simple menu :
1).New game
i think the rest are a little bit obvius on how to make them if you made the first one.Like Exit,Configuration etc.
Thanx in Advance.

#28
Re: Request a Tutorial
Posted 01 December 2009 - 09:23 PM
#29
Re: Request a Tutorial
Posted 08 January 2010 - 06:26 PM
EDIT: Also does anyone know if there is a way to use C# on Linux
This post has been edited by Masterchief117.arbiter: 08 January 2010 - 06:28 PM
#30
Re: Request a Tutorial
Posted 08 January 2010 - 07:11 PM