473,385 Members | 1,344 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

On Programming

I am a self taught programmer and I am starting to get better and
create larger and more complex projects. Mostly I write games because
they keep me interested. I have done some reading with directX but
mostly I am more comfortable with win32. I only use win32 as a way to
show something on the screen. I am more interested in design patterns
and trying to find the best tool for a problem. I don't have a
specific question but like the abstract discussions on how others
approach programming and what kind of tips I can gain from other
people. What is the best way to create an object because I have
objects that tend to get very big is that OK? I don't use pointers
very much and try to use standard libraries as much as I can. I tend
to use pointers if I have objects that hold other objects. For
example if I have a player object then I will have weapons class
pointer. The player might have a spear or a club and they will act
differently or there may not be any weapon at all. I tend not to use
dynamic binding very much never have the right problem although for
one of my games I did create a handle for units. I was planning to
have land air and sea units but only actually created the land units
but the handle worked great if I had wanted to create more kinds of
units.

I am just writing some Ideas of how I program and if you like and have
something to say I would be interested in your thoughts if not that is
OK too feel no need to respond unless you want to get into the more
abstract way you approach programming.

Apr 14 '07 #1
5 1289
JoeC wrote:
I am a self taught programmer and I am starting to get better and
create larger and more complex projects. Mostly I write games because
they keep me interested. I have done some reading with directX but
mostly I am more comfortable with win32. I only use win32 as a way to
show something on the screen. I am more interested in design patterns
and trying to find the best tool for a problem. I don't have a
specific question but like the abstract discussions on how others
approach programming and what kind of tips I can gain from other
people. What is the best way to create an object because I have
objects that tend to get very big is that OK?
Depends. Usually a large class without enough base classes from which
it inherits all the stuff means that you may have not identified all
the abstractions, which would otherwise help narrowing down their
functionality. Abstraction helps subdivide the problem domain into
manageable pieces, implement them better, test them better, reuse them
better.
I don't use pointers
very much and try to use standard libraries as much as I can. I tend
to use pointers if I have objects that hold other objects.
By itself it doesn't necessarily sound like a bad idea.
For
example if I have a player object then I will have weapons class
pointer. The player might have a spear or a club and they will act
differently or there may not be any weapon at all. I tend not to use
dynamic binding very much never have the right problem although for
one of my games I did create a handle for units. I was planning to
have land air and sea units but only actually created the land units
but the handle worked great if I had wanted to create more kinds of
units.

I am just writing some Ideas of how I program and if you like and have
something to say I would be interested in your thoughts if not that is
OK too feel no need to respond unless you want to get into the more
abstract way you approach programming.
If you're interested in exploring OO side of C++, I'd recommend the
old and still valid "Advanced C++ : Programming Styles and Idioms" by
James Coplien.

V
--
Please remove capital 'A's when replying by e-mail
I do not respond to top-posted replies, please don't ask
Apr 14 '07 #2
On Apr 14, 1:10 pm, "Victor Bazarov" <v.Abaza...@comAcast.netwrote:
JoeC wrote:
I am a self taught programmer and I am starting to get better and
create larger and more complex projects. Mostly I write games because
they keep me interested. I have done some reading with directX but
mostly I am more comfortable with win32. I only use win32 as a way to
show something on the screen. I am more interested in design patterns
and trying to find the best tool for a problem. I don't have a
specific question but like the abstract discussions on how others
approach programming and what kind of tips I can gain from other
people. What is the best way to create an object because I have
objects that tend to get very big is that OK?

Depends. Usually a large class without enough base classes from which
it inherits all the stuff means that you may have not identified all
the abstractions, which would otherwise help narrowing down their
functionality. Abstraction helps subdivide the problem domain into
manageable pieces, implement them better, test them better, reuse them
better.
I don't use pointers
very much and try to use standard libraries as much as I can. I tend
to use pointers if I have objects that hold other objects.

By itself it doesn't necessarily sound like a bad idea.
For
example if I have a player object then I will have weapons class
pointer. The player might have a spear or a club and they will act
differently or there may not be any weapon at all. I tend not to use
dynamic binding very much never have the right problem although for
one of my games I did create a handle for units. I was planning to
have land air and sea units but only actually created the land units
but the handle worked great if I had wanted to create more kinds of
units.
I am just writing some Ideas of how I program and if you like and have
something to say I would be interested in your thoughts if not that is
OK too feel no need to respond unless you want to get into the more
abstract way you approach programming.

If you're interested in exploring OO side of C++, I'd recommend the
old and still valid "Advanced C++ : Programming Styles and Idioms" by
James Coplien.

V
--
Please remove capital 'A's when replying by e-mail
I do not respond to top-posted replies, please don't ask
Thanks for the recommendations. I will look for them.

