games using 2D array

Dec 8, 2011 at 4:28pm
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??
Dec 8, 2011 at 4:52pm
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?
Dec 8, 2011 at 6:29pm
Dec 9, 2011 at 2:57am
i think i wanna do checker game but i don't how to do the simple code involving 2D array...
Dec 9, 2011 at 7:04am
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 Dec 9, 2011 at 7:06am
Dec 9, 2011 at 10:20am
tic tac toe game can b made by 2d array
Dec 14, 2011 at 2:23am
may i know the coding
Dec 14, 2011 at 6:46am
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...
Dec 16, 2011 at 2:04am
full coding of car game
Dec 16, 2011 at 8:47am
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.
Dec 16, 2011 at 8:56am
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 ;)
Jan 6, 2012 at 3:36am
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.