ComineGL: Game Library for Learning Programming in C/C++

Announce new projects or updates of Irrlicht Engine related tools, games, and applications.
Also check the Wiki
devetc
Posts: 22
Joined: Thu Nov 11, 2010 1:51 am
Contact:

Post by devetc »

Kalango wrote:Well, there is DarkBasic (programmng in basic, wich is pretty nice for starters and it has all the merit), Dark GDK(in c++ and its quite nice), Unity3d(uses C#, its more complex), Shiva3d(uses LUA, more complex too).
But anyway..you do what you wanna do. IMO you're just wasting time learning C++ if you dont plan to take it too seriously, since it can cause you trouble later.... I guess a scriptin language such as LUA or some higher level language like C#/Python/Ruby would be more fit to you...
I agree with Kalango. If the target is to write a game, then you should use the most mature technology available.

The target of the the cominegl library was to get people to learn programming in c/c++ by building stuff easily at a level that is appropriate.

Once they have learned the basics of building software and developing, I would highly recommend OO C++ libraries(ie irrlicht).

-devetc
Radikalizm
Posts: 1215
Joined: Tue Jan 09, 2007 7:03 pm
Location: Leuven, Belgium

Post by Radikalizm »

I can see what you are trying to achieve with this project, but i have the feeling this is kind of writing a wrapper for an already relatively easy API (for the graphics part)

Learning how to program can be daunting, I know this since I've helped a lot of beginning programmers, but avoiding the principles of OOP is not the way to go in my opinion
New programmers at university level with absolutely no previous experience first learn the basics of OOP way before they get to write their first lines of code, I do realize that they mostly start off with java, which is easier than C++ imo, but the basic principles of OOP are applicable to both

If people are having problems with getting a simple application set up with irrlicht, they probably don't know the basics of the language and its principals (or they haven't checked out the API/tutorials properly) which is an absolute prerequisite for programming ANY application

Anyway, these are just my two cents ;)

Good luck with the project!
devetc
Posts: 22
Joined: Thu Nov 11, 2010 1:51 am
Contact:

Post by devetc »

wahagn wrote:
Yes, I have tought of two things that noob game programmers maybe would like to have in their game:

- inventory boxes ( in rpg games)
- zoom possiblity (like for a sniper in an fps game)
Hello Wahagn,

For inventory boxes:
Why don't you suggest a set of functions that you think would be helpful, and we can discuss them. If they are good, I will put them in the library.

For Zoom:
The zoom is can be implemented with a second child camera node of the active camera. When someone wants to zoom, you just make the child camera active and move it closer towards a target.

If I probably did not make sense, it is ok. I will need to write two tutorials to explain the concept:

1. Node hierarchy and local coordinate systems.

2. Implementation of zoom and switching between cameras.

-devetc
devetc
Posts: 22
Joined: Thu Nov 11, 2010 1:51 am
Contact:

Post by devetc »

wahagn wrote:Cany I try to make a logo for you with photoshop

sorry to say but this current is in my opinion rather ugly
Hello Wahagen,

If am pretty bad as an artist. If you can build something better, I would be grateful, so long as the image does not conflict with the GPL licence of the project.

-devetc
devetc
Posts: 22
Joined: Thu Nov 11, 2010 1:51 am
Contact:

Post by devetc »

wahagn wrote: Is there already a way to get rid of the black screen ?? (i mean with this v0.13 version) if yes: how??
Hello Wahagn,

The following code example loads up a texture and draws it on the background of the window at the frame rate. Remember you can also use fonts just like the CGLWindowFrontRenderer.

Code: Select all

#include <ComineGL/ComineGL.h>

///////////////////////////////////////////////
bool Background(void)
	{
	// Draw texture 1 to position on top left corner (40,40)
	//   width(100) and height 50 of window(400x400).
	CGLWindowDrawTexture(1,40,40,100,50);
	return true;
	}


///////////////////////////////////////////////
int main(void)
	{
	CGLEngine engine(400,400);
	
	// Load up texture 1
	CGLTextureLoad(1,"ComineGL.jpg");
	
	// Load up a test cube
	CGLNodeLoadCube(10,100);

	// Load and move camera in front of cube
	CGLNodeLoadCameraFPS(0);
	CGLNodeSetPosition(0,0,0,-200);
	
	// Set out back render routine callback
	CGLWindowBackRenderer(Background);
	
	engine.GameLoop();
	return 0;
	}


See tutorial for fonts

http://comine.com/1622/tutorial18.htm

I will try to make a tutorial to explain the concept further.
Basically, the graphics are rendered in the following order

1. Render the Background first
2. Render the Scence Graph
3. Render the Forground last

You set the Background REnder/Foreground rendering callback functions with
CGLWindowFrontRender(...) and CGLWindowBackRender(...).

To clear the callback rendering function, just call CGLWindowFrontRender/CGLWindowBackRender with no arguments.

Or return false in the rendering functions.

