JJacobs Posted June 4, 2012 Share Posted June 4, 2012 Hey guys been looking on the web again with no luck:(,but thankfully there is a great helpful community within the nexus forums.Ok now to get to the point:I have been trying to make a simple game with smiley faces (ascii codes 1 and 2) each different face with different attributes health,strength ,etc and each time you fight some face smaller than you your attributes increase allowing you to fight bigger faces,now iv got a lot of ideas on the subject a couple of structs,arrays,etcBut one thing I can't get right is having your 'face' move with using the arrow keys ok its not using the arrow keys that's got me but its having to make the face move in x,y co-ordinates I have had a look at lots of source code from snake games but all of them use goto xy and if I try compilng those source codes I get an undeclared function error even with the given header files included,I'm using code blocks 10.05 and write in C,Does anyone have any ideas on what function(s) I could use?please and thank you in advance:) (I just typed that on my blackberrys qwerty keyboard so my fingers are done for lol) Link to comment Share on other sites More sharing options...
samadchaz Posted June 4, 2012 Share Posted June 4, 2012 for that keybaord (arrow keys) you need to use directx (six or seven) apior if you want to draw x,y I think I used putpixel Link to comment Share on other sites More sharing options...
JJacobs Posted June 4, 2012 Author Share Posted June 4, 2012 Tanks for the reply but I have no idea how to write through directx (I battled to come up with a way to write that)using C do you have any advice for me? Link to comment Share on other sites More sharing options...
JJacobs Posted June 4, 2012 Author Share Posted June 4, 2012 And the put pixel function you mentioned what headers must I include for it ,thanks still a bit of a noob. Link to comment Share on other sites More sharing options...
samadchaz Posted June 4, 2012 Share Posted June 4, 2012 graphics.h (maybe) :confused: sorry but I left programing field many years ago Im a CCNP now :ermm: Link to comment Share on other sites More sharing options...
JJacobs Posted June 4, 2012 Author Share Posted June 4, 2012 Sorry but isn't graphics.h only available on systems before xp? I have tried to compile other c programs with graphics.h header with no success or does writing 'through' directx let you include it?sorry for all the questions Link to comment Share on other sites More sharing options...
JJacobs Posted June 4, 2012 Author Share Posted June 4, 2012 And for the directx what sdk must I download and can you please provide a link,thanks in advance! Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now