Public Commander Keen Forum Forum Index Public Commander Keen Forum
This is neat.

Read the rules before posting!
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

OpenGL in Commander Genius
Goto page 1, 2  Next
 
Post new topic   Reply to topic    Public Commander Keen Forum Forum Index -> Commander Genius
View previous topic :: View next topic  
Author Message
gerstrong
Vorticon Elite


Joined: 31 Dec 2008
Posts: 744
Location: Bochum - Germany

PostPosted: Mon Jun 01, 2009 21:27    Post subject: OpenGL in Commander Genius Reply with quote

I don't know anything about OpenGL, but I have been learning a bit, and I tried to load the screen as one rectangular texture. As most of you know, that this is very slow, but it is the best way to implement it for now. When it works properly, I'm going to optimize that.

To give you a little taste of the upcoming mayor version, here a screenshot: (Version 0.2.9)



This is a normal (linear opengl) hardware scaled screen. It looks worse than the scale2x or 3x filter, but as you can imagine, it uses the advantage of hardware accelerated graphics.

The result is very amazing. CKP is 20 times faster on my machine (approx.) than with software rendering. So what do you think?

Give me some opinions. Maybe you have some ideas to improve the OpenGL feature.

Ahh, I almost forgot. I have optimized the Sound Class again. This next version will also come with better sounds!
Back to top
View user's profile Send private message Send e-mail Visit poster's website MSN Messenger
tulip
Flower Pot


Joined: 21 Aug 2008
Posts: 2203
Location: Heidelberg, Germany

PostPosted: Tue Jun 02, 2009 10:34    Post subject: Reply with quote

As of now this just looks blurry. If it's possible to make it sharp and look somewhat like the scale2x filter, I'd go for it. But if it stays looking like this I'd say theres no use for it.
_________________
You crack me up little buddy!
Back to top
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger MSN Messenger
gerstrong
Vorticon Elite


Joined: 31 Dec 2008
Posts: 744
Location: Bochum - Germany

PostPosted: Tue Jun 02, 2009 11:51    Post subject: Reply with quote

@Tulip: That won't be any problem. It's only a question of performance.

This filter is "Linear". I don't know what other exist in OpenGL. I'm still investigating

"Nearest" works the same, and it's a scale without filter but faster, of course.
Back to top
View user's profile Send private message Send e-mail Visit poster's website MSN Messenger
gerstrong
Vorticon Elite


Joined: 31 Dec 2008
Posts: 744
Location: Bochum - Germany

PostPosted: Tue Jun 02, 2009 18:10    Post subject: Reply with quote

Okay, here goes the second try!



The left one uses Scale2x, like you know it from CKP, but OGL transforms it to your chosen resolution. In this case it is 1024x768. The right one is the same case except that it is scale3x. Check out the lollipops! The seen difference is smaller now, but Scale2x is much faster!

What do you think? I'm thinking to implement scale4x. I imagine that it is faster than scale3x, because 4 is power of 2. It can simply bitshift everything like in scale2x. However scale4x, will only be available in conjunction with OpenGL.
Back to top
View user's profile Send private message Send e-mail Visit poster's website MSN Messenger
tulip
Flower Pot


Joined: 21 Aug 2008
Posts: 2203
Location: Heidelberg, Germany

PostPosted: Tue Jun 02, 2009 19:19    Post subject: Reply with quote

Looks good, let's see what x4 can do, I'll try it on my machine.
_________________
You crack me up little buddy!
Back to top
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger MSN Messenger
gerstrong
Vorticon Elite


Joined: 31 Dec 2008
Posts: 744
Location: Bochum - Germany

PostPosted: Wed Jun 03, 2009 10:22    Post subject: Reply with quote



Scale4x + OpenGL and 1024x768. Here you go!

The performace is very similar to Scale3x (a bit less). It will run faster on 32-bit Systems, because Scale2x and Scale4x use MMX Instructions. I don't know how to implement that for 64-bit Build (Linux), because this is the ASM-Part of ScaleX, which has to be changed. Windows users won't have that problem. Maybe someone has a good idea.

I'm still working on the new version.

EDIT: Youtube: http://www.youtube.com/watch?v=qmf0mrdNMyY
Back to top
View user's profile Send private message Send e-mail Visit poster's website MSN Messenger
Deltamatic
Vorticon Elite


Joined: 26 Apr 2009
Posts: 1418
Location: Shreveport, Louisiana

PostPosted: Wed Jun 03, 2009 18:14    Post subject: Reply with quote

I'm rather in the dark here... what is this Commander Genius? It looks like a higher-resolution Keen 1 with a two-player option, but that's all I know. Confused
Back to top
View user's profile Send private message
gerstrong
Vorticon Elite


Joined: 31 Dec 2008
Posts: 744
Location: Bochum - Germany

PostPosted: Wed Jun 03, 2009 19:11    Post subject: Reply with quote

No more Screenshots now, because....

Next version of Commander Genius has been released. Yes! 0.2.9! This time we have OpenGL. Try it out! And you will get the wonderful graphics you have seen here!

@Deltamatic: Commander Genius is CKP (CloneKeenPlus) passed to C++ (Partly), which interprets the original Commander Keen 1-3 Series. It is based on CloneKeen and has been improved by myself since December 2008. There are more features than just Hi-Res or 2-Player Support.

With High Quality Pack (HQP), also for free under "Downloads", you can enjoy the full game with better sounds and even music!

Do you have a gamepad? Fine. You can also map it to any buttons you want. But why to tell you more? Just try it out! http://clonekeenplus.sourceforge.net/
Back to top
View user's profile Send private message Send e-mail Visit poster's website MSN Messenger
Galaxieretter
Arachnut


Joined: 01 Nov 2007
Posts: 892
Location: Lancaster PA

PostPosted: Fri Jun 05, 2009 0:49    Post subject: Reply with quote

Okay I've been kind of staying out of these topics for a while... but I want to say this...

Having a 1024 x 768 pixel smoother is nice, especially with the higher resolutions.
But I would rather have the sprites be at the same pixel height and size and simply SHOW
more of the game than is visible with the original 320x200.
For example at 640x400, it would show twice as much of the screen as in the original game.
You know what I'm saying?

Would this be possible to implement in future releases?
Back to top
View user's profile Send private message Visit poster's website
gerstrong
Vorticon Elite


Joined: 31 Dec 2008
Posts: 744
Location: Bochum - Germany

PostPosted: Fri Jun 05, 2009 6:11    Post subject: Reply with quote

Quote:

Having a 1024 x 768 pixel smoother is nice, especially with the higher resolutions.
But I would rather have the sprites be at the same pixel height and size and simply SHOW
more of the game than is visible with the original 320x200.
For example at 640x400, it would show twice as much of the screen as in the original game.
You know what I'm saying?


Sorry, I don't understand what you really mean. Do you want to have the possibility in choosing 320x200 and 640x400? Or do you want to disable the smooth filtering.

I'm planing to change the resolution system. I want to support all resolutions that your video-card can support. There is a function in SDL which allows that. I'm also planning to implement screen ratio.

However, if you only want to disable the filtering but reserve the resolution and you have OpenGL enabled. Just go again into the video config, and you will see OGL Filter : Linear. Just change it to Nearest and the other scaleX, change it to "No Scale"

That will give you the original resolution transformed into your given resolution.

Furthermore, If you disable OpenGL and use "No scale", it won't scale the image neither.

Hope, I was able to answer your question.
Back to top
View user's profile Send private message Send e-mail Visit poster's website MSN Messenger
Commander Spleen
Lord of the Foobs


Joined: 31 Oct 2007
Posts: 2056
Location: Border Village

PostPosted: Fri Jun 05, 2009 6:50    Post subject: Reply with quote

What he's asking for is to use the extra graphical space to display more of the level instead of just stretching the output to a new resolution. Like what Jazz Jackrabbit 2 did.

I'm not so sure I'd use it, but it wouldn't hurt to have it as an option.
_________________
THIS POST IS IRREFUTABLE FACT
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address MSN Messenger
gerstrong
Vorticon Elite


Joined: 31 Dec 2008
Posts: 744
Location: Bochum - Germany

PostPosted: Fri Jun 05, 2009 7:13    Post subject: Reply with quote

That's a good idea. I'll add it to my wishlist tracker.

I have tested CKP on another machine with ATI Radeon. I'm surprised, because nothing is shown at all.

So, I'm sorry for those, who have trouble getting it run with OpenGL. You will have to stick back with Software Rendering, while I seek for the different causes, which provoke those problems and resolve them.
Back to top
View user's profile Send private message Send e-mail Visit poster's website MSN Messenger
gerstrong
Vorticon Elite


Joined: 31 Dec 2008
Posts: 744
Location: Bochum - Germany

PostPosted: Sun Jun 07, 2009 12:03    Post subject: Reply with quote

The new version is have optimized OGL Routines. Check it out and tell me. However I'm still working on it!
Back to top
View user's profile Send private message Send e-mail Visit poster's website MSN Messenger
gerstrong
Vorticon Elite


Joined: 31 Dec 2008
Posts: 744
Location: Bochum - Germany

PostPosted: Mon Jun 15, 2009 9:47    Post subject: Reply with quote

Hello Guys,

I have been thinking about the OpenGL effects, and I came to the decision to concentrate more on the development of other features. I'm not going to implement special OGL effects for now. Sorry for those bad news. They would give a nice kick to the game, but I'm not good at OGL, and I would take much more time. Besides that, it isn't that important. Maybe someone else wants to help with this. Patches are always welcome.

Commander Genius 0.3 is the next version and I want it stable and nice. Only OGL for acceleration will be used and only for those with NPOT-Textures support,

I will be working more on remaining bugs and missing features like 2-Player Controls. 0.3 should give what it promises.

@Ceilick: I have fixed the pogo-problem. Until 0.3 this should be like in the original game. I'll be sending some pre-versions, but only a few. Wink 0.3 is coming soon!
Back to top
View user's profile Send private message Send e-mail Visit poster's website MSN Messenger
DaVince
lazy/busy Keener


Joined: 01 Nov 2007
Posts: 1411
Location: Amsterdam, Netherlands

PostPosted: Mon Jun 15, 2009 12:40    Post subject: Reply with quote

OpenGL mode doesn't work for me; I just get a white screen. I emailed the logfile+description to you.
_________________
Hi! Happy Happy Happy

My Website. (Games, music, code, random stuff.)
Back to top
View user's profile Send private message Visit poster's website AIM Address MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    Public Commander Keen Forum Forum Index -> Commander Genius All times are GMT
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group