I really need to start writing full documentation. But, I am a bit busy at work except on weekends.

-devetc
serengeor
Posts: 1712
Joined: Tue Jan 13, 2009 7:34 pm
Location: Lithuania

Post by serengeor »

Well I actually like this library as someone said its similar to Dark GDK, and I started out with 3d with it, tough after a while I got tired of function copying/pasting and wanted to learn more of c++ to get more control of what I do, and then I found irrlicht :)
Working on game: Marrbles (Currently stopped).
wahagn
Posts: 186
Joined: Sat Dec 06, 2008 5:11 pm
Location: Zundert (Netherlands)

Post by wahagn »

devetc wrote:
wahagn wrote:Cany I try to make a logo for you with photoshop

sorry to say but this current is in my opinion rather ugly
Hello Wahagen,

If am pretty bad as an artist. If you can build something better, I would be grateful, so long as the image does not conflict with the GPL licence of the project.

-devetc
Ok i made one ifyou don't like it I can me a new one or chang some thing ( btw I didn't know you slogan so I mad one myself:) http://img406.imageshack.us/i/logopa.png/
“Any code of your own that you haven’t looked at for six or more months might as well have been written by someone else.”
(Eagleson’s Law)
wahagn
Posts: 186
Joined: Sat Dec 06, 2008 5:11 pm
Location: Zundert (Netherlands)

Post by wahagn »

devetc wrote:
wahagn wrote: Is there already a way to get rid of the black screen ?? (i mean with this v0.13 version) if yes: how??
Hello Wahagn,

The following code example loads up a texture and draws it on the background of the window at the frame rate. Remember you can also use fonts just like the CGLWindowFrontRenderer.

Code: Select all

#include <ComineGL/ComineGL.h>

///////////////////////////////////////////////
bool Background(void)
	{
	// Draw texture 1 to position on top left corner (40,40)
	//   width(100) and height 50 of window(400x400).
	CGLWindowDrawTexture(1,40,40,100,50);
	return true;
	}


///////////////////////////////////////////////
int main(void)
	{
	CGLEngine engine(400,400);
	
	// Load up texture 1
	CGLTextureLoad(1,"ComineGL.jpg");
	
	// Load up a test cube
	CGLNodeLoadCube(10,100);

	// Load and move camera in front of cube
	CGLNodeLoadCameraFPS(0);
	CGLNodeSetPosition(0,0,0,-200);
	
	// Set out back render routine callback
	CGLWindowBackRenderer(Background);
	
	engine.GameLoop();
	return 0;
	}


See tutorial for fonts

http://comine.com/1622/tutorial18.htm

I will try to make a tutorial to explain the concept further.
Basically, the graphics are rendered in the following order

1. Render the Background first
2. Render the Scence Graph
3. Render the Forground last

You set the Background REnder/Foreground rendering callback functions with
CGLWindowFrontRender(...) and CGLWindowBackRender(...).

To clear the callback rendering function, just call CGLWindowFrontRender/CGLWindowBackRender with no arguments.

Or return false in the rendering functions.

I really need to start writing full documentation. But, I am a bit busy at work except on weekends.

-devetc

I can't follow what your saying but my question was for getting rid of the CMD screen and I think you were talking about something else
“Any code of your own that you haven’t looked at for six or more months might as well have been written by someone else.”
(Eagleson’s Law)
wahagn
Posts: 186
Joined: Sat Dec 06, 2008 5:11 pm
Location: Zundert (Netherlands)

Post by wahagn »

devetc wrote:
wahagn wrote:
Yes, I have tought of two things that noob game programmers maybe would like to have in their game:

- inventory boxes ( in rpg games)
- zoom possiblity (like for a sniper in an fps game)
Hello Wahagn,

For inventory boxes:
Why don't you suggest a set of functions that you think would be helpful, and we can discuss them. If they are good, I will put them in the library.

For Zoom:
The zoom is can be implemented with a second child camera node of the active camera. When someone wants to zoom, you just make the child camera active and move it closer towards a target.

If I probably did not make sense, it is ok. I will need to write two tutorials to explain the concept:

1. Node hierarchy and local coordinate systems.

2. Implementation of zoom and switching between cameras.

-devetc

