Author Topic: Half Life 2: On-Calc  (Read 75814 times)

0 Members and 1 Guest are viewing this topic.

SirCmpwn

  • Guest
Re: Half Life 2: On-Calc
« Reply #195 on: April 13, 2010, 05:53:17 pm »
Thanks.  I'm going to take a look at the wall/floor collision as part of the other stuff that needs fixing.  Also, I probably will use text on the graph screen, but it shouldn't cause much of a slow down because it won't update the screen until I tell it to.

Offline meishe91

  • Super Ninja
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2946
  • Rating: +115/-11
    • View Profile
    • DeviantArt
Re: Half Life 2: On-Calc
« Reply #196 on: April 13, 2010, 05:59:34 pm »
Oh ok, cool.
Spoiler For Spoiler:



For the 51st time, that is not my card! (Magic Joke)

SirCmpwn

  • Guest
Re: Half Life 2: On-Calc
« Reply #197 on: April 19, 2010, 05:01:21 pm »
Update

Sigh... this has not been a fun update.
*Updated to Axe 2.0, meaning I changed the contrast code from hex to Axe, and exported the pic.
*I have visited 4 seperate physics teachers for help in working out the collisions with no luck.  I am working on it though, its just very stressful and hard.

_player1537

  • Guest
Re: Half Life 2: On-Calc
« Reply #198 on: April 19, 2010, 09:41:19 pm »
how does it currently do collisons?  pxl-test?

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Half Life 2: On-Calc
« Reply #199 on: April 19, 2010, 11:35:27 pm »
Ouch sorry to hear about the issues you got :S, I hope you can get them fixed

Offline Builderboy

  • Physics Guru
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 5673
  • Rating: +613/-9
  • Would you kindly?
    • View Profile
Re: Half Life 2: On-Calc
« Reply #200 on: April 20, 2010, 02:02:33 am »
Yeah collision between an unspecified number of objects is a real pain, as well as handeling all the momentum, in adition to colliding with the tilemap.  Hope you can get it working!  What exactly are you having trouble with?

SirCmpwn

  • Guest
Re: Half Life 2: On-Calc
« Reply #201 on: April 20, 2010, 11:12:52 am »
Well, for collisions I do not use pixel test because of how limited it is.  Objects can interact with the enviornment, meaning the map, just fine.  However, they do not interact with each other very well.  As you can see in this screenshot:

The collisions work fine.  That is, until they hit a wall, in which case you can go through objects.  It is not easy, but I feel like I can make something work here soon.

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Half Life 2: On-Calc
« Reply #202 on: April 20, 2010, 01:05:54 pm »
Oh wow that looks awesome still, nice job so far. Hopefully you can fix the bugs soon. I wonder if you can make it so when pushing an object on another, the other starts moving but the one being pushed on it slows down (or almost stops if you stopped walking a bit earlier)?

SirCmpwn

  • Guest
Re: Half Life 2: On-Calc
« Reply #203 on: April 20, 2010, 01:08:39 pm »
I thought about that, but it would require another byte per object to store mass.  That would reduce the maximum number of objects.  Thoughts?

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Half Life 2: On-Calc
« Reply #204 on: April 20, 2010, 01:10:09 pm »
ooh ok, how many objects would there be available afterward?

SirCmpwn

  • Guest
Re: Half Life 2: On-Calc
« Reply #205 on: April 20, 2010, 01:11:47 pm »
26 objects at once.

Offline Quigibo

  • The Executioner
  • CoT Emeritus
  • LV11 Super Veteran (Next: 3000)
  • *
  • Posts: 2031
  • Rating: +1075/-24
  • I wish real life had a "Save" and "Load" button...
    • View Profile
Re: Half Life 2: On-Calc
« Reply #206 on: April 20, 2010, 01:18:17 pm »
You can compress the size by storing to the nibble of the byte rather than using a separate byte for each entry in the array.  16 distinguishable masses would be more than enough I'm sure, and the other nibble can maybe be the sprite number or some other quantity that has 16 unique states or fewer.  Same concept as the map compression, but with data.
« Last Edit: April 20, 2010, 01:20:34 pm by Quigibo »
___Axe_Parser___
Today the calculator, tomorrow the world!

SirCmpwn

  • Guest
Re: Half Life 2: On-Calc
« Reply #207 on: April 20, 2010, 01:19:29 pm »
Yeah, thats a good idea.  I also store the width and height of each object in a single byte, because who really needs a 255 pixel wide object?

Offline Quigibo

  • The Executioner
  • CoT Emeritus
  • LV11 Super Veteran (Next: 3000)
  • *
  • Posts: 2031
  • Rating: +1075/-24
  • I wish real life had a "Save" and "Load" button...
    • View Profile
Re: Half Life 2: On-Calc
« Reply #208 on: April 20, 2010, 01:24:35 pm »
Reminds me of when I was making Pyoro.  I fit the entire data structure for each fruit crammed into just 4 bytes, not a single bit was wasted.  Not only that, I actually reused different parts of the bytes to represent different types of data depending on the state of the object.

Spoiler For Spoiler:
Code: [Select]
;###### BYTE 1 ######
;0 >-- Set if exploding or score sprite
;0 \
;0  |
;0  |
;0  |- X value of sprite (unsigned)
;0  |
;0  |
;0 /
;###### BYTE 2 ######
;0 \
;0  |_ Sprite index
;0  |
;0 /
;0 >-- Reset if sprite is in fast mode     \
;0 \                                        |_ Score if exploding
;0  |- Vertical speed of sprite (unsigned)  |
;0 /                                       /
;###### BYTE 3 ######
;0 \                      \
;0  |- Sprite index timer  |
;0 /                       |
;0 >-- 0=animated 1=not    |_ Timer when exploding
;0 \                       |
;0  |_ Speed timer         |
;0  |                      |
;0 /                      /
;###### BYTE 4 ######
;0 \
;0  |
;0  |
;0  |_ Y value of sprite (unsigned)
;0  |
;0  |
;0  |
;0 /
___Axe_Parser___
Today the calculator, tomorrow the world!

SirCmpwn

  • Guest
Re: Half Life 2: On-Calc
« Reply #209 on: April 20, 2010, 01:28:50 pm »
Nice!
A full physics engine with 64-bit precision however, is a little more complex.  I will do my best to compress it.