One Hour One Life Forums

a multiplayer game of parenting and civilization building

You are not logged in.

#1 2019-04-24 18:11:06

jasonrohrer
Administrator
Registered: 2017-02-13
Posts: 4,805

Craptastic 3D mod for OHOL

Video demo uploading now...

Ah, here's the video:

https://www.youtube.com/watch?v=4AASW8nM4Yk

Based on this commit:
commit 1b070cba5b8452156bcfd53c4c0996e37569dc3e

Here's the patch:

diff --git a/gameSource/LivingLifePage.cpp b/gameSource/LivingLifePage.cpp
index 2afb3b1..ac40c47 100644
--- a/gameSource/LivingLifePage.cpp
+++ b/gameSource/LivingLifePage.cpp
@@ -79,6 +79,7 @@ static char shouldMoveCamera = true;
 
 extern double viewWidth;
 extern double viewHeight;
+extern double visibleViewWidth;
 
 extern int screenW, screenH;
 
@@ -4648,8 +4649,15 @@ void LivingLifePage::draw( doublePair inViewCenter,
 
     memset( mMapCellDrawnFlags, false, numCells );
 
+    setDrawColor( 0.5, 0.5, 0.75, 1 );
+    drawSquare( lastScreenViewCenter, 2000 );
+    
+    setDrawColor( 0.0, 0.5, 0.0, 1 );
+    drawRect( lastScreenViewCenter.x - 800, lastScreenViewCenter.y - 800,
+              lastScreenViewCenter.x + 800, lastScreenViewCenter.y + 270 );
+    
jasonrohrer2@latitude:~/checkout/OneLife/gameSource$ cat oneLifeTrash3D.patch 
diff --git a/gameSource/LivingLifePage.cpp b/gameSource/LivingLifePage.cpp
index 2afb3b1..ac40c47 100644
--- a/gameSource/LivingLifePage.cpp
+++ b/gameSource/LivingLifePage.cpp
@@ -79,6 +79,7 @@ static char shouldMoveCamera = true;
 
 extern double viewWidth;
 extern double viewHeight;
+extern double visibleViewWidth;
 
 extern int screenW, screenH;
 
@@ -4648,8 +4649,15 @@ void LivingLifePage::draw( doublePair inViewCenter,
 
     memset( mMapCellDrawnFlags, false, numCells );
 
+    setDrawColor( 0.5, 0.5, 0.75, 1 );
+    drawSquare( lastScreenViewCenter, 2000 );
+    
+    setDrawColor( 0.0, 0.5, 0.0, 1 );
+    drawRect( lastScreenViewCenter.x - 800, lastScreenViewCenter.y - 800,
+              lastScreenViewCenter.x + 800, lastScreenViewCenter.y + 270 );
+    
     // draw underlying ground biomes
-    for( int y=yEndFloor; y>=yStartFloor; y-- ) {
+    if( false ) for( int y=yEndFloor; y>=yStartFloor; y-- ) {
 
         int screenY = CELL_D * ( y + mMapOffsetY - mMapD / 2 );
 
@@ -4844,6 +4852,16 @@ void LivingLifePage::draw( doublePair inViewCenter,
     // draw floors on top of biome
     for( int y=yEnd; y>=yStart; y-- ) {
         
+        double smoothGridCenterY = 
+            lastScreenViewCenter.y / CELL_D - mMapOffsetY + mMapD/2;
+
+        double viewScale = (y - smoothGridCenterY + 4.0) / 4.0;
+
+        setLetterbox( viewScale * visibleViewWidth, viewScale * viewHeight );
+
+        setViewSize( viewWidth * viewScale );
+
+
         int worldY = y + mMapOffsetY - mMapD / 2;
 
         int screenY = CELL_D * worldY;        
@@ -5013,7 +5031,7 @@ void LivingLifePage::draw( doublePair inViewCenter,
     toggleAdditiveTextureColoring( true );
     setDrawColor( multAmount, multAmount, multAmount, 1 );
     
-    for( int y=-1; y<=1; y++ ) {
+    if( false ) for( int y=-1; y<=1; y++ ) {
 
         doublePair pos = groundCenterPos;
 
@@ -5056,7 +5074,7 @@ void LivingLifePage::draw( doublePair inViewCenter,
     //toggleAdditiveTextureColoring( true );
     setDrawColor( 1, 1, 1, addAmount );
     
-    for( int y=-1; y<=1; y++ ) {
+    if( false ) for( int y=-1; y<=1; y++ ) {
 
         doublePair pos = groundCenterPos;
         
@@ -5500,6 +5518,15 @@ void LivingLifePage::draw( doublePair inViewCenter,
 
         int screenY = CELL_D * worldY;
         
+        double smoothGridCenterY = 
+            lastScreenViewCenter.y / CELL_D - mMapOffsetY + mMapD/2;
+
+        double viewScale = (y - smoothGridCenterY + 4.0) / 4.0;
+
+        setLetterbox( viewScale * visibleViewWidth, viewScale * viewHeight );
+
+        setViewSize( viewWidth * viewScale );
+        
 
         // draw marked objects behind everything else, including players
         
@@ -5791,6 +5818,15 @@ void LivingLifePage::draw( doublePair inViewCenter,
             if( drawRec.person ) {
                 LiveObject *o = drawRec.personO;
                 
+                double viewScalePerson = 
+                    ( o->currentPos.y - lastScreenViewCenter.y / CELL_D 
+                      + 4.0 ) / 4.0;;
+                
+                setLetterbox( viewScalePerson * visibleViewWidth, 
+                              viewScalePerson * viewHeight );
+                
+                setViewSize( viewWidth * viewScalePerson );
+                
                 ObjectAnimPack heldPack =
                     drawLiveObject( o, &speakers, &speakersPos );
                 
@@ -5836,6 +5872,10 @@ void LivingLifePage::draw( doublePair inViewCenter,
                         heldToDrawOnTop.push_back( heldPack );
                         }
                     }
+                setLetterbox( viewScale * visibleViewWidth, 
+                              viewScale * viewHeight );
+
+                setViewSize( viewWidth * viewScale );
                 }
             else if( drawRec.extraMovingObj ) {
                 ExtraMapObject *mO = mMapExtraMovingObjects.getElement(
@@ -6020,7 +6060,9 @@ void LivingLifePage::draw( doublePair inViewCenter,
                 }
             }
         } // end loop over rows on screen
-    
+    setLetterbox( visibleViewWidth, viewHeight );
+    setViewSize( viewWidth );
+            
 
     // finally, draw any highlighted our-placements
     if( mCurMouseOverID > 0 && ! mCurMouseOverSelf && mCurMouseOverBehind ) {
@@ -6061,6 +6103,14 @@ void LivingLifePage::draw( doublePair inViewCenter,
         
         doublePair pos = speakersPos.getElementDirect( i );
         
+        double viewScaleSpeech = 
+            ( pos.y / CELL_D - lastScreenViewCenter.y / CELL_D 
+              + 4.0 ) / 4.0;;
+                
+        setLetterbox( viewScaleSpeech * visibleViewWidth, 
+                      viewScaleSpeech * viewHeight );
+                
+        setViewSize( viewWidth * viewScaleSpeech );
         
         doublePair speechPos = pos;
 
@@ -6106,7 +6156,8 @@ void LivingLifePage::draw( doublePair inViewCenter,
                                    o->speechFade, widthLimit,
                                    o );
         }
-
+    setLetterbox( visibleViewWidth, viewHeight );
+    setViewSize( viewWidth );
 
 
     for( int i=0; i<locationSpeech.size(); i++ ) {

Making a non-crap version of this wouldn't be too much harder.  Floors and biome ground texture are the non-trivial part.

Offline

#2 2019-04-24 18:25:08

Amon
Member
From: Under your bed
Registered: 2019-02-17
Posts: 781

Re: Craptastic 3D mod for OHOL

I can't wait for the video!
How come you did decide to pursue this?


My favourite all time lives are Unity Dawn, who was married to Sachin Gedeon.
Art!!

PIES 2.0 <- Pie diversification mod

Offline

#3 2019-04-24 18:29:54

jasonrohrer
Administrator
Registered: 2017-02-13
Posts: 4,805

Re: Craptastic 3D mod for OHOL

Well, I was thinking that it would be funny if the photos produced by the camera had a perspective effect in them.  But floors/ground are are much harder to make nice-looking with quick hacks.

The 3D experiment was interesting enough to walk around in that I thought I'd at least share the zany result.

Also, it goes to show how closely artwork and design are wedded.  The ponds and ice holes in this version look really weird... like they're "standing up" above the ground.  It's impossible to represent such things with billboards (though it looks fine in the 2D version).  A more extreme example is floors.

Offline

#4 2019-04-24 18:35:19

Amon
Member
From: Under your bed
Registered: 2019-02-17
Posts: 781

Re: Craptastic 3D mod for OHOL

Ooooh! So it all plays in, was the photo made using this or an altered method?

I mean I know I sometines do projects productive or not just for the kicks!
Ponds and floor would do better as floor tile overlays maybe, but definitely, i mean. I'll probably like it for the novelty.
Bilboard items like in daggerfall and wolfenstein 3D why not smile


My favourite all time lives are Unity Dawn, who was married to Sachin Gedeon.
Art!!

PIES 2.0 <- Pie diversification mod

Offline

#5 2019-04-24 19:07:12

jasonrohrer
Administrator
Registered: 2017-02-13
Posts: 4,805

Re: Craptastic 3D mod for OHOL

Offline

#6 2019-04-24 19:17:53

Amon
Member
From: Under your bed
Registered: 2019-02-17
Posts: 781

Re: Craptastic 3D mod for OHOL

I call it a sucess.
Looks very fun and actually good if flooring n floor were better.
Otherwise the ponds don't look toooo bad?


My favourite all time lives are Unity Dawn, who was married to Sachin Gedeon.
Art!!

PIES 2.0 <- Pie diversification mod

Offline

#7 2019-04-24 20:03:27

thundersen
Member
Registered: 2018-12-02
Posts: 92

Re: Craptastic 3D mod for OHOL

1. Nice work!
2. I was your first mother in that video and you were our last girl. We died out. /angry
3. Sorry for calling you an idiot kid.

Offline

#8 2019-04-24 20:15:26

MultiLife
Member
Registered: 2018-07-24
Posts: 851

Re: Craptastic 3D mod for OHOL

That's actually very cool!
WE HAVE A SKY, I REPEAT, WE HAVE A SKY.


Notable lives (Male): Happy, Erwin Callister, Knight Peace, Roman Rodocker, Bon Doolittle, Terry Plant, Danger Winter, Crayton Ide, Tim Quint, Jebediah (Tarr), Awesome (Elliff), Rocky, Tim West
Notable lives (Female): Elisa Mango, Aaban Qin, Whitaker August, Lucrecia August, Poppy Worth, Kitana Spoon, Linda II, Eagan Hawk III, Darcy North, Rosealie (Quint), Jess Lucky, Lilith (Unkle)

Offline

#9 2019-04-24 21:48:44

Solbusaur
Member
Registered: 2018-07-15
Posts: 355

Re: Craptastic 3D mod for OHOL

Seems cool, but has its flaws. Obviously it's very hard to see danger coming from the south for one


Favourite Lives: MrDryer/ChirpChapley (Eva II) Town Nurse (Beth Storm) Ma's Best Li'l Helper (Law Autry), The Latex Lord (Kevin Youree), 60 Years a Blacksmith (Victoire Mom) The Egglord's Apprentice (Thomas II), Big Blood Brother (Dante), Horse racer on doomsday (Lilly Tana)
Profile Picture by MultiLife

Offline

#10 2019-04-24 22:16:36

Starknight_One
Member
Registered: 2018-10-15
Posts: 347

Re: Craptastic 3D mod for OHOL

Solbusaur wrote:

Seems cool, but has its flaws. Obviously it's very hard to see danger coming from the south for one

Rotatable viewpoint would be nice...

Offline

#11 2019-04-24 22:29:15

Grim_Arbiter
Member
Registered: 2018-12-30
Posts: 943

Re: Craptastic 3D mod for OHOL

Now do it on shrooms wink


--Grim
I'm flying high. But the worst is never first, and there's a person that'll set you straight. Cancelling the force within my brain. For flying high. The simulator has been disengaged.

Offline

#12 2019-04-24 22:29:39

Turnipseed
Member
Registered: 2018-04-05
Posts: 680

Re: Craptastic 3D mod for OHOL

Grim_Arbiter wrote:

Now do it on shrooms wink

Yes


Be kind, generous, and work together my potatoes.

Offline

#13 2019-04-24 23:43:08

Bob 101
Member
Registered: 2019-02-05
Posts: 313

Re: Craptastic 3D mod for OHOL

thundersen wrote:

1. Nice work!
2. I was your first mother in that video and you were our last girl. We died out. /angry
3. Sorry for calling you an idiot kid.


To be fair he was, Just running away like that. He did try to comeback but he went too far.


Jason in trailer: I may end up as your baby.

Jason in game: Runs away.

Offline

#14 2019-04-25 01:17:45

Averest
Member
Registered: 2018-12-04
Posts: 164

Re: Craptastic 3D mod for OHOL

Reminds me of Animal Crossing: Wild World. All it needs is a Raccoon Yakuza Boss making you work off your usurious loan. (please don't)

Offline

#15 2019-04-25 13:26:25

Eve Bear
Member
Registered: 2018-09-19
Posts: 5

Re: Craptastic 3D mod for OHOL

The photo post reminds me of this topic! Did you use the 3d thing to make the photo work or is this something you came across by accident trying to get the photo to work? big_smile  Either way, it's awesomely weird and weirdly awesome!


==============
My Eve name is normally Sugar & I love my babies, all of them!

Offline

#16 2019-04-25 13:41:29

DestinyCall
Member
Registered: 2018-12-08
Posts: 4,563

Re: Craptastic 3D mod for OHOL

Averest wrote:

Reminds me of Animal Crossing: Wild World. All it needs is a Raccoon Yakuza Boss making you work off your usurious loan. (please don't)


Too late.  It has already been added to OneTech.   Going live next update.    Good luck paying off your debt in time.

Offline

#17 2019-04-25 15:43:45

Averest
Member
Registered: 2018-12-04
Posts: 164

Re: Craptastic 3D mod for OHOL

DestinyCall wrote:
Averest wrote:

Reminds me of Animal Crossing: Wild World. All it needs is a Raccoon Yakuza Boss making you work off your usurious loan. (please don't)


Too late.  It has already been added to OneTech.   Going live next update.    Good luck paying off your debt in time.

Noooooooo!!!

Offline

Board footer

Powered by FluxBB