For inventory boxes (can also be used for other thing but I can't com up with any now):

something like:

CGL makeraster(int id, int length, int height, int how many boxes);

CGL loadraster(int id, int position x, int postion y);

^^ evry box wich is made with the engine has an name so its something like this:

http://img153.imageshack.us/i/raster.png/


and so on ^^ depending on how many boxes you made



then some functions like:

CGL rastertexture(url to texture of box 1, url to texture of box 2... etc);

CGL rasterfillformat( image); or something like:
CGL rasterfillformat( 3dobject);


and for zooming:

CGL camerazoom(camera, amount you want to zoom in %, with wich key or mous click);

^^ for camera you van tell the id of camera or simply say : activecamera
“Any code of your own that you haven’t looked at for six or more months might as well have been written by someone else.”
(Eagleson’s Law)
serengeor
Posts: 1712
Joined: Tue Jan 13, 2009 7:34 pm
Location: Lithuania

Post by serengeor »

CGL camerazoom(camera, amount you want to zoom in %, with wich key or mous click);
Bad idea, thats what event receiver is for. Instead it could be amount of time till it zooms in to that position.
Working on game: Marrbles (Currently stopped).
wahagn
Posts: 186
Joined: Sat Dec 06, 2008 5:11 pm
Location: Zundert (Netherlands)

Post by wahagn »

serengeor wrote:
CGL camerazoom(camera, amount you want to zoom in %, with wich key or mous click);
Bad idea, thats what event receiver is for. Instead it could be amount of time till it zooms in to that position.
Pretty smart actually... I agree with you
“Any code of your own that you haven’t looked at for six or more months might as well have been written by someone else.”
(Eagleson’s Law)
serengeor
Posts: 1712
Joined: Tue Jan 13, 2009 7:34 pm
Location: Lithuania

Post by serengeor »

But that would require some kind of inner animators which could cause some troubles.
Working on game: Marrbles (Currently stopped).
wahagn
Posts: 186
Joined: Sat Dec 06, 2008 5:11 pm
Location: Zundert (Netherlands)

Post by wahagn »

@serengeor I think devetc should descide how to do it it was just a suggestion

@devetc By the way I think when you have time you schould make a demo for the library so you can make people enthusiastic for the Game Library now I could do that and I have time to do it but I don't know how I could make a fun app and still use almost all functions.
however this is my suggestion:

Maybe it could be a bit like the irrlicht demo but then you walk trhoug another map(so not that demo castle) where you can have different guns pick up some 3d objects (like guns and health packages) and you can shoot so it actually is an FPS game but without A.I, Phisx and there is no point ( I mean you just walk schoot but you can't do anything else) . Maybe you use a lot of time on making the demo but it is in my eyes very important that people get enthusiastic and see what the library can do.

So devetc what do you think on making a demo for your library and of my suggestion/idea btw I think its going to be a bit hard to make the part that you can pick up 3d objects and the schooting part
btw2 Maybe(I will try) I can help you with the code but I am not able to make any 3d art
(like the gun or the map) because I'm pretty bad in modeling(but offcourse you could use free models you can find on the web)
“Any code of your own that you haven’t looked at for six or more months might as well have been written by someone else.”
(Eagleson’s Law)
Radikalizm
Posts: 1215
Joined: Tue Jan 09, 2007 7:03 pm
Location: Leuven, Belgium

Post by Radikalizm »

wahagn wrote: Maybe it could be a bit like the irrlicht demo but then you walk trhoug another map(so not that demo castle) where you can have different guns pick up some 3d objects (like guns and health packages) and you can shoot so it actually is an FPS game but without A.I, Phisx and there is no point ( I mean you just walk schoot but you can't do anything else) . Maybe you use a lot of time on making the demo but it is in my eyes very important that people get enthusiastic and see what the library can do.
You do realize that you need some form of collision detection (read: physics) to implement picking up stuff, walking around, shooting, etc., right?

I really think that it'd be best for you to take the time to learn the language and the irrlicht library, because right now what you're doing is the same as wanting to build a car by asking other people to build all the parts and stuff which make the car a car, while you just put in the screws to hold everything together and call it your own

a game can be very complex, and I don't think it's an engine's job to provide all in-game elements (like inventory boxes), an engine should just provide you the tools to build these things yourself

But in the end nothing is stopping you from taking this route, I just don't believe you'll actually learn anything by it, nor will you gain any real game developing experience

Just my two cents ;)
serengeor
Posts: 1712
Joined: Tue Jan 13, 2009 7:34 pm
Location: Lithuania

Post by serengeor »

Radikalizm wrote:
wahagn wrote: Maybe it could be a bit like the irrlicht demo but then you walk trhoug another map(so not that demo castle) where you can have different guns pick up some 3d objects (like guns and health packages) and you can shoot so it actually is an FPS game but without A.I, Phisx and there is no point ( I mean you just walk schoot but you can't do anything else) . Maybe you use a lot of time on making the demo but it is in my eyes very important that people get enthusiastic and see what the library can do.
You do realize that you need some form of collision detection (read: physics) to implement picking up stuff, walking around, shooting, etc., right?

I really think that it'd be best for you to take the time to learn the language and the irrlicht library, because right now what you're doing is the same as wanting to build a car by asking other people to build all the parts and stuff which make the car a car, while you just put in the screws to hold everything together and call it your own

a game can be very complex, and I don't think it's an engine's job to provide all in-game elements (like inventory boxes), an engine should just provide you the tools to build these things yourself

But in the end nothing is stopping you from taking this route, I just don't believe you'll actually learn anything by it, nor will you gain any real game developing experience

Just my two cents ;)
Exactly.
Working on game: Marrbles (Currently stopped).
Post Reply