C 3d game engine

C 3d game engine

Postby JontomXire » 21 Feb 2015, 14:45

Hi, all.

I recently played around with SDL/OpenGL and I can see it has a lot of potential. However I can see there is a place where you want a library that will take an object model definition in a separate file and just display it, rather than writing a ton of code to do that specific model. I know there are a lot of (sometimes free/opensource) 3d graphics/games engines/libraries out there, but they all seem to be C++ and frankly I feel a bit too old to relearn C++. It seems to have changed a lot since I last used it about 15 years ago, and I'm not sure I think it is an improvement.

I'm a hardcore C programmer, and SDL and OpenGL are both written in C. Are there any good C libraries out there (preferably free/open source) that will let me just import 3d models in a convenient format, and some sort of game map, and let me move the models around the map?

In fact are there any C engines/libraries at all, whether free or not or good or not? Or am i going to have to write my own. From scratch. While distracted by 3 screaming kids?


Also, I had a play with the object modelling software used to make SuperTuxKart and I couldn't do anything with it. I have used 3D Studio Max in the past and found it a little complicated, but still managed to model various simple shapes and even use it to model a custom built in wardrobe I had a carpenter make for me. So although I'm no expert, I don't feel I qualify as a total noob at 3D modelling either. But this other software (I forget what it was called - Blender or something?) I found totally unusable and couldn't achieve anything with it at all.

Can anyone offer me a heads up on some free 3D modelling software with a nice simple to load file format? Or offer to do 3D models for me :)

Thanks.
JontomXire
 
Posts: 13
Joined: 04 Apr 2013, 13:49

Re: C 3d game engine

Postby NaN » 21 Feb 2015, 15:30

I am sure there are a few C engines out there, like https://github.com/ioquake/ioq3

IQM is very OpenGL friendly format, they also have converters for popular modeling formats like OBJ or FBX.
http://sauerbraten.org/iqm/

I prefer Blender, but SketchUp is said to be very intuitive to use. Although the free version only exports to COLLADA, which is a pain to deal with from what I've heard.
http://www.sketchup.com/

There is also Wings3D, which is a strict modeler.
http://www.wings3d.com/
NaN
 
Posts: 151
Joined: 18 Jan 2010, 10:32

Re: C 3d game engine

Postby Julius » 21 Feb 2015, 15:41

Give Blender another try, its interface improved quite a bit in recent years. Otherwise I also recommend Wings3D, but it doesn't do animations.

Otherwise, don't bother with low level rendering libs if you just want to play around with a 3D engine a bit. Besides the mentioned ioq3, maybe even better for trying out is the Darkplaces engine that is written in C and uses a C like script engine (check out Xonotic as an example for a game based on it, maybe have a look into contributing to it first, to learn your way around the engine?).
User avatar
Julius
Community Moderator
 
Posts: 3297
Joined: 06 Dec 2009, 14:02

Re: C 3d game engine

Postby andrewj » 22 Feb 2015, 01:39

A quake engine (like Darkplaces) is very good if you are making a first person shooter in static, pre-compiled maps. They are C code.

But if you are making something quite different than that (like I recently tried to), then you will quickly hit your head against their limitation. They are not general-purpose engines.

Need to also consider how you want to create maps, the mapping tools for quake engines (like NetRadiant) exists and work well, but are not as easy to use as the built-in editor in Cube or Sauerbraten.

SuperTuxKart uses the Irrlicht engine for 3D stuff, OpenDungeons uses OGRE. They are heavy dependencies. Most engines like that will be C++, the language is well suited to GUI toolkits and 3D engines (and ill-suited for other stuff, but I digress....)

P.S. don't roll your own, or you will spend all your time making the engine and not the actual game.
User avatar
andrewj
 
Posts: 194
Joined: 15 Dec 2009, 16:32
Location: Tasmania

Re: C 3d game engine

Postby JontomXire » 22 Feb 2015, 08:37

Thanks for all the tips. I'll check them all out.

