Page 1 of 1

Lost Laby for Linux (Help for windows needed!)

Posted: Sun Mar 07, 2004 4:18 am
by Brujah
Hy fellow programmers,

I just uploaded the newest version of my game lost labyrinth to sourceforge. Its worth playing now. Have a look.

It includes sourcecode. So if somebody wants to help me with the windows version, you are welcome.
Its running basically, but we get a lot of small but nasty graphical errors.

Markus

Posted: Sun Mar 07, 2004 1:59 pm
by The_Pharao
nice work :)

i downloaded the source and compiled it under windows xp, and it runs fine! there was no need to change anything - great job here, Fred!
though the fonts are a bit "wicked" and not always fitting the places they should.

well, how do i increase the field of view of my character? :roll:

Posted: Sun Mar 07, 2004 2:20 pm
by Dare2
Heya Brujah,

Good stuff.

I had to slow the framerate (made it 20) so that I could see the screen, and also put a start/stop drawing around one piece of code (lines 43-44 in maennchen.pb).

Then it ran. :) Magic!

Slowing it did not seem spoil the game. As The_Pharao said, some offsets with fonts need tweeking, otherwise it is fine, for as far as I have gone so far.

Play on!

Posted: Sun Mar 07, 2004 2:58 pm
by Brujah
It seems that the fonts in windows work a bit different. The standard font seems to be larger.
So we have to know which os we are using and set the hight variable (which does not exist yet :-) ) to a fitting value. How do I know which OS we are using ? Is there a variable for that ?

And in windows I have to use drawingmode every time. Otherwise the font is not transparent.

Additional I have to surround every drawbox etc with a start/stopdrawing. Otherwise it crashes.
I fear there are a lot more of this little errors in there right at the moment.
Please keep on testing and report any bugs to me.

By the way, framerate is working only on windows right ?

Sight

Posted: Sun Mar 07, 2004 3:01 pm
by Brujah
To see more just press "I" to get into your inventoy.
Then light your torch.

Posted: Sun Mar 07, 2004 3:13 pm
by Dare2
Hi Brujah,

Maybe don't sweat the framerate thing too much, my monitor and card can't handle stuff running full-tilt, not even PB progs written for windows.

With checking for OS, only thing I can think of off-hand is to look for some windows or linux specific file, and if found take a punt that this means the OS is that OS. Eg, if autoexec.bat exists in root, then OS is windows. But I know zip about linux so I may be talking out of my hat. I don't even know if you can look for "C:\" in linux.

lol - see below by Pupil

The game is pretty neat, BTW.

Playing on - (tomorrow) :)

Posted: Sun Mar 07, 2004 3:13 pm
by Pupil
>How do I know which OS we are using ? Is there a variable for that ?

No not a variable, but a constant that is set by the compiler, check the page Compiler directives in the manual for more info.
PB manual wrote: The PureBasic compiler has several reserved constants which can be useful to the programmer:

#PB_Compiler_Date : Contains the current date, at the compile time, in the PureBasic date format (see Date).

#PB_Compiler_OS : This constant allows to determine on which OS the compiler is currently running. It can be one of the following value:
- #PB_OS_Windows : The compiler is running on Windows
- #PB_OS_Linux : The compiler is running on Linux
- #PB_OS_AmigaOS : The compiler is running on AmigaOS

Posted: Sun Mar 07, 2004 7:40 pm
by The_Pharao
for the OS thing use what pupil posted.

the fonts: try to make them a bitmap font, as described in various tutorials

Posted: Sun Mar 07, 2004 8:20 pm
by Shopro
wow! I really enjoyed roguelikes once, so I'll be looking forward to this game:)

Some problems:
In the character sprite selection screen, the mouse was really slow. I had to make a few mouse strokes just to select the guy I want.

Mouse flickerings here and there...

Other than that, I really like it.

I'll post again when I play some more

-Shopro

Mouse etc

Posted: Mon Mar 08, 2004 1:15 pm
by Brujah
Hy fellow programmers,

yes I know the mouse is not working perfectly. But its the same on linux. My routine is not very good yet, but thats because I very seldom use the mouse. Just for the Inventory nothing more.
I have to invest some time to make this part better.

When you move the mouse and move your character with the cursor keys the screen is flickering. Thats because I draw the screen new (with flipbuffers) everytime the character moves and everytime the mousepos changes. And when this happend at once we get this flickering effect...

I just had a look in the compiler directives. I think thats a good and easy solution.

I just have to include the following:

CompilerSelect #PB_Compiler_OS
CompilerCase #PB_OS_AmigaOS
; some Amiga specific code
CompilerCase #PB_OS_Linux
; some Linux specific code
CompilerEndSelect

Maybe I have some time later that day, then I work a bit on that.

And there is an error on windows with the flipbuffers I think. Has anybody tried casting a fireball or something like that? On my windows here (ME) all the sprites keep on the screen.

New Version 0.8.8

Posted: Wed Mar 10, 2004 7:12 pm
by Brujah
Hy fellow programmers,

a new version is out.
I worked a lot on the windows version, but its still not good enough to upload it.

I fixed the mouse flickering and included a routine that the character can be moved with the mouse.

The spells now llok okay on windows too.
But there are stilla lot of nasty graphical bugs left.

Please test it and let me know.

Markus

Posted: Wed Mar 10, 2004 8:21 pm
by Num3
Just a thing, why don't you use a bitmap font ?
Just load it with all the other images and use it to paste text on screen, it would solve the problem.

Posted: Wed Mar 10, 2004 8:40 pm
by Num3
-Bug-

I've found a combination of caracteristics that enables me to go on and on in the game :P, so i've been playing for a while, but i reached a level where the exit was enclosed with no possibility to reach it!

Posted: Thu Mar 11, 2004 2:12 pm
by Brujah
When you couldn't reach the exit, was there a river in this level ?
Or what was the reason you couldn't reach it ?

With which skills have you been immortal ?
And to which level did you play ? It gets harder and harder!

Markus