yothsoggoth's Profile User Rating: -----

Reputation: 20 Tradesman
Group:
Contributors
Active Posts:
55 (0.06 per day)
Joined:
19-June 12
Profile Views:
1,566
Last Active:
User is offline Feb 21 2015 05:02 AM
Currently:
Offline

Previous Fields

Country:
GB
OS Preference:
Linux
Favorite Browser:
FireFox
Favorite Processor:
Who Cares
Favorite Gaming Platform:
PC
Your Car:
Who Cares
Dream Kudos:
50

Latest Visitors

Icon   yothsoggoth has not set their status

Posts I've Made

  1. In Topic: Learning game devlopment - SFML vs. DirectX

    Posted 27 Jan 2015

    View PostVerses, on 26 January 2015 - 12:10 PM, said:

    View Postmodi123_1, on 26 January 2015 - 11:56 AM, said:

    Then I would advocate avoiding the initial pitfall of trying to build a game from scratch and go use an existing engine to get the lay of the land first. I am a fan of Unity.

    Thanks for this (as I think) well-intended advice, but actually building a game from scratch has quite a big appeal with me. Maybe I am bit naive, but I'd really like to develop a game without Unity or similar. Also to train my C++ skills. :scooter:/>


    If you just want to make a game without having to do a hell of a lot of programming, go for something like Unity, as modi123_1 suggested.

    If you do want to write everything from scratch (which is a good way to learn about game programming and rendering etc.) then my recommendation is to go with SFML or SDL first, as they're very easy to get set up and start working with. They also both focus on 2D rendering, which allows you to start learning some of the basics without any knowledge of 3D maths.
    Then, once you've started to make some progress with those, and perhaps made a couple of simple games (or cloned some popular ones like Tetris and Space Invaders), start looking at learning DirectX and/or OpenGL and writing some 3D rendering code, and try making a game with that.
  2. In Topic: Perspective projection

    Posted 27 Jan 2015

    Can you provide some context?

    What are you trying to use perspective projection for?

    Do you already have some code that you're starting with?

    What tools are you using?


    Essentially, 3D projection is the name given to the process of taking some 3D geometry and representing it in 2D (i.e. on the screen, which is flat and 2D). Perspective projection is doing exactly that, in a particular way so that the result represents the geometry in a perspective manner (i.e. things further away appear smaller).

    The standard method of doing this is to take the geometry and transform it with a series of matrices (the exact combination depends on the geometry that you're using).

    Usually this consists of transforming a point from World space to View space (space relative to the eye/camera) using a view matrix, then from View space to Projection space (the 2D space relative to the viewport) using a projection matrix. Then finally, in most cases in 3D graphics this is usually translated to pixel space by mapping the projection space to the pixels (e.g. the buffer for the screen, or texture acting as the render target).

    Often, the vertex will begin in "local" space (relative to the model's own origin), and so must be transformed into World space using a world matrix.

    To be honest, I recommend just searching on Google for this. If you're using any common tools (DirectX, OpenGL, XNA, etc.) you'll find plenty of code and tutorials. Plus, most of the info you'll find will also include good diagrams and more detailed descriptions of how to create each of the different matrices.
  3. In Topic: Problem with mouse input and displaying

    Posted 18 Jan 2015

    Your problem is that you're calling apply_surface(box[index].x, 0, redPiece, screen); within the input function only when the mouse button is pressed.

    You should move it to be called just after you've rendered your background.
  4. In Topic: Problem with motion in Connect Four game

    Posted 13 Jan 2015

    My initial guess is that you're possibly calling piece.show(); in the wrong place or perhaps there's something else slightly wrong in the logic of your code.

    Please could you post your updated source code so we can take a look and provide a proper answer?
  5. In Topic: Problem with motion in Connect Four game

    Posted 11 Jan 2015

    View Postmigcak, on 09 January 2015 - 10:59 PM, said:

    So if you want to display anything put it in a loop and use SDL_FillRect to refresh the screen?


    Pretty much.

    In the long-term, and in larger games, it's sometimes the case that you may need to do something a little more sophisticated, like render certain parts to a texture to apply effects or render different components at different times.
    But, for the most part, a "render pass" will consist of clearing the render target (i.e. the buffer that will be presented to the screen) and rendering all of your content.

    Using SDL_FillRect with black just draws full black over the previous content, effectively clearing it. Then over that you render everything.

My Information

Member Title:
D.I.C Head
Age:
22 years old
Birthday:
October 14, 1992
Gender:
Location:
England
Full Name:
Joe
Years Programming:
9
Programming Languages:
C++, C#, Python, PHP, Javascript, Java, VB.Net

Contact Information

E-mail:
Private
Website URL:
Website URL  http://www.robotgoblin.co.uk/
Twitter:
joeydotnet

Comments

yothsoggoth has no profile comments yet. Why not say hello?