Jump to content

  • Log In with Google      Sign In   
  • Create Account


Member Since 11 Apr 2004
Offline Last Active Apr 27 2014 10:16 AM

#5149804 Unmaintainable code

Posted by on 27 April 2014 - 02:21 AM

Wow theres one hell of an if statement in there:



#5149801 Applications vs. Webapps

Posted by on 27 April 2014 - 02:02 AM

Biggest advantage for native apps is higher speed, read this for instance:


In addition, not all native (advanced) features are availible to webapps.


Another reason for choosing native apps is that it will get some free promotion from the Google Play/App store. If you build an webapp youll need to do your own advertising. The advertising itself will be easier for a webapp however and with the large amount of applications in the app stores your native app will most likely get only a slight attention the first day when it appears in the 'new apps' category.


There are pros and cons for each, ultimately you might just want to write 3/4 apps: webapp, android and ios (and perhaps windows)

This depends on the succes of your app.

#5051882 I want to make a 2D game engine! Where do I start?

Posted by on 10 April 2013 - 12:07 PM

I don't think a beginner is really considering all kinds of low-level stuff when he talks about a game engine. And telling him to just code the game without thinking of the engine, might let them think they should rush into programming the game logic and skipping a good game design. But I tend to agree to most points of the last posts here and in the end it might actually be a good thing if you let the beginning programmers find out their code is not re-usable, so they can learn from their mistakes :)

#5051737 I want to make a 2D game engine! Where do I start?

Posted by on 10 April 2013 - 12:48 AM

Servants post very cleary states the opinion of most people here: make a game not an engine.

Although I agree with most of its points, I personally think it is a good idea to start with the engine.


The question to ask yourself is; what is an engine?

I like Servants definition; reusable components fromt the game.

Although everyone has its own programming style, I personally don't think you should start with the game logic of the game without getting any visual output.

I like to start setting up the core components in order to draw a screen, implement all input/visual/audio APIs in an easy to use manner, setting up a basic gamestate system, entity manager incl. messaging etc. etc. I think this is actually a good programming behaviour, start by making a planning and design of what you actually need for your game. For instance in the first game you make you could decide to leave out the audio and you could just use if-statements for handling the gamestates.


Later one when you make another game, you can then re-use these core components of your game for the next game, while slowly introducing something new (if you feel that you actually need it or makes development easier), such as a scripting language. If you implemented something in the engine and you don't need it for the next game, you can just leave out these code files.


I got the same advice when I started: make a game not an engine. But after finishing a couple of games I felt like I realy couldn't re-use much of my code.

Mostly because I thought things weren't done efficiently or weren't easy to use. At that point I started doing things the way I described above, using carefull design and starting from the ground up and now I can just use this framework I made and start coding the game almost right away.


So to summarize my advice: spend some time making a good design, if you write a very good reusable piece of code it'll safe time in the end by avoiding having to recode everything again. But don't try to implement all kinds of features you're not going to use in the current game, you can easily implement those features as soon as you write the game you'll need it in.

#5036064 Help make the MMO game engine c + +

Posted by on 24 February 2013 - 06:17 AM

I think taking some English lessons would really help you if you want to become a better programmer.

And if you really know C++ that well, well enough to build an MMO game engine, you would know where to start. That aside, heres a general strategy you should take:

Start building some text based games, move on to graphic games such as tetris, move to more advanced games, start looking into network programming, learn some extra programming languages such as C# for quick development of map editors and other tools, at that point you should have a general idea about what a MMO engine would look like and you can start thinking again about building a MMO game engine and whether you really want to invest years of development and/or lots of money on this project.

Good luck!

#4965092 From java to c#

Posted by on 31 July 2012 - 11:19 PM

It totally depends on what you want to achieve.
I think it always pays to learn a new language, it might come usefull at some point in time and it's actually not that hard to use c# if you have already learned the basics of java.

