Lost Laby for Linux (Help for windows needed!)

Developed or developing a new product in PureBasic? Tell the world about it.
User avatar
Brujah
Enthusiast
Enthusiast
Posts: 237
Joined: Mon Nov 03, 2003 7:45 pm
Location: Germany
Contact:

Lost Laby for Linux (Help for windows needed!)

Post 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
The_Pharao
User
User
Posts: 57
Joined: Sun Jan 04, 2004 2:11 pm

Post 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:
Dare2
Moderator
Moderator
Posts: 3321
Joined: Sat Dec 27, 2003 3:55 am
Location: Great Southern Land

Post 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!
User avatar
Brujah
Enthusiast
Enthusiast
Posts: 237
Joined: Mon Nov 03, 2003 7:45 pm
Location: Germany
Contact:

Post 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 ?
User avatar
Brujah
Enthusiast
Enthusiast
Posts: 237
Joined: Mon Nov 03, 2003 7:45 pm
Location: Germany
Contact:

Sight

Post by Brujah »

To see more just press "I" to get into your inventoy.
Then light your torch.
Dare2
Moderator
Moderator
Posts: 3321
Joined: Sat Dec 27, 2003 3:55 am
Location: Great Southern Land

Post 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) :)
Last edited by Dare2 on Sun Mar 07, 2004 3:14 pm, edited 2 times in total.
Pupil
Enthusiast
Enthusiast
Posts: 715
Joined: Fri Apr 25, 2003 3:56 pm

Post 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
The_Pharao
User
User
Posts: 57
Joined: Sun Jan 04, 2004 2:11 pm

Post 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
Shopro
Enthusiast
Enthusiast
Posts: 148
Joined: Tue May 13, 2003 8:05 am

Post 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
User avatar
Brujah
Enthusiast
Enthusiast
Posts: 237
Joined: Mon Nov 03, 2003 7:45 pm
Location: Germany
Contact:

Mouse etc

Post 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.
User avatar
Brujah
Enthusiast
Enthusiast
Posts: 237
Joined: Mon Nov 03, 2003 7:45 pm
Location: Germany
Contact:

New Version 0.8.8

Post 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
Num3
PureBasic Expert
PureBasic Expert
Posts: 2812
Joined: Fri Apr 25, 2003 4:51 pm
Location: Portugal, Lisbon
Contact:

Post 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.
Num3
PureBasic Expert
PureBasic Expert
Posts: 2812
Joined: Fri Apr 25, 2003 4:51 pm
Location: Portugal, Lisbon
Contact:

Post 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!
User avatar
Brujah
Enthusiast
Enthusiast
Posts: 237
Joined: Mon Nov 03, 2003 7:45 pm
Location: Germany
Contact:

Post 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
Post Reply