Jump to content

  • Log In with Google      Sign In   
  • Create Account

superman3275

Member Since 08 Sep 2012
Offline Last Active Aug 24 2014 11:40 AM

#5043410 Am I a bad programmer?

Posted by superman3275 on 15 March 2013 - 09:36 AM

Thanks for responding. I'm just sticking to replies in hack forums right now, thanks.


#5043282 Am I a bad programmer?

Posted by superman3275 on 15 March 2013 - 01:53 AM

I recently went on hackforums.net and started writing tutorials. Immediately, a user called Gamma started calling me a terrible programmer, pointing out many things in my tutorials (all in the first actually. Most of them were because he hated system("pause"); and visual studio's pre-compiled headers). Do you think I'm a bad programmer? Do you know of any ways I can improve my programming.




#5041347 Is my Finite-State Machine good or bug-prone?

Posted by superman3275 on 09 March 2013 - 07:45 PM

I took it upon myself to program a finite state machine. After trying (and failing) with no help, I looked at the lazy-foo class setup (Not the actual code) and changed my design. What do you think? Is this error-prone or good?

State.h:

#pragma once

namespace th {

	class State
	{
	public:
		State(void);
		virtual ~State(void) = 0;
	
		virtual void logic() = 0;
		virtual void render() = 0;

		virtual void setNextState(th::gameState nextState) = 0;
		virtual th::gameState getNextState() = 0;

		virtual sf::RenderWindow* getWindow() = 0;
	protected:
		sf::RenderWindow* window;
		th::gameState currentState;
		th::gameState nextState;
	};

}

 

State.cpp:

#include "StdAfx.h"
#include "State.h"


th::State::State(void)
{
}


th::State::~State(void)
{
}

 

The general idea is that for each state, I make a class which inherits from th::State, however the class has it's own variables and logic / rendering. I also have an enumeration for the states:

Global.h:

#pragma once

namespace th
{

	//GameState Enumeration
	enum gameState {
		null,
		inmainMenu,
		inlevelOne,
		ingameOver,
		ingameEnd
	};

}

 

and the change_state function:

void changeState(th::State* state) {
	sf::RenderWindow* window;
	th::gameState nextState;

	window = state->getWindow();
	nextState = state->getNextState();

	//If the nextState is null, it's not time to switch the state yet
	if(nextState != th::null) {

		//If the game is ending, there's no point in switching the state. The game will end right after the call to render,
		//which is placed after changeState() in the main loop. If I delete the state, the call to render will return an
		//error (and there is no state to switch too from ingameEnd.
		if(nextState != th::ingameEnd) {
			delete state;

			switch(nextState) {
				case th::inmainMenu:
					state = new th::mainMenu(*window);
					break;
				case th::inlevelOne:
					state = new th::levelOne(*window);
					break;
				default:
					state = new th::levelOne(*window);
					break;

			}
		}
	}
}

 

What do you think? Does it make sense? Do you see any problems?

So far, in one of the states I've implemented, I kept on getting an "access-violation" error in visual studio which occurred in changeState(), and at the end of changeState when I would change into the forementioned State, all of the values in the new State were corrupted. I believe this is simply from bad-initialization (Although it's taken me a few hours of debugging to figure it out).

 

It's 

Cheers smile.png!




#5040996 How to aquire relevant data without iterating through vector containing all t...

Posted by superman3275 on 08 March 2013 - 05:41 PM

I'm just going to say: One of the reasons you're not getting posts is your attitude. No one wants to help someone who starts out with:

No F**k you read my post

Or someone who says this (to a largely english speaking crowd):

The English language is inferior and nothing could be explained properly.

Because they couldn't grasp design patterns. You're essentially saying: "I read an advanced book I wasn't ready for, and now I'll blame my misunderstanding on how terrible English is."




#5036585 Any point Learning XNA?

Posted by superman3275 on 25 February 2013 - 09:54 PM

Many people have been asking this exact question here on gamedev, and it's normally beginning developers. Here's what I am going to say:

 

XNA is not gone. It's a great framework that has very few bugs and can still be very useful. Companies (and people) "drop support" of API's, programming languages, and projects all the time. What it really means is: "We're developing new API's right now, and are currently not working on XNA". XNA still works for Windows, you can still download it, and it's still a great framework. They're just working on other API's (Probably HTML / JavaScript in Windows Eight).

 

