games using 2D array

i have no idea about my assignment..my assignment is all about games using 2D array in c++....i don't know what games should i do..can anyone help me??
Kind of hard to say without more specific information. Is your game supposed to display a 2d array of some sorts, like for instance snake?
i think i wanna do checker game but i don't how to do the simple code involving 2D array...
Maybe a car game were you must avoid oncoming cars on a road (http://www.youtube.com/watch?v=g4tZT6rAyek) ? Or a zombie survival game where you must shoot zombies (http://www.youtube.com/watch?v=-wgLmWT0m_A). You could also make a rouge-like, pac-man clone, tic tac toe, snake, tetris, battleship, minesweeper etc.
Last edited on
tic tac toe game can b made by 2d array
may i know the coding
for a 2D array? the coding would be for integer type

 
int my_array[a][b];


where a and b are the array dimensions, then you can assign the elements of the array my_array[0][0]=... my_array[0][1]=.... in which ever way is best for you

vectors have much more support from the standard library that C++ gives you, a 2d vector is defined as
 
vector<vector<int> >my_vector;


and then my_vector[0][0]=...

the tutorial on this site covers it, and im sure a googleplex other posts on this forum do too...
full coding of car game
Dude, we're not going to code the whole thing for you. If you need some help on specific things, or to see how you could make it, you can check out the source code in the video I posted. But don't copy the whole thing: that's plagiarism.
I agree with Stupebrett, it's generally never advisable to ask people to do your work for you. You have several ideas for games here now, and a google-search will give you lots of tutorials for c++ game development of all kinds. This is a place to ask questions related to specific problems in your code, and we'll be glad to help with those, but no one is going to do all your work for you ;)
i will not going to copy the whole coding and i just want to see the example for the games....but anyway...thanks for your respon... :)
Topic archived. No new replies allowed.