Page 5 of 9

Re: Converting CSBWin graphicengine to a OpenGL 3D engine

Posted: Thu Nov 04, 2010 7:55 am
by beowuuf
Grr, rushing off to work then mother down, so can't check this out for a while.

DSAs are Design Specified Actuators. They are state machines that can remember two large numbers, use other DSAs to increase that function, and operate a bewildering amount of code all activated by either a) one of twelve normal input messages DM uses, or b) use one of the internal information strings, like fight actions or monster movement/attack actions or death action or experience action, etc.

Commands range from item creation, item and party movement, inteerrupting most aspects of the above internal messages, scanning party states and inventory, etc.

Basically, it's turned into a programming language all in itself, and is best showcased by the insane things Conflux can do with the base engine!

Re: Converting CSBWin graphicengine to a OpenGL 3D engine

Posted: Thu Nov 04, 2010 10:09 am
by zoom
There is a little problem with looking down pits:
In csb, when you leave the starting room, you get to a closing and re-opening pit. Kind of fluctuates. if you look down, which looks kinda cool, you can look down there indifferently, although the pit should really close and reopen in the meantime.

Rasmus, did you really use csbwin version 10.00? I think there are couple of better versions around.
If loading the non-existant savegame slot number 3 after trying to load e.g. savegame 2, 4 or 1(there are no saves anywhere near) I get the error message:
fatal error: Fatal record line QUeue fail System error 13192
then: Error
System Error

Re: Converting CSBWin graphicengine to a OpenGL 3D engine

Posted: Thu Nov 04, 2010 10:27 am
by Jan
Wow, Rasmus, this look-down-the pit looks superb! Fantastic! On the other hand, this may change the gameplay - in CSB as well as in many custom dungeons, the point of some puzzles or places is that you can't see what's down there. This may spoil or ruin some of the 3D puzzles. Anyway, keep going, you're doing a fantastic job.

[YesMinister]This can be your Falkland Islands.
Spoiler
And you can be General Galtieri.
:wink: [/YesMinister] No, I'm joking, of course, as usually.

Re: Converting CSBWin graphicengine to a OpenGL 3D engine

Posted: Thu Nov 04, 2010 2:57 pm
by Gambit37
Very cool! I love that looking down the pit action, works really well :-) Some bugs there at the moment: you can still look down closed or invisible pits.

I tried a quick experiment of replacing the wall and floor graphics. A few problems here: the walls are rendered upside down and the palette is wrong. My walls were a sandy colour but came out blue! Also, the game wouldn't load if my images were in 8-bit, it only works with 24-bit images.

Now we just need GG to release his source code so you can port all this to RTC too! :-) :-D

Re: Converting CSBWin graphicengine to a OpenGL 3D engine

Posted: Fri Nov 05, 2010 3:09 am
by Rasmus
@bit:
I feelt that too when first trying it out. Got very exited because it really fellt so unnatural for DM but still natural to do.. This was a really good idea!
@Gambit:
The colors are fixed, I noticed that red and green colors where switched.. Nothing I have thought of before because wall, floor, and roof all where in grayscale, the upsidedown walls are also fixed.
And it is now posible to load bitmaps that have 16, 256 or true color. Which is good becuse it saves ALOT of diskspace..
The look thru closed and invisible pits haven't been fixed yet, but will be soon.
It would be really nice to get my hands on the RTC code.. It has so much posibilities :D
And thanks for pointing these bugs out so that I could fix them!
@Beo:
That sounds really interesting, I noticed that CSBBuild had some options with this, have to check it out :)
@Zoom:
The pitlooking haven't been fixed yet, but soon.. Thanks for pointing out that this version I used where having some bugs, I meant to upgrade it later but did it tonight instead. So now I have v11 instead, and I noticed that Conflux II worked on it. So this is really good :)
@Jan:
Thanks :) I know that it can interfear with the gameplay, right now I am only inserting the posibilities for it.. Later on I am going to insert it so that the dungeon designer himself will allow this or not. So the next months where things may get somewhat out of controll with this project, the posibilities I insert will be for the dungeon designers to use if like too or not..

New version:
- Updated CSBWIn to version 11.0.
- Bitmaps loaded can now be in 16 or 256 colors too.
- Walls, floors and roofs now have the right colors (red and green channels where switched before), and the walls are not longer upside down!

I hope you don't mind Zyx, but this version have the Conflux maps and graphics. Some graphics are still wrong, but the posibility to use dungeons and graphics as Conflux have are now proven..

Download: http://dmtribute.webs.com/Files/CSBWin3 ... 01105).zip

And screenshot:
Image

Re: Converting CSBWin graphicengine to a OpenGL 3D engine

Posted: Fri Nov 05, 2010 3:53 am
by Zyx
Rasmus wrote:I hope you don't mind Zyx, but this version have the Conflux maps and graphics. Some graphics are still wrong, but the posibility to use dungeons and graphics as Conflux have are now proven..
YEEEEEEHAAA... erm, I mean, I don't mind.

The link doesn't work.

Re: Converting CSBWin graphicengine to a OpenGL 3D engine