Go for it. XNA is great, however I recommend another API which is still under development: MonoGame!

 

Have fun! Cheers :)!




#5030310 Motivation

Posted by superman3275 on 09 February 2013 - 01:17 AM

I keep myself motivated by using Instant Gratification!

 

I enjoy programming because I love doing it. Seeing something appear on the screen and knowing I made that happen make me feel amazing.

 

You need to find something you want to make, and then make that. Or start down the road to making it.

 

Cheers :)!




#5017638 Do You Know of Any Good, OpenGL 3.X / 4.X Book Which Discusses the Programmab...

Posted by superman3275 on 04 January 2013 - 10:07 PM

I am currently working on Hooded and looking for a good book on OpenGL. I need a book which only discusses the Programmable Pipeline, as I do not plan to use any Deprecated Code. I cannot find many books which teach the programmable pipeline. I looked at the OpenGL Super-Bible (Fifth Edition) however the Author seemed like a very Arrogant developer. I've come to this conclusion considering that he doesn't teach you OpenGL, however he teaches you his own library (Which confused me, his book is labeled OpenGL Super-Bible. Why is he using his own helper library?). I've seen the free Modern Three-Dimensional Graphics Programming E-Book, however I've read the authors talks about his book and looked at it, and it doesn't teach OpenGL as much, however it is good for beginning Graphics Programming after you've learned OpenGL (This is taken straight from his answer to a question about this subject). I've also seen the OpenGL Book, and even they don't go over all of OpenGL (Or the Shading Language), it's more of a small introductory course. I've also seen Lazy Foo's Tutorials, however he spends the first thirty lessons discussing deprecated functionality and around three with the Programmable Pipeline. Do you have any suggestions?




#5017256 Unity 3D Cube Vs Plane...

Posted by superman3275 on 03 January 2013 - 03:20 PM

Try the Unity forums. Also, your plane is tiny.

 

Why are we talking about aerial vehicles! :)!




#5017252 Made my own small GameEngine, but how do i reuse it fast?

Posted by superman3275 on 03 January 2013 - 03:17 PM

Make a folder (With /lib/ and /include/) and link it!

 

However, you could have simply chose the "Library" option when creating your Game Engine's project in Visual Studio.

 

Cheers :)!




#5015788 Ouya Compiler

Posted by superman3275 on 30 December 2012 - 11:05 AM

I don't believe there will be a "compiler" for Ouya, however there will be API's and "Developer" consoles.




#5015786 A Question From An Absolute Beginner...

Posted by superman3275 on 30 December 2012 - 11:03 AM

HAHAHA. No dream is ever to big !!!  You obviously do not know cats.  The have weapons, Claws.  Puss-n-Boots carried a sword.  Languages are totally up to you !  There are easy to learn Languages and some not so easy.  So I would start by looking for books that come with the language you are trying to learch.  There is a very good series out the that begins with "Teach Yourself  ......"  or "Game Programming....."  The are free language compilers for C++ at Bloodshed.net

I personally recommend Blitz.com for a C++ hybrid.   I taught several people how to get started with these languages.  Being primarily a Business Application person my self, ( Windows, Forms, Drop-downs etc.,) and just starting to learn more about graphics, 2D needs a lot of Animated Cells, While 3D is a model that can be animated ( Think of posing an action figure doll in several sequences to simulate walking )

  Pick up sample code to study. ( The above mentioned books are usually filled with sample code ) You just have to put the peices together.

No no no no no no no. Don't go to Bloodshed.net.

 

The bloodshed compiler hasn't been updated in years, is filled with bugs, and has been surpassed by other free compilers. Even in it's time it wasn't a good compiler, people used it because of it's cost (free). If you would like a compiler, swing over to Code Blocks or Visual Studio! I hope your dream eventually pans out. Cheers :)!




#5015664 How come many of you prefer to make games from scratch rather than use an eng...

Posted by superman3275 on 30 December 2012 - 12:31 AM

I enjoy coding. It's fun and a passion. I understand you still must code when using a game engine, however it's generally very high level and a lot more simple than code I would write when I'm developing without an engine.

 

If I start making Three-Dimensional games and I need to push out a large product quickly with a team, of course I will use Unity, however I work alone (As of now) and am making Two-Dimensional Games. As I've detailed in other posts of mine, I actually use Construct Two for prototyping. It's easy to drag and drop some placeholder art, write some quick HTML5 / JavaScript, and make a small prototype for a game Mechanic. If it's fun, I'll try to go ahead and program the game myself.

 

