Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - gumby

Pages: [1] 2 3 ... 61
Link sent, thanks.

I'm shooting for a release on Dec 22nd at the latest.  Still have a little more to do before that, most notably more sounds in-game, but nothing that should impact game play.

Glad you liked it  ;)

A couple of more bugs fixed, new version ready for testing.

My family pointed out that the map is broken in the demo (un-exitable).  Ugh.

Ready for testing.  Anyone who is interested, PM me and I'll shoot over a download link.

Very close to being ready for testing, just doing cleanup at this point.  By tomorrow or worst case by next weekend.

This isn't exactly what I'm looking for unless I'm missing something. 

The first part of the the problem I'm trying to solve is to be able to arbitrarily scale a set views that are all the same initial size in the resource (say 320x200) to be relatively correct between each other. The second part is to take these relatively correct views and display them at different scales/sizes in different rooms. 

It's not so much a matter of the vanishing point in the room I don't think (but I could easily be wrong).

Moving counting is done.  Inventory item scaling is 'sort of' done, I still need to review/correct all the item/room scales.

I think SCI can do that out of the box if I understand you correctly, I'd have to try it out though...

If you get time to try (or point me in the right direction) that would be great.

Yes, that sure seems like the gist of it.

I ran into a need to have a view displayed at different scales based on the room it was displayed in.  Making things more difficult, it wasn't just one view, I needed logic for N views.  No way I was going to make 20+ different versions of the same view cel for all my views to accommodate all the different scales that I needed.

I started by creating views that were 'full size', meaning either 320 on the x-axis or 190 on the y.  Then I assigned relative 'scale values' or 'sizes' between them so they would sized appropriately when displayed with any other views.  For example:

Code: [Select]
(define SWORD_SCALE 80) 
(define LAMP_SCALE 65)              ; the lamp is 80% the size of the sword
(define CLOVE_OF_GARLIC_SCALE 5)    ; the clove of garlic is 6% the size of the sword

Then determine what your room scale value should be, 1 being a 'zoomed in' room and larger values get you 'further away' from them, effectively making them scaled down.

I added this procedure in the script:

Code: [Select]
;;;  Calculates what the scale should be based on the relative room scale (current room) and relative view scale
;;;    viewScale - a relative scaling value between ~5 (smallest) to ~100 (largest).
;;;    roomScale - value between 1 ('closest' or 'largest views') to ~50  ('furthest' or 'smallest views')
(procedure (calcRelativeScale view loop cel viewScale roomScale &tmp width height dim tmpScale)
   (= width  (CelWide view loop cel))
   (= height (CelHigh view loop cel))
   (if (> width height)
      (= dim width)
      (= dim height)

   (= tmpScale (/ (/ (* dim viewScale) 100) roomScale))
   (if (< tmpScale 3)
      (= tmpScale 3)    ; smallest possible scale with full-screen views
   (if (> tmpScale 100) 
      (= tmpScale 100) ; full size
   (return tmpScale)

Then prior to initing your view, calculate the scale by passing in the view, loop, cel and your viewScale and roomScale.  Just to be safe, make sure that the computed value is sane.

Code: [Select]
   (= view 10)   ; the sword view
   (= loop 4)
   (= cel 0)
   (= viewScale SWORD_SCALE)
   (= roomScale 50)    ;  I actually added a new property to the Room object and set the scales for the rooms there

   (= tmpScale (calcRelativeScale view loop cel viewScale roomScale))

   ; don't attempt to scale if we have no scale value defined
   (if (> tmpScale 0)   
      (myView init: show: setScale: Scaler tmpScale tmpScale)
      (myView init: show:) 

The scaled views that I generated from a 'full size' seemed pretty good at any size but this code could be improved by having more than just one view to choose from.  We could make a 'half-size' view with max dimensions of 160x85 and perhaps another 'quarter-size' one.  Compute the scales against all 3 views and choose the one that has a resulting scale nearest to 100 - this may help with any visual degradation when the scale size gets too small.

I've attached a screenshot of 3 different views, scaled at 5 different 'room sizes' using this process:

Thanks guys.  I'll update this thread as progress is made and let you know when I start getting close.

Thanks, appreciate it.  Not quite ready for testing yet, possibly by the end of next weekend, but more likely mid December.

Here's what's outstanding:
- Inventory object interactions (V_COMBINE)
- Sound effects
- Move (turn) counting
- Inventory item scaling (consistency between rooms & between items)

What's done (enough for this 'mini-game' release):
- Pics
- Views
- Intro music
- Instructions/Credits/Tips/Hints
- On-screen map
- Compass rose room nav (need feedback on this)
- Iconbar/Inventory screen
- Inventory Item drop/take functionality
- Scoring
- Nested inventory item functionality ('containers') - including 'zoomed-in' room versions.

I'm sure I've missed some stuff, but this will help keep me on-track/accountable to getting this out.

Aiming for a testable release at the end of the year.  It's a fully 'fleshed out' game but limited to only the first 19 rooms.  I could definitely use some help with playtesting, anyone interested?

SCI Syntax Help / Scaler error
« on: November 11, 2017, 10:16:51 AM »
I'm having a problem using the scaler.  When I call it with a view that has an instance explicitly declared in room (Egg) it works just fine, but when I call it on a view I create 'on-the-fly', the scaler throws an error of "<View setScale:> y value less than vanishingY".  My best guess is that I'm improperly creating the on-the-fly view, but I don't know how else to do it.

Code: [Select]
(method (init)
     (super init:)

     (Egg         view:24 loop:4 cel:0 x:100 y:100 init: setScale: Scaler 50 50)
     ((View new:) view:24 loop:4 cel:0 x:100 y:150 init: setScale: Scaler 50 50)

(instance Egg of Prop)

EDIT: Deferring the scaling doesn't seem to make a difference either.  The 'egg' instance works just fine, the dummy fails in the same way as the code above.
Code: [Select]
        (Egg view:24 loop:4 cel:0 x:100 y:100 init: )
        (Egg setScale: Scaler 50 50)
        (= dummy ((View new:) view:24 loop:4 cel:0 x:100 y:150 init:))
        (dummy setScale: Scaler 50 50)

EDIT2: I figured it out.  Shouldn't be using the 'View' class, should be using the 'Prop' class.  Once I changed the code to new-up a Prop it worked fine, which made perfect sense once I discovered the scaler property associated to Prop.  :-[

Pages: [1] 2 3 ... 61

SMF 2.0.11 | SMF © 2015, Simple Machines
Simple Audio Video Embedder

Page created in 0.176 seconds with 20 queries.