As to Blender, I think one problem was that I was unable to enter numerical co-ordinates for vertexes, although I may misremember. As a child I wrote a wireframe 3D rotating display program and I did all the models as raw co-ordinate data in the program. I find it easy to visualise shapes in 3d space like that, and then can tweak the co-ordinates slightly to get the shape right. In fact as I was lying in bed unable to sleep because my mind was too full of ideas (again) I was thinking how I coudl write a character editor just as an app where you enter raw co-ordinates.

Anyway, thanks again for the advice.
JontomXire
 
Posts: 13
Joined: 04 Apr 2013, 13:49

Re: C 3d game engine

Postby JontomXire » 22 Feb 2015, 08:48

All the engines mentioned look like Quake based engines. Initially, while I fix the combat system, I want my game to be arena based, but eventually I want to turn it into an MMORPG. Will these engines handle large worlds? Are there any C based engines that do?

Grit looks quite good, but is C++ IIRC.
JontomXire
 
Posts: 13
Joined: 04 Apr 2013, 13:49

Re: C 3d game engine

Postby andrewj » 22 Feb 2015, 12:57

Sauerbraten is not a quake-based engine. It is written in C++ but browsing the code just now, the engine code is very C-like.

How large do you want the maps to be? If you need features like being able to "stream" parts of the map into memory at any one time, that is not something any quake-based engine can do (nor can Sauerbraten). GRIT is apparently designed for very large worlds, last time I looked it the project seemed stalled.

Perhaps check out the PlaneShift -- an open source MMORPG project.

P.S. WorldForge is another open-source MMO project.
User avatar
andrewj
 
Posts: 194
Joined: 15 Dec 2009, 16:32
Location: Tasmania

Re: C 3d game engine

Postby Julius » 22 Feb 2015, 14:52

There is also the engine that runs the Ryzom MMORPG.

But I strongly suggest that you reconsider your plans as MMORPGs are next to impossible to create as a hobby project (besides the costs of running servers for it) and MMOFPS (as you seem to suggest) even more so.

Is there really no existing project you like that could benefit from your contributions?
User avatar
Julius
Community Moderator
 
Posts: 3297
Joined: 06 Dec 2009, 14:02

Re: C 3d game engine

Postby JontomXire » 22 Feb 2015, 15:28

@andrewj Thanks for the info - I'll check out those games. Sauerbraten seems to use the same format files as Quake use(d) and recommends developing new games as "mods" of the original game with an original game install underneath. Which is what Quake does (did). I couldn;t find any link to the engine code or anything and was going to post on the forums when I decided that at the end of the day it just wasn't what I was looking for - I can't remember the reason why know.

I've heard of World Forge but don't think I've heard of it - I'll check out PlaneShift too.


@Julius

I tried Ryzom, but the networking code is utter rubbish. Rubber-banding and frequent "please wait" dialogues. When I posted on their forums and even offered to help, I got no response at all. I loved the crafting system, and there were a few helpful people, but I did find the quests a bit slow and the combat system wasn't great.

I've looked around but not found anything I like. If I've missed anything let me know. Also whenever I find an existing project that excites me, I always have loads of ideas for ways to improve it, new ideas and concepts and rules extensions and stuff, but no-one is ever interested. Would you like someone like me coming into your game that you wer working on and suggesting a whole bunch of changes? Unless you were really like minded, and they were just ideas you hadn't thought of, and you were mature enough to not feel challenged by that, I doubt it.

I spent hours on Friday night with a rules system for a great magic combat system growing in my head, and stopping me from sleeping, and despite kids etc. managed to write most of it down, fleshing it out and filling in gaps. It's really simple, but complete (although needs tuning) and potentially nicely extendible. Players have abilities a bit like the "Jutsu" in the Naruto series, but clearly defined and very different depending on what "element" you belong to. I was going to have it initially as a 1v1 arena game, extending later in all direction - better graphics etc., 2v2 or 5v5 matches, factions, etc., and then later extend still more by adding a fairly sandboxy world as a war server, faction vs. faction, maybe add some levelling zones etc. with a few quests at some point.

