I know C++, the next step?

Started by
6 comments, last by masque01 19 years, 11 months ago
Hi all, I''ve posted here before with a different sort of question, but now I''m wondering.. Okay, I know enough about C++ to code all kinds of interesting things. The problem is, that they''re only interesting to me and other math heads since they TEND to run as console programs. I can display graphics if I need to, but nothing special, and they''re almost always static or if they move its rudimentary (graphic eq). What I was thinking of doing (since I have a few days off between now and summer school) was to make a simple game to fuse my directx ideas with my C++ knowledge. Should it work as simply as I think? Which is to just program the logic of the game such that I could almost run it using just ascii, and then tie the graphics to the logic? By graphics, I was thinking small sprites to start. What a noob question? thanks any advice. James
Advertisement
If you want to do interesting stuff, and want to make it quickly and easily, I''d recommend using a C/C++ graphics library which takes the pain out of setup and IO handling, like Allegro or something.

Performance maybe won''t be cutting-edge, but it should be ok for testing algorithms out and doing some moderately clever graphics / sound stuff.

Mark
Some suggestions for a simple game.
Im agree with markr ..u should spend time coding basic games .. pong, tetris, maybe pacman, with a good library like SDL or Allegro (this one is very good), Focusing on the game mechanics working with simple sprites..I mean SIMPLE because a lot of ppl spend a lot of time making the graphics, and never finish the project.
Bruno B
I forgot to mention that I've already written a breakout game and a defender game in a different programming language (its called ada, similar to C but more of a learning language, my first 2 CS classes taught it ), so I already have a feel for how it all goes together.. its graphic package is similar to (but much crappier than) allegro.

I guess it would be better to say that I'm wondering if you would use the same general programming methods when using directx as I would use with a simpler programming language or graphics library. I know it would work, but I just can't tell if it would be laughed at horribly by experienced coders. For instance, in my breakout game the levels are all 2D arrays with an integer in it that corresponds to the block type while its position in the array indicates the block's position on screen. It has a level editor (and block editor) that you design with, and then it loads these arrays for you and saves them for use in the game. I know there are some differences in all the details (like using sprites), but is this still a valid way (from a more experienced standpoint) to go about it?

So even if I don't really know what I'm asking, I still appreciate any "mentor lore" out there. I'll post my results.

James

I also forgot to mention that I know the basics of win32 programming and can do basic graphics with directx. I just want to see if I'm going in the right direction or if I should be rethinking the whole thing.

[edited by - masque01 on May 8, 2004 9:05:55 PM]
DirectX doesn''t support DirectDraw anymore, so I''d suggest you to get into SDL. In my opinion, it''s one of the best for 2d games, and the initialization isn''t a pain like in directX. It also handles sound, keyboard events, timers, and it works in many platforms.

Also, the ''S'' stands for "Simple", so you won''t have too much problem learning it and can put more effort in the game logic.
-----DevZing Blog (in Spanish)
Yeah, I know about the directdraw issue.. I ultimately want to do 3d programming and I like the idea of directx... I think starting with just getting the interfaces going with ddraw7 (where I''m at now), and then going to direct3d but redoing the 2d games I''ve already made with it, and then going to 3d after all that will be a gentler way of getting a feel for directx and will let me worry less about those details later and more about the 3d things.
I just thought I'd revive this one and see if someone could answer the question about whether or not programming a C++/DirectX game the same way I programmed my Ada/Adagraph games(adagraph is a package with commands like "Draw_line", "Draw_Circle" etc) is a laughable way to go about it? I haven't heard otherwise, and I've started as if its cool, so any timely advice would be a hookup.

Oh, the one thing I'm really doing different this time is using classes, but that just makes sense.

[edited by - masque01 on May 10, 2004 9:55:00 AM]

This topic is closed to new replies.

Advertisement