2 Questions about Console Programming

Started by
8 comments, last by SoDdit 19 years, 8 months ago
1. What languages can be used to make a console game? 2. What are some good console dev-kits?
Advertisement
my opinion is with c++

example :

#include <stdio.h>#include <conio.h>#include <stdlib.h>//----------------------------------- U Can change this setting by change its values#define SWORDHIT 20#define AXEHIT 30#define STAFFHIT 40#define ENEMYHIT 20//-----------------------------------//Declare global variablesint health = 100;  //Player health\//----------------------newint MaxHit=0;int EnemyHit=ENEMYHIT;//----------------------int enemyh = 100;  //Enemy healthint choice; //turn choice//Declare functionvoid ebattle();  //Enemy battle functionvoid battle();  //Player battle functionint main(){  int weapon;  //Current weapon  randomize();  printf("Armor core arenas\n");  printf("Welcome to armor core arenas! The game where you fight against your\n");  printf("opponent in an arena with a weapon of your choice.\n\n");  printf("Please choose your weapon\n");  printf("1.  axe\n");  printf("2.  sword\n");  printf("3.  staff(magic)\n\n");  while(weapon<49||weapon>51)  {		weapon=getch();  }  weapon-=48;  switch(weapon)  {	case 1:	printf("You have chosen the axe. The battle will now comence!\n");	printf("your opponet will be the crusher. he is a large opponet who also weilds an axe\n");	MaxHit=AXEHIT;	break;	case 2:	printf("You have chosen the sword. The battle will now comence!\n");	printf("your opponet will be the crusher. he is a large opponet who also weilds an axe\n");	MaxHit=SWORDHIT;	break;	case 3:	printf("You have chosen the magic staff. The battle will now comence!\n");	printf("your opponet will be the crusher. he is a large opponet who also weilds an axe\n");	MaxHit=STAFFHIT;	break;  }  printf("\n");  int turn=0;  while(health>0 && enemyh>0)  {		printf("-----------------------Turn %d --------------------------\n",++turn);		battle();		ebattle();		printf("\n\n");  }  if(health>0) printf("You WIN!!\n");  else if(enemyh>0)printf("You Lose!!\n");  else printf("Draw!!");  return 0;}void battle()  {	printf("It is your turn. what do you do?(1 to attack and 2 to heal)\n\n");	while(choice<49||choice>50)	{		choice=getch();	}	choice-=48;	if(choice==1)	{		int hit=random(MaxHit);		if (hit>0)		{			printf("You have attacked him! %d point\n",hit);			enemyh = enemyh - hit;			if(enemyh>0) printf("He now has  %d  health left\n\n",enemyh);			else printf("He now has died \n\n");			printf("Your Hit Level : ");			if(hit>(MaxHit-(MaxHit*10/100))) printf("Perfect hit !!!!!!!\n");			else if(hit>(MaxHit-(MaxHit*50/100)))			{				switch(random(3)+1)				{					case 1:					printf("Powerfull Hit !!\n");					break;					case 2:					printf("Superb Hit !!\n");					break;					case 3:					printf("Revenge Hit !!\n");					break;				}			}			else printf("Normal hit\n");			printf("\n");		}		else{printf("Missed !!\n");}	}	else	{	health = health + 20;	printf("You have healed your-self! health up to %d\n\n",health);	}}void ebattle() {	int hit=random(EnemyHit);	health = health - hit;	printf("It is his turn to attack! he has struck you with his mighty weapon!\n");	if(health>0) printf("you now have only %d health left!\n\n",health);	else printf("You Has Died !!");}
I think he might have been referring to a game console (PS2, X-Box, Gamecube). I think c++ is used on them, but I am not certain. I also think each system has a special dev kit that costs a ton of money...
Sean Henley [C++ Tutor]Rensselaer Polytechnic Institute
Quote:Original post by DynaEmu
1. What languages can be used to make a console game?

2. What are some good console dev-kits?


1. All three current generation consoles can be programmed using C or C++. There are compilers for both sets of code.

2. The only console devkits are the ones provided by the manufacturer. Sony, Nintendo and Microsoft sell them to license developers. There are homebrew kits that you can use but they will all need some kind of mod-chipped console. The PS2-Linux devkit is not infact the same as the T10000 Sony Tool, contrary to what people say. It is a linux implementation with an OpenGL layer writing to the hardware.

You are incorrect Sphet.

The PS2-Linux isnt just a linux implementation with an OpenGL layer writing to hardware.

It is infact VERY similar to the T10000 Kit. Although it does come with an OpenGL implementation, you do NOT have to use this, you can write direct to the hardware, as you do with the T10000 kits. Although some of the function calls have different names. I've moved all my NATIVE PS2-Linux code across to a T10000 kit, and with a little modification (i.e the function calls) it works perfect.

All the docs that are needed to do this are included in PDF on the CD-ROMs.

Quote:Original post by RavNaz
You are incorrect Sphet.

The PS2-Linux isnt just a linux implementation with an OpenGL layer writing to hardware.

It is infact VERY similar to the T10000 Kit. Although it does come with an OpenGL implementation, you do NOT have to use this, you can write direct to the hardware, as you do with the T10000 kits. Although some of the function calls have different names. I've moved all my NATIVE PS2-Linux code across to a T10000 kit, and with a little modification (i.e the function calls) it works perfect.

All the docs that are needed to do this are included in PDF on the CD-ROMs.



My apologies. I didn't realize that there was enough information released with the linux kit to be able to write directly to the GS. I also didn't know you could write to the Vector Units; I wasn't aware they included a VU compiler.
Oh yes, you get the lot. Obviously though you have the OS overhead, but apart from that its all good.

The manuals you get with the PS2-Linux kit are the same hardware manuals you get with the T10000 kits.

Definately wouldn't recommend it for the beginner though.
T10000's aren't really similar to the PS2 Linux kit. You get most of the manuals with PS2 Linux, but no SPU2 manual. ps2gl is a non-Sony project that is hosted on playstation2-linux.com, along with a ton of other projects.

The Linux kit is just a network adaptor + hard drive, USB keyboard and mouse, and two DVDs. The T10K is a monstrous thing that takes up a ton of desk space and has some different internals compared to a consumer PS2.

Since the network adaptor and hard drive can now be gotten in stores, and there isn't anything special about the USB keyboard and mouse, what you're really paying for when you buy PS2 Linux is the hardware manuals.

Back to the topic, as a hobbyist... the PS2 Linux kit or some of the homebrew Dreamcast and GBA stuff is about as close as you'll get to a real devkit. Console manufacturers don't just give out their dev and test kits. But homebrew stuff is pretty interesting and generally a good way to learn about programming consoles.
you get all the manuals minus the spu manual. And no your not just getting the manuals, your also getting the sony libraries that allow you to program the kit.

If you can program the PS2-Linux kit natively, then your going to have no problems on a T10000 kit.
You can turn an off the shelf xbox into a dev box with the addition of a mod chip (iilegal in many countries), provided you dont mind voiding the warrenty (try to get a cheap second hand one). then you "find" the XDK (xbox developers kit), tho i'm not telling you how in case i get into trouble with the moderators.

Once its all setup its a piece of piss to get your first app running coz XBox uses DirectX 8 so you can compile any existing directx 8 code you got for PC straight onto it.

I'd also point out to you that on consoles you've got the drawback of limited RAM, as none (that i'm aware of) offer you virtual memory like the PC does so you gotta be very careful when you allocate mem. Xbox only has 64 megs, PS2 has 32. not sure about the others.
i is 1337

This topic is closed to new replies.

Advertisement