Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: C++ Source Code  (Read 4875 times)

0 Members and 2 Guests are viewing this topic.

Bobcorn

  • Newbie
  • *
  • Posts: 2
    • View Profile
C++ Source Code
« on: January 07, 2012, 12:49:11 pm »
Hey Leute,

ich habe vor 1 woche angefangen SFML zu benutzen. Ich programmiere mit VS C++ 2010 und habe recht gute grundlagen (Schleifen, if/else, objektorientierte programmierung,....).

habe mit kleinen spielereien angefangen. z.B. ein block der sich allein bewegt, bzw den ich selbst steuern kann und so was...
hab mich dann an pong versucht. und auch das läuft ohne probleme.
die tutorials von SFML habe ich größten teils durchgearbeitet.

da ich am schnellsten verstehe und lerne wenn ich source code lese wäre meine frage, ob jemand weiß wo ich Source code finde oder jemand source code für mich hat?

mir wäre wichtig das es vernünftiger und auch verständlicher source code ist! das heißt: ordenliche namen für variablen und Funktionen, vernünftige Struktur und wenn möglich auch objekt orientiert!

MfG Bobcorn

Zinlibs

  • Full Member
  • ***
  • Posts: 127
    • View Profile
C++ Source Code
« Reply #1 on: January 07, 2012, 12:57:32 pm »
Hallo bobcorn !

Here is a forum in the international language. You must write in English, in intend that people understand you.

Bis bald
Zoost & Zoom libraries : An easy way to create and handle geometric objets, animate and use them for better graphics !

Bobcorn

  • Newbie
  • *
  • Posts: 2
    • View Profile
C++ Source Code
« Reply #2 on: January 07, 2012, 01:11:49 pm »
ok here in english. (not the best, but i hope you understand what i want ;))

Hey Guys,

I started to use SFML one week ago. I use VS C++ and have good basics (if/else, loops, variables, functions, object oriented programming,....)

first i programmed some little things like: moving blocks, collision, text, audio, shapes,....
than i tried pong. First i thougt it would be hard. But after 1 day working, i was able to play pong :) my pong! with some little and funny bugs ;D but thats ok for me.

the SFML tutorials on this website were very helpful and i worked through nearly all of them.

But i learn best, when i read source code, play with it and just try and test.

So i want to know if someone knew a website were i can find good! Source code of games. That means well structured and variables which everyone can understand :D not here are my 200 variables, i called them a1, a2, a3, …. a200;

Thanks, Bobcorn

Tank

  • SFML Team
  • Hero Member
  • *****
  • Posts: 1486
    • View Profile
    • Blog
    • Email
C++ Source Code
« Reply #3 on: January 07, 2012, 01:53:19 pm »
This is the wrong board for your request. Besides of that, you can already get a lot of sources to learn from. SFML itself is open source and a lot of projects using SFML in this board are open source, too.

But I'd rather concentrate on articles and books that teach you how to write clean code instead of struggling around in the net for hours. Sadly often source code is not so well written as one would expect... ;)

Nexus

  • SFML Team
  • Hero Member
  • *****
  • Posts: 6287
  • Thor Developer
    • View Profile
    • Bromeon
C++ Source Code
« Reply #4 on: January 07, 2012, 02:11:20 pm »
I have made the experience that many games, even though being nice to play, are written in error-prone, overly complicated and unmaintainable code. So I were careful with looking at their source codes, you are likely to adapt bad practices.

The user Serapth wrote a tutorial series about game programming, you can have a look at his thread.

There have also been some threads with game design discussions. In this one and its links you find a lot of tips to design your game. Here I listed some points that are very important in my opinion. Generally, you should have a good knowledge of C++ that reaches beyond the basics. Books like Effective C++ or Exceptional C++ help you a lot when it comes to writing efficient, maintainable and bug-free code.
Zloxx II: action platformer
Thor Library: particle systems, animations, dot products, ...
SFML Game Development: