Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length

 
Advanced search

1368188 Posts in 64209 Topics- by 56149 Members - Latest Member: dev.kandarp.pandya

October 22, 2019, 07:42:02 PM

Need hosting? Check out Digital Ocean
(more details in this thread)
TIGSource ForumsDeveloperTechnical (Moderator: ThemsAllTook)XRhodes thread [v1.6.1 is released]
Pages: [1] 2 3 4
Print
Author Topic: XRhodes thread [v1.6.1 is released]  (Read 16061 times)
György Straub
Level 4
****


Friendly Giant Nano


View Profile WWW
« on: August 23, 2008, 04:49:52 AM »



Welcome everyone!

XRhodes is a game library I'm working on. For kick-off, a summary:

XRhodes...
  • aims to reduce the amount of code you have to write to get a game working, but not the flexibility or performance you have at hand with C++.
  • is written in C++; the desktop versions use SDL2 & OpenGL
  • supports Win8+, MacOS I dunno, High Sierra+?, Linux Ubuntu 16.04+ (64 bits), and more to come
  • is designed with any-number-of-D games in mind;
  • supports all the "primitives" you'd expect from a very generic game library (and hopefully more)
     - low level building blocks;
     - signals and generic callbacks;
     - lowish level palatable graphics library / abstraction, now multi-threadable;
     - SDF / bitmap fonts and UTF-8 text;
     - sprites and texture packs;
     - resource management with dependencies, offline building and async loading;
     - math library;
     - keyboard / mouse / gamepad support
     - usage examples!
     - README.md! Wizard
  • It comes with examples and unit tests
  • And now we have a super easy to use template to create your own projects. Feel like an awesome goddamn Ninja yet?


Questions. Discussion. GO!
« Last Edit: May 14, 2019, 08:58:16 PM by György Straub » Logged

Gainsworthy
Level 10
*****

BE ATTITUDE FOR GAINS...


View Profile
« Reply #1 on: August 23, 2008, 05:22:31 AM »

Uh... yay? I hope. Though, that post was somewhat vague to one such as myself. Guess I'll wait for the pipeline to deliver.
Logged
György Straub
Level 4
****


Friendly Giant Nano


View Profile WWW
« Reply #2 on: August 23, 2008, 12:25:02 PM »

Gainsworthy: thanks for the input - the pipeline has delivered! let me know if I can make the project any less vague for you.

and in the meantime, please comment!
Logged

Hideous
That's cool.
Level 10
*****


3D models are the best


View Profile WWW
« Reply #3 on: August 23, 2008, 12:37:07 PM »

COLLISION DETECTION IS FUN-TIME HAPPY

Or something. Anyway, uh, I'll probably try this out, but not right now Tongue
Logged

increpare
Guest
« Reply #4 on: August 23, 2008, 04:13:33 PM »

The osx version just crashes on me Sad
Logged
kyn
Level 10
*****


user of the year


View Profile WWW
« Reply #5 on: August 23, 2008, 04:20:16 PM »

So... What am I looking at here really?

I mean, there's nearly no content here that I can comment on. It's just these balloon thingies rotating and moving around with the touch of some keys.

Is that all there is to it, or am I just missing something?
Logged
cmspice
Level 1
*


View Profile
« Reply #6 on: August 23, 2008, 09:36:21 PM »

So... What am I looking at here really?

I mean, there's nearly no content here that I can comment on. It's just these balloon thingies rotating and moving around with the touch of some keys.

Is that all there is to it, or am I just missing something?

uh, I believe it's a game framework that you can put your own content in. So... Instead of rotating balloons you could put... other things in their place.
Logged
György Straub
Level 4
****


Friendly Giant Nano


View Profile WWW
« Reply #7 on: August 23, 2008, 11:07:49 PM »

Thanks guys, now I see what Gainsworthy meant by the first post being "vague". I guess I'm just too excited about the stuff and I forgot to to step out of my head for a minute. Okay now!