Posted: Fri Nov 05, 2010 4:09 am
by Rasmus
Zyx wrote:
Rasmus wrote:I hope you don't mind Zyx, but this version have the Conflux maps and graphics. Some graphics are still wrong, but the posibility to use dungeons and graphics as Conflux have are now proven..
YEEEEEEHAAA... erm, I mean, I don't mind.

The link doesn't work.
Good to hear :)
Now the link is working..

Re: Converting CSBWin graphicengine to a OpenGL 3D engine

Posted: Fri Nov 05, 2010 4:32 am
by Bit
Gambit37 wrote:Now we just need GG to release his source code so you can port all this to RTC too! :-) :-D
I really do hope that there is an easy solution for plugging it into DSB. I don't want Sophia to be upside down, but it would be a big loss if that wouldn't be done too in the end. But first let Rasmus complete the current one now. We also don't know how much his studies will leave time for him - and those should have priority one.

Re: Converting CSBWin graphicengine to a OpenGL 3D engine

Posted: Fri Nov 05, 2010 5:04 am
by Gambit37
I just had a quick test of the new version and the colour channels are still wrong: my yellow walls are displaying in blue/green.

I noticed something funny, too. If you look down a pit and then jump down it and die, when you restart the saved game your party are looking down at the floor :-)

Re: Converting CSBWin graphicengine to a OpenGL 3D engine

Posted: Fri Nov 05, 2010 6:20 am
by Rasmus
Hehe, I got the colors right when using 16 or 256 colors bitmap, but forgot to change it when using true colors :?
Here is something I thru together in a couple om minutes by stealing graphics from dm2..
Image

But if you test it with 256 color bitmaps it should work for now anyway..

@Bit:
I have checked out DSB editor, and I know how powerful it is. The thing is that it would have been alot easier for me doing this with DSB than with CSBWin, and the results would get alot better too.. But as I personally can't change anything inside DSB I had to do it with CSBWin.. I will release the sourcecode soon, and if sophia would like to give it a shot translating the c++ code into DSB I would gladly help. Just as it didn't need that much changes in CSBWin, I don't think it would need that much changes in DSB either..

It can sometimes feel alittle bit unfair that because I have some 3D programming knowledge can go right in and alter some work and get credit for it, when I know that the big accomplishment is in creating all the code that isn't visible. I would never be able to port CSB from atari to PC. Neither would I be able to create gameengines as complex as RTC and DSB, at least not without spending alot more time than Sophia, Paul or George has..
Anyway, I will release the sourcecode for this with the next release, I just want the extra graphics in Conflux to work in the engine first.. Then I would gladly help with porting it to any other of the DM clones if there are interest.. But I will still continue on this project because this is the only DM sourcecode I have to work with for now..

And bit, you don't have to worry about my studies ;) My teacher is still learning out in Java language how to get a image bounce around inside a window. But next year we will get a little more hardcore I hope, and with this alittle bit more studies for me..

Re: Converting CSBWin graphicengine to a OpenGL 3D engine

Posted: Fri Nov 05, 2010 10:13 am
by beowuuf
Conflux: O.O
DM2 walls: O.O

Curse you entertaining parents, curse you!

Re: Converting CSBWin graphicengine to a OpenGL 3D engine

Posted: Fri Nov 05, 2010 10:53 am
by Jan
Rasmus, I can just repeat that this is incredibly inspired! You seem to be spewing the code like a volcano! But - do you ever sleep? :)

Re: Converting CSBWin graphicengine to a OpenGL 3D engine

Posted: Fri Nov 05, 2010 3:01 pm
by Rasmus
@Jan: As I am a night worker, I almost never sleep at night, instead I sleep between 7 am and 2 pm at the day..
Those days I am free I hang out with my friends at the evenings, but when night comes there is accually nothing else to do for me than study, watch movies or do some programming..
I really enjoy working and living like this because about 50% of the days I have a full schedual, and the other 50 % I am totally free :)

But as I said before, there is accually not that much work behind this because til now I have only upgraded the visual posibilities behind all the hard work other has put down..

@Beo: I just say, curse the real life for getting in everybodys way :D

Re: Converting CSBWin graphicengine to a OpenGL 3D engine

Posted: Fri Nov 05, 2010 4:45 pm
by Adamo
256- colour bitmaps in CSBwin? Marvelous! How did you do it, Ras??
Is there a way to update 16- colour bitmaps to 256 colour ones in Conflux? No doubt this game deserves it..

Re: Converting CSBWin graphicengine to a OpenGL 3D engine

Posted: Fri Nov 05, 2010 6:29 pm
by Rasmus
As I don't use the CSBWin:s graphicengine anymore, most things are posible ;)
There is no way to upgrade conflux bitmaps to more than 16 colors yet.. First I have to create some sort of editor that tells CSBWin what bitmaps to replace for higher color bitmaps. This is my next task..

Re: Converting CSBWin graphicengine to a OpenGL 3D engine

Posted: Fri Nov 05, 2010 6:37 pm
by Zyx
Which are the new keys in the demo?

Re: Converting CSBWin graphicengine to a OpenGL 3D engine

