UnderwareDESIGN

PlayBASIC => Show Case => Topic started by: Laskiapina on July 06, 2010, 02:10:22 AM

Title: Uplift - finished project
Post by: Laskiapina on July 06, 2010, 02:10:22 AM
I wanted to advertise this little project too :)
In this game you control this little white silhouette girl. You use mouse to help her get in places she can't reach without help.
I think this turned out fine. It doesn't have any sounds mainly because I didn't find any suitable ones at the moment.
I added a possibility to make your own levels too.

Homepage is the same: http://notyetnamedproject.webs.com/games.htm



You can download it from: http://dl.dropbox.com/u/7879998/Uplift.zip

Added a level editor!
Controls for level editor:
Right handed: Arrow keys and Z & X for drawing. Press Space to select block. Hold shift to move faster.
Left handed: WASD & O & P.

(http://underwaredesign.com/screens/PlayBasic/Forums/Laskiapina/upliftkuva.png)


Edit: attached screen shot for PB IDE news feed.
Title: Re: Uplift - finished project
Post by: monkeybot on July 07, 2010, 01:56:40 PM
hah thats brilliant,sounds simple as an idea but is rather like patting your stomach and rubbing your head!(or is it just me?)

Nice one. I like very much
Title: Re: Uplift - finished project
Post by: Laskiapina on July 07, 2010, 02:30:32 PM
Glad you liked it :)
Some people have had problems with the controls at first, but they usually get the hang of it :P
I still have a lot work with the code though. And maybe I'll do a few more levels.
Title: Re: Uplift - finished project
Post by: kevin on July 07, 2010, 02:47:57 PM

  Yeah, it's a clever idea, well done!

  Just be careful when using images for the level data though.   As the image depth will default to the screens depth.   So when running in a windowed mode, the screen will inherit the users desk top depth.  If this is an older machine, it's likely to be 16bit.   Which may (depending on how you're loading the image) cause problems when loading the map.
     

Title: Re: Uplift - finished project
Post by: Laskiapina on July 07, 2010, 04:23:02 PM
So if the source image is set to 16 bit and so is the program file can it still cause trouble?
Title: Re: Uplift - finished project
Post by: kevin on July 07, 2010, 05:33:16 PM
QuoteSo if the source image is set to 16 bit and so is the program file can it still cause trouble?

   When an image is loaded, it's automatically converted to the depth of the current PB screen mode.  If it's windowed screen mode, it'll inherit the depth from the users desk top.  So if they're urnning in 16bit, then PB will create a 16screen and all images /fonts etc will use the same pixel format/depth. 

    When we load any image, it's converted from it's stored (on disc) format to whatever  surface depth that PB is currently using.    This can mean pixels get truncated (like when loading  a 32bit image, into 16bit mode)  or zeroed bits are inserted  when loading a 16bit image when PB's in 32bit mode. 

    There's nothing really stopping the level maker from saving the level picture in 8bit, 12bit ,15bit,16bit... 24bit or 32bit in their favorite paint program.  I'd suggest the easier solution would be to only consider the top 5 bits of the R,G,B..  so When reading pixels from the surface, mask it read pixel with $f8f8f8  (Top 5bits RED, Top 5 bits GREEN and top 5bits of Blue)   This eliminates  the potential for such problems to pop up.

    Here's a demo of the problem and the solution (http://www.underwaredesign.com/forums/index.php?topic=3469.0)



 
Title: Re: Uplift - finished project
Post by: Laskiapina on August 02, 2011, 01:21:39 PM
Oh yes, I remembered right - the game reads the colors which it uses to recognize different blocks with POINT commands. They're in every level picture in the left top corner.
Would this still cause problems?
Title: Re: Uplift - finished project
Post by: kevin on August 02, 2011, 02:52:52 PM

   Point reads the image after it's loaded and converted to the default surface depth, so if the user saves a level image in some truncated format through their paint package and the level decoder is doing absolute pixel comparisons for the blocks (ie... if point(xpos,ypos)=$ff00ff then do stuff) , then it's entirely possible it'll fail for some people.  Masking the colours should  remove the potential for failure though. 



    constant Mask =$00f0f0f0
     For ylp=0 to height 
       For xlp=0 to width 
           ThisColour=point(xpos,ypos)  and Mask ;  Strip the low bits and keep the high bits R,G, & B
 
           if ThisColour = ($ffffff and Mask)
                   do something on white
           endif

           if ThisColour = ($ff00ff and Mask)
                   do something on pureple
           endif

   etc

       next
     next
   



   Although, using a text file is probably a better idea.

   
Title: Re: Uplift - finished project
Post by: Laskiapina on August 02, 2011, 02:59:53 PM
QuoteAlthough, using a text file is probably a better idea.
Yeah, that's what I'm planning on to next platformers.

What about custom levels (pics) would have an extra line on the top where players could draw their own color codes - game would read them? Would that work? For this kind of simple stuff.

Sorry if I've missed the point of your last post. To tell the truth I never learned to use masks. in anything.
Title: Re: Uplift - finished project
Post by: kevin on August 02, 2011, 05:43:01 PM

QuoteWhat about custom levels (pics) would have an extra line on the top where players could draw their own color codes - game would read them? Would that work? For this kind of simple stuff.

  It'll work, but the same potential problem exists.

Title: Re: Uplift - finished project
Post by: BlinkOk on August 02, 2011, 08:31:35 PM
that is one tricky game dude! well done!
Title: Re: Uplift - finished project
Post by: Laskiapina on August 03, 2011, 12:20:48 AM
BlinkOk: Thank you :)
I have been thinking about making Uplift 2 with easier controls and more creative levels. But I've also been thinking about lots of other projects :P
Title: Re: Uplift - finished project
Post by: kevin on August 03, 2011, 09:52:45 AM

even just adding a 'level editor' to the current version would add a degree of longevity to it.   
Title: Re: Uplift - finished project
Post by: Laskiapina on August 03, 2011, 11:01:43 AM
Quoteeven just adding a 'level editor' to the current version would add a degree of longevity to it.

Not a bad idea... We'll see.
Title: Re: Uplift - finished project
Post by: Laskiapina on August 04, 2011, 04:48:02 AM
Just finished the level editor... Tell me what you think.

Controls:
Right handed: Arrow keys and Z & X for drawing. Press Space to select block. Hold shift to move faster.
Left handed: WASD & O & P.
Title: Re: Uplift - finished project
Post by: Laskiapina on August 06, 2011, 05:54:01 AM
When you press Esc in the editor it saves the level you're working on as "lastedit.bmp" now. For accidents.
Title: Re: Uplift - finished project
Post by: medwayman on August 29, 2011, 06:45:21 AM
Great game Laskiapina! Took time to get the hang of it but was worth the effort.

Played fine up until level 17 where the lady would die when jumping onto the hand for the first time. This happened about 60-70% of the time and i was clear of the wall of skulls. Not a major problem as lives aren't an issue. I will try and reach level 20 later :)

Tanks for a fun game!
Title: Re: Uplift - finished project
Post by: Laskiapina on August 29, 2011, 08:10:16 AM
Medwayman: I'm glad you liked it!
I'm aware of that level 17 bug, but I've been too lazy to fix it :(
I'll fix that as soon as I can.
Title: Re: Uplift - finished project
Post by: Laskiapina on September 16, 2011, 03:35:32 AM
Darn. Can't seem to get the level 17 bug appear/happen... :(