However, I don't realy see the point of using C# for android applications. I could be wrong, but isn't the official SKD written for java? Why not just using java if you want to write appliations for android. C# is mostly written for windows applications, just use java for android and c# when you want to write applications for windows, it's not like you are only allowed to use one language for all your projects. My advise: stick to one language (java?) first and try to get experienced with it. Than learn some additional languages like c# and c++ as it will broaden the possibilities


#4926396 Start game programming

Posted by on 29 March 2012 - 11:29 AM

I agree with Black Rook. Once you know one language the next will go much easier. It's not like you are stuck with one for the rest of your life, you'll want to learn/use more sooner or later anyway. I started out with C++ and spend some time with C# later on, now I'm simultaneously learning C#, Python, PHP and Lua while mastering my C++ skills along the way. Just focus on making games. The language is only a tool.

Would PHP, JavaScript and HTML5 allow the multiplayer/online game play?

Sure it will, but if you realy plan to do something big like an online rpg you might want to use something like Java. I think HTML5 is mostly a replacement for flash used in small action/arcade games.

#4924838 A vision of the future. Where to begin?

Posted by on 24 March 2012 - 01:27 AM

I think programming isn't as hard as people say it is, I started with c++ without any prior programming knowledge and picked it up quite easily from some online tutorials. I was 13 years old back than.

People say c++ is too hard in the beginning, but I disagree. Sure you'll walk into many memory leak bugs and what not, but it gives you a very good understanding of how it works. Sure, c++ is less productive than other languages, but you can always switch to another one later. Changing from C# to C++ is much harder in my opinion. As soon as you walk into C++-related problems you'll say to yourself "screw this shit" and never take a look at it again.

#4908152 Looking For Programmers

Posted by on 31 January 2012 - 02:53 PM

Professional programmers probably ask about 15-30$/hr

They must be pretty crappy at those rates. That is quite low for someone with the capability to create an MMO.

I was just trying to make a point, it's not like I spend hours calculating the exact amount of money :|

The point is, you won't find a programmer that will program this game for you unless you have about 100k-200k $ to spend (assuming you accept an avarage quality game, as WoW quality is going to cost you in the millions). Like I said, the programming is going to take thousands of hours. I doubt a skillfull programmer is going to participate in this project of yours just for fun. He will probably find it much more fun to create his own game as he most likely has some nice idea's for a game as well.
An option would be to program the game yourself. Buy some books on programming, start practicing and you might be able to create your first pong/tetris game within a few weeks or months. You might have enough skills to create the MMORPG within 10-15 years, assuming you will find some other good programmers that join you.
The last option would be to create the game with some kind of game maker.

It isn't hard to find storywriters, game designers, mappers, musicians or even graphics artists for such projects, it is hard to find good programmers.
When I look at myself, I mostly like programming because it gives me the freedom to express my creativity, turn idea's into games.
That's why I don't have any ambition to become a prof programmer, as you would just have to follow orders.

#4907408 Looking For Programmers

Posted by on 29 January 2012 - 01:44 PM