Posted: Fri Nov 05, 2010 6:43 pm
by Rasmus
It is the same keys as before. If not, check so the config file are included. Otherwise just copy the file from any other CSBWin.

Re: Converting CSBWin graphicengine to a OpenGL 3D engine

Posted: Fri Nov 05, 2010 6:49 pm
by Rasmus
I must add that I noticed something fun when extracting the DM2 graphics.. These wallsets doesn't use the same 160x111 resolution as the original DM, they go outside the bounderies to make the walls look less "squarish", this gave me an idea. What if I did the same? Then it may increase the visuals and make it look more realistic :) Have to give it a go tomorrow!!

Re: Converting CSBWin graphicengine to a OpenGL 3D engine

Posted: Fri Nov 05, 2010 6:57 pm
by beowuuf
Had a quick chance to play with the pit one - I was looking for the new 'look down' key until I realised you click on the pit!

Re: Converting CSBWin graphicengine to a OpenGL 3D engine

Posted: Fri Nov 05, 2010 7:01 pm
by Rasmus
Yeah, sorry for not saying that.. At first I was wondering what key I should use.. But then it feelt so natural to just be able to click on the pit to look down. I will do the same with the roofpit later..
About the looking 45 degrees left and right I would like something simular, but don't really know how I would make this work without using extra keys.. hmmm

Re: Converting CSBWin graphicengine to a OpenGL 3D engine

Posted: Fri Nov 05, 2010 9:14 pm
by Sphenx
Rasmus wrote:I must add that I noticed something fun when extracting the DM2 graphics.. These wallsets doesn't use the same 160x111 resolution as the original DM, they go outside the bounderies to make the walls look less "squarish", this gave me an idea. What if I did the same? Then it may increase the visuals and make it look more realistic :) Have to give it a go tomorrow!!
Yes, because wall tiles can overlay each other. This is more true for cave walls and thicket walls to give them more relief.

Why not even use PC DM2 graphics for items and such? There are already in 256 colors!

Re: Converting CSBWin graphicengine to a OpenGL 3D engine

Posted: Fri Nov 05, 2010 9:39 pm
by Rasmus
That could be my primary task, recreating DM2 graphics and animations piece by piece until CSBWin with OpenGL looks like DM2 :)

Re: Converting CSBWin graphicengine to a OpenGL 3D engine

Posted: Sat Nov 06, 2010 5:13 am
by Bit
Nah - the common statement here is, that DM2 couldn't reach the atmosphere of DM, even with more colors.
Adding the OpenGL features to CSBwin like you did - that is indeed a very nice feature.
Adding that to the original DM2 would not be worth the effort.
I just hope that we (and with this I mean all the other ones being pretty active again) can finally present a lot of gifts that snowwhite drops the apple ;)

Re: Converting CSBWin graphicengine to a OpenGL 3D engine

Posted: Sat Nov 06, 2010 5:26 am
by Rasmus
Maybe I will go in another direction..
You got mail bit ;)

Re: Converting CSBWin graphicengine to a OpenGL 3D engine

Posted: Sat Nov 06, 2010 7:48 am
by Sphenx
Anyway, giving the 3D look for DM2 might be more difficult because it is not just about 'flat' walls. In the case of DM walls it works ok but with cave or thicket walls (roof and floor), applying a flat texture is actually worse than original 2D bitmaps. I would go on with 3D wall models to solve the problem. But I'm not giving more ideas to Rasmus :wink: let him just finish CSBWin3D for DM/CSB.

Re: Converting CSBWin graphicengine to a OpenGL 3D engine

Posted: Sat Nov 06, 2010 11:42 am
by Bit
Or bitmaps with heightfields - not each angle must be 90° ;)

Re: Converting CSBWin graphicengine to a OpenGL 3D engine

Posted: Sun Nov 07, 2010 7:18 pm
by Rasmus
@Bit: As I mentioned before.. This would make it posible to create hills and mountains inside the game :)
@Sphenx: Accually, it doesn't matter how "bumpy" the DM2 graphic is.. What I use is a fake parallax mapping..
I have an extra image for the walls at the sides, one that shows the wall in a side perspective!
By doing this I get a fake bumpmapping, or even better parallaxmapping!

You can compare the images below:

Walls without side image:
Image

Walls with side image:
Image

Re: Converting CSBWin graphicengine to a OpenGL 3D engine

Posted: Mon Nov 08, 2010 12:03 am
by Bit
That looks pretty okay I'd say.

Re: Converting CSBWin graphicengine to a OpenGL 3D engine

Posted: Mon Nov 08, 2010 2:59 am
by Rasmus
Sometimes it is both easier, better and faster to cheat with this sort of things, now when I have 90 degrees turns, it is much better just skipping all 3d modeling and extra 3d effects :)

Re: Converting CSBWin graphicengine to a OpenGL 3D engine

Posted: Mon Nov 08, 2010 2:35 pm
by Sphenx
You make CSBWin go 3D then you fake it? :shock: :mrgreen:

I'm sorry Rasmus, but I don't really get the difference on the classic DM1 grey wall, because for me it is flat by design.
Could you make the same example with DM2 cave wall for example? Maybe I'll understand more the difference of this parallaxmapping.