Jump to content

  • Log In with Google      Sign In   
  • Create Account


Member Since 05 Jul 2002
Offline Last Active Jul 20 2014 04:56 PM

#5041332 When to start with C++?

Posted by Alpha_ProgDes on 09 March 2013 - 06:45 PM

I came into programming the old fashioned way. I started with Basic then moved to C and then C++. I personally would not recommend you learn C++ until you first learn the C way of doing things.


I would disagree with that. C++ has a particular way of doing things and it's best that if you are going to learn C++, then you learn idiomatic C++. Learn the C way of doing things, when you decide to learn C. For emphasis, C != C++. Not even in a "C is a subset of C++" sort of way.

#5041081 What would you make armour out of?

Posted by Alpha_ProgDes on 08 March 2013 - 10:48 PM

I think that armour made from sap of the Great Tree would be invaluable. Why, you ask? Because it works much like the newest bulletproof vests today. When your enemy strikes your armour, the point of impact hardens. Also the force of the impact lessens considerably. And since the hues are everflowing, it gives your enemies the sense that you are truly protected by mystical armour. Variations in the sap can cause it to extend outward (ex: form a spike) or cover limbs (ex: instant gauntlet or helmet).

#5040227 Article Inspiration

Posted by Alpha_ProgDes on 06 March 2013 - 08:12 PM

Well.... it was just an example. :) 

#5040192 Article Inspiration

Posted by Alpha_ProgDes on 06 March 2013 - 06:39 PM


I'd love to write something... in a few years... when I'll know what I'm actually talking about.


I think the point is that "they don't care". Just write an article about something game dev related. You don't have to be an expert. It doesn't have to be perfect. It just has to be finished and run.

Hmm... I'll see if I find something to write about biggrin.pngThing is... winter (uni classes) is coming.


Well first.... wouldn't it be Spring classes? Second, think of it as a really fun dissertation or class project :D It could be something as simple as a 3 part beginner intro tutorial:


  1. how to setup a window in SDL 2.0/SFML 2.0/Allegro 5
  2. how to get ONE graphic in the window
  3. how to get the graphic to move
  4. how to setup the input
  5. how to setup the input to move the graphic
  6. how to setup the sound and music
  7. how to loop music and associate sound effects to input actions (ex: walk, shoot, jump)

In case, you think I can't count. There's 3 main parts: graphics, input, and sound :D

#5039272 Article Topics: Suggested Projects

Posted by Alpha_ProgDes on 04 March 2013 - 07:00 PM

Retro Game Programming: How to Make Super Mario Bros.

Retro Game Programming: How to Sonic the Hedgehog

#5039265 Giving your character the tools to make it pass the level?

Posted by Alpha_ProgDes on 04 March 2013 - 06:21 PM

Note: I do not play MMOs or PC games. In fact I've played very little of the current gen games. So if this has been done already, forgive my ignorance.


So I'm watching this show where the bad ass heroine and leaping around walls, stairs, and platforms cutting down enemies left and right. All the while, she has a support group that tells her where to go and where certain things are.


This got me thinking. Why not have a game with a somewhat similar premise? Instead of radioing in directions, you provide the character with the tools he/she needs to pass a level. What this means is that the character himself (I don't want to write he/she all the time) will pass the level. The player doesn't control his movement in anyway. However, as the character progresses through the level, the player has to change what the character is equipped with. "Equipped with" means: items, spells, weapons, abilities.


The character himself will do things such as: hide behind walls/corners/pillars, use enemies as shields, pick up items, attack bosses, get through the level. All the player does is make sure that the inventory/equip list is stocked with what's needed to keep the character from failing.


Also, this concept can work with the radioing in directions idea as well.

#5038399 Basic question

Posted by Alpha_ProgDes on 02 March 2013 - 06:13 AM

couldn't you ignore punctuation and do something like "if (input_string.contains("twelve") then ++twelve_counter"?

#5038394 Best way to learn game programming

Posted by Alpha_ProgDes on 02 March 2013 - 06:08 AM

^^ This.


That guy knows what he's talking about. Heed his words young padawan.

#5038384 Do I learn the skills I need then make the game, or do I work on the game, an...

Posted by Alpha_ProgDes on 02 March 2013 - 05:42 AM

You're letting the issue of "I don't know" get in the way of "learning how to know". In other words, "just do it". There are so many tutorials out on the web. Just pick one --I normally suggest Lazy Foo's SDL tutorial-- and work your way through it. Don't be scared to jump in. Remember the pool has a 3ft area and an 8ft area. You don't have to jump in the 8ft area to learn how to swim :)

#5038374 PS3 games in C++..

Posted by Alpha_ProgDes on 02 March 2013 - 05:27 AM

Hello guys, I have a question..How do htey make PS3 games in C++, after learning for a year or less i have learned many things on computer game developing. Now the question is i know how to animate the models give controls to it, but how should i run it on ps3 for testing and the main queation is how can i code it, is there any sample, and I don't wanna use any engines


Hi Sugavanas.


Well let me be the bearer of bad news. Have you made a game yet? Have you made a text game in C++? Have you made a game with graphics? How many games have you made? With what API?


If you can't answer any of these questions (easily) or do not have any evidence that you have not done any of these things, then unfortunately, the PS3 is not for you. I'll have to be harsh and say that XNA (in any of its forms) is not for you either. PS3, XBox 360, Nintendo Wii/Wii U are for seasoned developers. That means developers that have made many** games already. These developers are hired by companies and publishers that have the resources and skill to work with the PS3.


Beginners do not work with the PS3 or Xbox or Wii. They work on Tetris, Pac Man, and Space Invaders. They work on those games on their PC. They download game libraries like SDL 2.0 or SFML 1.6 or SFML 2.0. They get those games finished and completed and show them to the community. They get feedback from the community. They take that feedback and improve their game (see what I did there?).


In short, no more asking about consoles. Any consoles. Show us some games that you made and ask us about that.



**When I say many games, I mean many games. I mean 2D games and 3D games. I mean you've written at least 15 to 20 fully fleshed and completed games. I mean you fully understand things like game loops, animation, input, and game logic. You don't get that understanding and knowledge without writing, creating, and finishing many, many games.

#5037425 Stroke of integer genius

Posted by Alpha_ProgDes on 27 February 2013 - 07:53 PM

To be politically correct, that should say:


int GiB = (int)fileManager.RequiredDiskSpace / 1024 / 1024 / 1024;

#5037123 Why functional programming isn't for n00bs

Posted by Alpha_ProgDes on 27 February 2013 - 06:56 AM

So I'm learning Scheme with HtDP. While answering the questions, I write this beautiful piece of code:


(define (main w0)
(big-bang w0
(on-tick ticking)
(on-key fire-key)
(to-draw to-render)))

(define HEIGHT 100)
(define WIDTH 80)
(define TURRET-X-POS (/ WIDTH 2))
(define BKGRND (empty-scene WIDTH HEIGHT))
(define SHOT-IMG (triangle 4 "solid" "red"))


(define (to-render w0)
[(empty? w0) BKGRND]
[else (place-image SHOT-IMG TURRET-X-POS (first w0) (to-render (rest w0)))]))