Apr 14 '07 #3
"JoeC" <en*****@yahoo.comwrote:
I don't have a specific question but like the abstract discussions
on how others approach programming and what kind of tips I can gain
from other people.
You might want to start following the comp.object newsgroup.
What is the best way to create an object because I have objects that
tend to get very big is that OK?
My personal rule is, "most of the methods must use most of the fields
most of the time."
Apr 15 '07 #4
On Apr 14, 8:10 pm, "Victor Bazarov" <v.Abaza...@comAcast.netwrote:
If you're interested in exploring OO side of C++, I'd recommend the
old and still valid "Advanced C++ : Programming Styles and Idioms" by
James Coplien.
A very useful book, but the title doesn't lie. Many of the
idioms rate as very advanced. I'd recommend a general OO text.
(I learned using Booch, but I don't know if it is still
considered up to date.) I'd also recommand The GoF book on
patterns, and the Barton and Nackman (which has some very good
discussion on the trade offs between templates and inheritance,
as well as when to use the different types of inheritance).

--
James Kanze (Gabi Software) email: ja*********@gmail.com
Conseils en informatique orientée objet/
Beratung in objektorientierter Datenverarbeitung
9 place Sémard, 78210 St.-Cyr-l'École, France, +33 (0)1 30 23 00 34

Apr 15 '07 #5
On Apr 15, 6:56 am, "Daniel T." <danie...@earthlink.netwrote:
"JoeC" <enki...@yahoo.comwrote:
I don't have a specific question but like the abstract discussions
on how others approach programming and what kind of tips I can gain
from other people.

You might want to start following the comp.object newsgroup.
What is the best way to create an object because I have objects that
tend to get very big is that OK?

My personal rule is, "most of the methods must use most of the fields
most of the time."
Thanks, I will look in other places. I was hoping to try to see how
other programmers approach programming. I am writing programs that
are too big and complicated to post and I wouldn't expect anyone to
weed through all the code I write. Not having gone to school or have
a job where I can meed other programmers I would like to have
discussions on the topic. I want to get better and I learn from my
experiences but I would also like to see if I can find other ideas or
some approach I might have overlooked.

So far I have written several games lately using win32. I have
written a maze game, I use bitmap graphics as well as a binary library
that I have created myself. I finished two map games. One was very
simple the next one a bit more complicated. I create a map and have
four kinds of units. The goal of the second game is to capture all
the cities. You get point from the cities you control to buy more
units. I created a dialog box to buy the units and they randomly get
placed in controlled cities. I have no idea how to do a computer
player so I created an email system where after each turn the game is
saved and you can send it to the person you are playing.

Now I am working on something much more complicated; a civilization
type of game. I have created a random map with water land hills and
mountains. I can save the map in a binary file. Right now I am
trying to create a way to create random rivers but I have having
trouble getting that to work. Also I am challenged on how the game
will actually be played. That is a challenge I am still trying to
figure out with pencil and paper.

This is where I am. I am trying to use more inheritance and objected
oriented techniques I have read about. I try to break my programs
down into logical objects. It seems that big objects like my map and
spaces do grow large because they do quite a bit. My units in my last
game were large and held other objects. A unit for example had
attack, defense, graphics, colors, movement, how much moved as well as
other status variables. I try to understand what I know and try to
create something just beyond what I think I can do. I keep learning
lessons and try to implement those lessons.

Apr 16 '07 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Martin | last post by:
When was inheritance intruduced into object oriented programming? More generally, does anyone know or have any sources on when the different features were introduced into object oriented...
12
by: G. | last post by:
Hi all, During my degree, BEng (Hons) Electronics and Communications Engineering, we did C programming every year, but I never kept it up, as I had no interest and didn't see the point. But now...
3
by: user | last post by:
Hi all, At the outset, I regret having to post this slightly OT post here. However, I strongly feel that people in this group would be the best to advise me on my predicament. I am working as...
134
by: evolnet.regular | last post by:
I've been utilising C for lots of small and a few medium-sized personal projects over the course of the past decade, and I've realised lately just how little progress it's made since then. I've...
7
by: Robert Seacord | last post by:
The CERT/CC has just deployed a new web site dedicated to developing secure coding standards for the C programming language, C++, and eventually other programming language. We have already...
30
by: Jakle | last post by:
I have been googling, but can seem to find out about C GUI libraries. My main platform is Windows, but it would be nice to find a cross platform library. I've been programming with php, which...
47
by: Thierry Chappuis | last post by:
Hi, I'm interested in techniques used to program in an object-oriented way using the C ANSI language. I'm studying the GObject library and Laurent Deniau's OOPC framework published on his web...
111
by: Enteng | last post by:
Hi I'm thinking about learning C as my first programming language. Would you recommend it? Also how do you suggest that I learn it?What books/tutorials should I read for someone like me? Thanks...
14
by: deko | last post by:
For building Windows desktop apps, the clear favorite is C#. But my clients can't afford to buy Microsoft products. So I need to develop software for Linux users and web applications. In the...
17
by: CoreyWhite | last post by:
I bought this book years ago, when I was just learning C++. Since then I've gone through every math course offered at my college, taken courses on coding C & thinking in terms how how to make the...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.