XRhodes is a game framework. It aids game development in C++, by building on the basic features of the language, and also the SDL and OpenGL library. Now, as I thought about it, I should have pointed out that what I'm aiming at is something like a "Game Maker" for those who speak C++, but don't want to start game/multimedia development from scratch.

No. I know. The functionality and ease of use of Game Maker and MMF is unparalleled. Back when I was having a shot at them I felt that at some point they aren't very flexible, have bugs, doesn't support multiplatform development. I've heard how much they have evolved in the recent years, and that even some limited multiplatformability is at hand. That's very neat.

XRhodes is NOT a content creator. It is a high-level C++/SDL/OpenGL library. The main thing about it is how it deals away with lengthy and tedious tasks which are generic to game/multimedia development. Handling of subsystems initialization, memory management,  fonts, animation, stuff I've listed up there.

Instead of
Code:
uint flags(SDL_OPENGL | SDL_GL_DOUBLEBUFFER | SDL_HARDWARE);
if(isFullScreen) {
flags |= SDL_FULLSCREEN;
}

uchar bppGiven(::SDL_VideoModeOK(width, height, bpp,flags));
SDL_Surface *pScreen = ::SDL_SetVideoMode(width, height, bppGiven, flags);

if(pScreen == NULL) {
std::ostringstream buf;
buf << "SDL_SetVideoMode failed: " << ::SDL_GetError();
throw Exception(buf.str());
}

// set clear values
::glClearColor(.0f, .0f, .0f, 1.0f); // clear color is black
::glClearDepth(1.0f);

// set viewport
::glViewport(0, 0, width, height);

// enable texturing
::glEnable(GL_TEXTURE_2D);

// enable blending
::glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
::glEnable(GL_BLEND);

// enable scissor test
::glEnable(GL_SCISSOR_TEST);

// disable lighting
::glDisable(GL_LIGHTING);

// setup projection matrix
::glMatrixMode(GL_PROJECTION);
::glLoadIdentity();
::glOrtho(.0, width, height, .0, .0, -width * 4.0f);

// setup modelview matrix
::glMatrixMode(GL_MODELVIEW);
::glLoadIdentity();

// setup modelview matrix
::glMatrixMode(GL_MODELVIEW);
::glLoadIdentity();

if(::glGetError() != GL_NO_ERROR) {
std::ostringstream buf;
buf << "OpenGL initialization failed: " << ::glGetError();
throw Exception(buf.str());
}

you write
Code:
XR::GFX::Init(width, height, isFullscreen, bpp);

The downloadable application isn't XRhodes, it was written with XRhodes (see readme.txt, no, seriously). I'll include client code to demonstrate how little code was used to achive the functionality you see in the demo.
« Last Edit: August 24, 2008, 01:52:21 PM by !CE-9 » Logged

Dacke
Level 10
*****



View Profile
« Reply #8 on: August 24, 2008, 04:10:47 AM »

I get what it is, I'm so proud of myself!

I still like to do all the tedious things myself, as I'm still in a learning process and would risk loosing out on some necessary basic understanding of things if I were to take shortcuts.

Though I must say that some of your shortcuts seem very attractive indeed! If you get some networking in there as well (though it might be very hard to do in a nice general-solution way?) it would almost be impossible to resist making small quick games with this.

Game maker is horrible, inflexible and hard to learn. This seems much more in my taste! Very nice initiative!  Gentleman
Logged

programming• free software
animal liberation • veganism
anarcho-communism • intersectionality • feminism
György Straub
Level 4
****


Friendly Giant Nano


View Profile WWW
« Reply #9 on: August 24, 2008, 12:59:09 PM »

Dacke=) thanks for the comment. I absolutely understand how you don't want to lose out on the learning process. As it happens, writing XRhodes is the learning process itself for me (well, mostly).=) I'm hoping to combine convenient with economic.Wink
Logged

michael
Pixelhead
Level 10
******


the last ottumway