(define (fire-key w0 ke)
[(key=? ke " ") (cons HEIGHT w0)]
[else w0]))

(define (ticking w0)
[(empty? w0) empty]
[(empty? (only-inbound-shots w0)) empty]
[else (cons (sub1 (first (only-inbound-shots w0))) 
(ticking (rest (only-inbound-shots w0))))]))

(define (only-inbound-shots w0)
[(< (first w0) -4) (rest w0)]
[else w0]))


The guys over at Stack Overflow barfed something fierce! I was rather ashamed. The great offender was the "ticking" function.


A few hours later, 5 cracked keys, and the loss of a cup of blood, I ended up with this:



(define HEIGHT 100) ;height of scene
(define WIDTH 80) ;width of scene
(define TURRET-X-POS (/ WIDTH 2)) ;position of turret, ie. where shot's x-coordinate
(define BKGRND (empty-scene WIDTH HEIGHT)) ; scene itself
(define SHOT-IMG (triangle 4 "solid" "red")) ;image representing the shot
(define Y-BOUNDARY -4) ;y-coordinate where shot is no longer visible in scene

;List-of-numbers -> List-of-numbers
;renders all shots fired
(define (to-render w0)
[(empty? w0) BKGRND]
[else (place-image SHOT-IMG TURRET-X-POS (first w0) (to-render (rest w0)))]))

;List-of-numbers, key event -> List-of-numbers
;only allows the space bar to fire a shot
;one space bar event produces one shot
(define (fire-key w0 ke)
[(key=? ke " ") (cons HEIGHT w0)]
[else w0]))

;List-of-numbers -> List-of-numbers
;during each clock tick, the y-coordinate each of the shot in List-of-numbers is updated
;each y-coordinate decreases by -1
(define (ticking w0)
[(empty? w0) w0]
[else (only-inbound-shots (update-shots w0) Y-BOUNDARY)]))

;List-of-numbers -> List-of-numbers
;does the actual updating of the shots in List-of-numbers
;each shot's value is decreased by -1
(define (update-shots w0)
[(empty? w0) w0]
[else (cons (sub1 (first w0)) (update-shots (rest w0)))]))

;List-of-numbers -> List-of-numbers
;checks to see if the first shot in the List-of-numbers has gone past the Y-BOUNDARY
;if so then remove shot from the List-of-numbers and return the rest of the List
;otherwise return the List without change
(define (only-inbound-shots w0 y-boundary)
[(empty? w0) w0]
[(< (first w0) y-boundary) (rest w0)]
[else w0]))

;List-of-numbers -> List-of-numbers
;creates the world of shots
;seed value is empty, additional values created by space bar
(define (main w0)
(big-bang w0
(on-tick ticking)
(on-key fire-key)
(to-draw to-render)))


Actually I'm very happy with this code. So unfortunately, this Coding Horror has a happy ending.

#5036847 Why do it the easy way?

Posted by Alpha_ProgDes on 26 February 2013 - 03:29 PM

if (isActive == TRUE) {
    return 1;
else if (isActive == FALSE) {
    return 0;

#5036794 [C++] bask in my awesomeness.

Posted by Alpha_ProgDes on 26 February 2013 - 12:31 PM

This is one of the few threads that should be necro'd under the new forum! I must admit that XML library is pretty damn awesome. I wonder just how many people have used that library.

#5036594 Code Review Comments

Posted by Alpha_ProgDes on 25 February 2013 - 10:43 PM

I'm not sure which fails worse. The code or the comments......