Learning how to program using a Game Engine doesn't seem very good to me (Unless you're an artist). Many programmers I've seen who learned to code with an engine write painfully slow and pointless code. I learned how to use C++, and waited a year before jumping into Graphics. I'm still learning different quirks surrounding the language and exploring C++11, however the experience I gained from learning a language and not an API / Engine is helpful and an underlying reason why I enjoy programming. I understand peoples code, and it's an amazing feeling. Actually being a coder makes me feel accomplished, and every time I spend a few days working on a problem / fixing a problem, I get an amazing sense of accomplishment.

 

The community for many Game Engines reflects many of my points. On the Unity forums, far too many (Even the well respected) of the programmers learned with Unity, and as a result, are not as helpful had it been a low-level programmer who had joined one of the teams on the forums. They don't normally write efficient code, and don't understand what their code does besides what they know from Unity. This isn't helped by the fact that the forums are barraged with teenagers trying to recruit actual game developers for their new "Zombie-MMO-DayZ however Better-FPS". I'd say about half of the community is twelve year old's. I should link you to a post (Albeit old) from a group of twelve year old's who had promised their school they would make an MMO (bigger than World-Of-Warcraft) and were looking for a team to make the MMO for them.

 

I respect the developers on the Unity Asset Store however. They are some of the most hard-working programmers I've seen and they make amazing software. It's no wonder that many of them work as programmers at larger studios (I've seen some from the likes of Electronic-Arts) or use lower-level API's.

 

I believe using an Engine is smart if you understand how the Engine works. This is the main reason why I'm learning OpenGL. I want to understand. I constantly read about Security (Security+), New programming languages, design patterns, practices, Books on new languages (and current languages). Understanding is important to me. I felt a feeling of "This is all to big for me to understand" when I started. There's just so much, it's hard to sort through it all.

 

Wow, that was a rant tongue.png! Cheers :)!




#5014013 Need some advice...

Posted by superman3275 on 24 December 2012 - 02:07 PM

What I dislike about the gaming community (At least the Gamer's who aren't Developers tongue.png) is how twisted their idea of development is.

 

Somehow, everyone's been convinced all games run on engines, and that engines are easy to make. They come into a game, see it, and often think "I could make that.". I used to do it (Before I took up game programming). I would see a game and think "I could make that, it isn't even good.", which is far from the truth.

 

You need to start small. I recommend JavaScript (Code Academy is amazing!). You can use HTML(5) if you like, however I'd learn JavaScript first. You need to stay motivated, it will probably be some time before you're making the game you came in to make. You'll have to go through the basics, make some clones (Pong is Awesome :)!), and keep programming. You can stay on the forums while you learn (Like I am) and read everything you can about game development.

 

And some time, in a few years, after going through all of these trials, you'll probably be able to make your dream game.

 

Have fun! Cheers :)!




#5013844 Using char as byte problem

Posted by superman3275 on 23 December 2012 - 10:18 PM

I just spent 12+ hours overhauling my Tile-System (Thus the new screenshot on my blog :)!).

 

I had a struct which held the Tiles's type (Which is an Enumeration) and it's position relative to other tiles. I then made a Two-Dimensional vector of the struct which was used for my map. All I have to do now if I am using the system for another project is change the Enumeration's definitions and the images it loads (Very easy!). If you would like to look at the source code you can PM me, however keep in note the system is written in C++ (The system is universally applicable however smile.png!).




#5013840 My first game MyPong, finished at last

Posted by superman3275 on 23 December 2012 - 10:11 PM

If you can, try to include a Zip file with all the source files and another Zip with the game's Execution (.Exe) file.

 

I believe you are on the right track. I'm learning Python (While programming Hooded in C++), so I don't believe I'm qualified to give critique.

 

You can take a lot of different paths from here, Pong is the building block and you now know far more about development:

  • Make some more Knock-Offs (Breakout, Space Invaders, Tetris)
  • Embark on your own game :)!
  • Learn your language even more in depth!

I recommend looking into learning another language (JavaScript) / facet in programming (HTML) on the side to help you. It really helps when you can go to Code-Academy and take some quick excercises whenever you lose motivation or need to take a break. You're still being productive, however it's a nice breath of fresh air to go from programming a Map System in Python / C++ to making some projects / games in JavaScript :)!






PARTNERS