View Profile WWW
« Reply #10 on: August 24, 2008, 01:13:00 PM »

this sounds really awesome! but it doesnt seem to work at all on my mac. im running 10.5.4
Logged

you rob the bank, i'll rob stewart
György Straub
Level 4
****


Friendly Giant Nano


View Profile WWW
« Reply #11 on: August 24, 2008, 01:27:11 PM »

Increpare (sorry for the delay in getting back to you) and Michael: strange. the program sends some error messages to stderr. they are for probably the only situations when this application has crashed on me, so I haven't got much clue. how did it crash for you?

as you don't run the game from the compiler I'm not sure how to get out a console window (system.log maybe?), or where do messages from stderr get dumped (and exit codes from main)... anybody?

EDIT: ah, got it! the console is Applications/Utilities/Console.app, and the messages should be at the bottom, after a sea of error messages referring to _NSAutoreleasePool() which I don't know about. they start with "ERROR:".

Michael, thanks for the encouragement.
« Last Edit: August 24, 2008, 01:48:26 PM by !CE-9 » Logged

increpare
Guest
« Reply #12 on: August 24, 2008, 03:27:41 PM »

I can't paste in the bloody console output because of the spam-filters  Angry Angry Angry Angry

It says that the SDL_image framework library wasn't loaded, because some image wasn't found... I think...I'd love to paste in the output...but this forum won't let me  Cry
Logged
György Straub
Level 4
****


Friendly Giant Nano


View Profile WWW
« Reply #13 on: August 24, 2008, 08:42:38 PM »

I can't paste in the bloody console output because of the spam-filters  Angry Angry Angry Angry

It says that the SDL_image framework library wasn't loaded, because some image wasn't found... I think...I'd love to paste in the output...but this forum won't let me  Cry

thank you! that's mysterious, I'd rather imagine it the other way around if anything (missing SDL_image -> couldn't load images). now SDL_image is sitting amongst the project's linked frameworks, but for some reason it doesn't show in the .app. Same goes for SDL_mixer -- but SDL itself is there.

I'll investigate.
Logged

György Straub
Level 4
****


Friendly Giant Nano


View Profile WWW
« Reply #14 on: August 26, 2008, 09:30:13 AM »

problem fixed. some minimal extra functionality, corrected documentation and source included in the new downloadables. both platforms.  CoolTired
Logged

increpare
Guest
« Reply #15 on: August 26, 2008, 09:37:29 AM »

There's one quite nice effect whose intentionality I'm not entirely sure of, namely the lines that appear in the images

Logged
György Straub
Level 4
****


Friendly Giant Nano


View Profile WWW
« Reply #16 on: August 26, 2008, 09:53:53 AM »

There's one quite nice effect whose intentionality I'm not entirely sure of, namely the lines that appear in the images



not sure what you mean... Smiley

the pixelation of the sprites too close to the camera are achieved by
Code:
::glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);

as opposed to
Code:
::glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
(intentional; just a question of my taste, I thought small pixel sprites blurred don't look good. I think I'll leave an option to switch between the two (as for the framework))

the lines in the LDI logo is achieved by a set of Paint Shop Pro effects I barely remember. (intentional)

something else / irony? (unintentional)

Logged

increpare
Guest
« Reply #17 on: August 26, 2008, 09:54:34 AM »

Oh wait, it was just the lens flare  :D :D :D

Also: the CPU-usage is pretty respectable.  Good stuff  Beer!
Logged
György Straub
Level 4
****


Friendly Giant Nano


View Profile WWW
« Reply #18 on: August 26, 2008, 09:57:16 AM »

ah. yeah. :D
Logged

György Straub
Level 4
****


Friendly Giant Nano


View Profile WWW
« Reply #19 on: September 11, 2008, 04:14:19 PM »


it's coming.

happy, happy, joy, joy.
Logged

Pages: [1] 2 3 4
Print
Jump to:  

Theme orange-lt created by panic