I was going to start with really simple 2D graphics and no sounds as a quick fun little game (remember 2 player Joust?) and then could work on graphics etc. at my own pace, maybe recruit some help if anyone played it who liked it. If I can get something basically playable in 6 months, I don't mind spending years turning it into a full fledged game. It could become a retirement project in 25 years time.

As to costs for running servers, I plan to get my garden shed rebuilt in brick the way it was before a past house owner knocked it down, move all my tools out of the cupboard under the stairs, and put something small but powerful in there as a server. I used to have my own server years ago but it over heated as I was keeping it in a cupboard due to lack of space and one Summer it kept dying and then I got fed up with it. I'm also fed up with various public webmail services, so having my own server would allow me to have my own mail server and mail address which would be nice. If I can't host it at home, I earn enough to easily be able to afford a decent server commercially hosted.
JontomXire
 
Posts: 13
Joined: 04 Apr 2013, 13:49

Re: C 3d game engine

Postby Julius » 22 Feb 2015, 20:39

I think you are vastly underestimating the sever and net connection requirements oft running a MMO. Haven't tried Ryzom lately but I would wager that it isn't actually bad netcode but rather that they can't afford good servers anymore (I know that they recently had to downsize on that).

That said, yes I can totally understand that you would rather try to work on your own ideas, but long experience has shown that very few projects make it past the initial enthusiasm phase, and ultimately lots of good work is wasted like that. Maybe you can at least find an project to base you game on as a mod? That way fixes and interesting gameplay ideas can at least be brought back to the main game in case you loose interest (which 99% sure you will sooner or later, and rarely is there a community of developers to pick up where you left). Sorry to have to be realistic ;)
User avatar
Julius
Community Moderator
 
Posts: 3297
Joined: 06 Dec 2009, 14:02

Re: C 3d game engine

Postby andrewj » 23 Feb 2015, 02:20

Julius {l Wrote}:but long experience has shown that very few projects make it past the initial enthusiasm phase, and ultimately lots of good work is wasted like that.

On the one hand, this is very true (from my own experience too).

On the other hand, if you are working on "the" project, the one which you are always thinking about and planning things for -- i.e. the project you are truly passionate about -- then it will be something you can work on for many years, possibly even decades.

Still... careful planning at the start can save you heaps of work later on.
User avatar
andrewj
 
Posts: 194
Joined: 15 Dec 2009, 16:32
Location: Tasmania

Re: C 3d game engine

Postby c_xong » 23 Feb 2015, 03:49

I'm really against the idea of making games that take many years to complete. If you're learning or just enjoy the process and don't care about the result, that's fine, but it's also very unproductive. You really need to be very experienced with making and shipping complete games in order to manage that kind of project scope, otherwise the results are uniformly crap. For example, this, or this. If you know of a good game made by a single, inexperienced author over many years, please let me know, because I sure haven't seen a single one.

On the other hand, if you start with games that are small yet fun, and continuously improve them for many years, that's a very different thing. This approach minimises wasted effort, as you can abandon the bad ones and build on the good, and maximises chances of success, as you can quickly churn through ideas until you find some that are good. Alternately, you can skip the first step and contribute to an already-established open source project, since they've done the hard part already - come up with a fun game. Games like Doom, or many rogue likes, were all completed in a fairly short timeframe, but since they are fun, volunteers kept hacking and contributing after decades, and open source largely contributes to this result since it doesn't require the original authors to be around. If you want to spend years working on a game, this is the kind of result you should be aiming for - not a pie-in-the-sky dream game that will take many years to even be playable.

If you really, really want to work on That One Game anyway, you should take the long view with your development too; instead of developing your game, develop your skills, since large projects are very hard. Get experience starting and - most importantly - completing small projects. Alternately you can wait until tools have improved so that your game is much easier to make, and since you have many years budgeted you can afford to wait a while. Today's game engines and makers (even the free/open ones) are so powerful, games that used to take professional developers months can now be made by amateur developers over a weekend. Who knows how much more powerful and easy they will be in a decade?
User avatar
c_xong
 
Posts: 234
Joined: 06 Sep 2013, 04:33

Who is online

Users browsing this forum: No registered users and 1 guest