Beside being in the wrong topic, this post is slightly hilarious.
One programmer is definitly not enough for creating a huge game like a MMORPG (although I know one guy that did it),
Let me get this clear, the programming alone is going to take like 5.000 hours by a professional programmer. Professional programmers probably ask about 15-30$/hr.
Are you sure you have so much money available? (and than I haven't even included the server costs).

#4899048 Scripting for games [C++ and Lua]

Posted by on 02 January 2012 - 01:38 PM

The biggest reason I use scripting is because I want to easily change something without touching the source code which eliminates the need for a rebuild.
I always split up my games in 2 layers; GameEngine, GameLogic. The GameEngine contains my graphicsManager, soundManager scriptManager etc.
the GameEngine defines all stuff that can be re-used in other games. The GameLogic all classes for game objects / entities, basicly the game logic that is different in each game. Most of the game logic will be read from script. For example, I can create a Maze class that reads a Maze.Lua script file and constructs a maze in the game based on the script being used. This way I can create new mazes simply by creating a new script. The same is true for a platform game, where you can use scripts to generate the level. You can also use scripts to define how the enemies in the game will respond to certain actions. You can even use a design where you can add completely new enemies with an own unique sprite and AI just by changing some scripts. It is all up to you what kind of acces you give to the scripts.


#4897862 Which version of XNA

Posted by on 29 December 2011 - 12:37 PM

Just start using 4.0, it makes no real sense to study and try older versions first.

#4892846 How to begin?

Posted by on 11 December 2011 - 12:01 PM

vleugel: when you want to program your own game, it's impossible too write everything yourself from scratch.

Nothing is impossible! It will only take many years to finish the game.

You can write a game from scratch in an afternoon if you want, it all depends on the complexity of the game, the more functionality you need the more you will benefit from an engine. (For a simple pong game you could quite easily write everything (apart from the functionality allready provided by the target platform) yourself in a few hours)

You can split the words 'from scratch' in 2 ways.

Some people think 'starting from scratch' means : writing EVERYTHING yourself. But really "everything".
Other people think: You got the library's, platforms, compilers to write it but you need to write the entry point and stuff yourself.

If you do the first way: write the platform, compiler yourself ( so low level game programming ), it will take a very very long time to write it.
But if you already got it you can write a simple game in an afternoon yes. :)

I was talking about the first. Some people dislike the fact of using code written by others. They want to write their own game engine instead of using an existing one. But even if you just use the Windows API you are already using existing code. Games made by game makers aren't 'real games' according to some, but the only reason I wouldn't use a game maker for simple games is because I just like the act of programming one, I wouldn't be "ashamed" to publish a game made by a game maker. Don't try to re-invent the wheel, if someone already programmed something useful than by all means use it.

#4892481 How to begin?

Posted by on 10 December 2011 - 05:31 AM

Hello and welcome Karim,

There are lots of ways to make games, it can be either with a game maker or by programming one yourself.
When you want to program your own game, it's impossible too write everything yourself from scratch.
Programmers use code written by others all the time. If you write applications for windows you use libraries provided by microsoft to set up a window and use Windows specific interfaces. The same is true for games. Engines such as Torque 3D are collections of classes and methods that help you to create the game. You still need programming experience.

Please understand that learning how to program isn't easy, and even if you are an experienced programmer it will take many years to complete a decent game all by yourself.
It all depends on how much spare time you have ofcourse, if you are able to learn and practice full time it will all go much faster than if you want to do it as a hobby when you come back from a day of hard work.

There are too many programming languages to count, but there are a couple of popular languages I would consider checking out first. There is not one single 'best' language, it depends on the job and personal taste. As you become more experienced you might want to learn more additional languages so you can choose the one most suitable for the project. As soon as you learn one language the next one goes much faster, for the most part it's just the syntax that changes along with some slight changes in features. I would start checking out some beginners guides on C++, Java, C# and Python, than pick the one that suits you best. As soon as you made a choice I would recommend to buy some good books, than start practicing by programming simple applications. As soon as you are more skilled you can try to program your own version of Tetris or Pong.


- Rob

#4816822 What is wrong with this code?

Posted by on 28 May 2011 - 11:08 AM

Pfff there are a lot of things wrong or bad in your code. I don't have time to look through all the lines, but except for the 'o' and the uninitialized variables I also noted your are using rand() without setting a seed first. rand() generates a random number based on a 'seed' using some kind of algorithm. The seed should be set before using rand() and usually something like the time in milliseconds since the start of the program is used. If you don't set a seed you are getting the same number over and over again.

This has nothing to do with not compiling, but is just something I noticed reading your code.

Next time it might be a good idea to compile your game a little more often. That way you can spot errors more easily and it is easier to debug.
Right now I would suggest commenting away lots of code, make whole functions blank by putting /* and */ in front and at the end of the code.
Remove as much code until your code finaly compiles and than slowly start re-adding the code. (edit: seems someone already posted my great idea...frustrating :) )