Garry's Mod: My creations!

Status
Not open for further replies.
Level 21
Joined
Dec 9, 2007
Messages
3,096
:grin: Howdy, partners! :grin:

I want to show you some of my creations in Garry's Mod!
The most important of them is my PC, which is called VPC! (Vercas' Personal Computer) - Better than Billy's...

It (currently) features:
Features:Description
  • Console screen display of 30 rows and 18 collumns!
  • A couple of programs linked together trough the files viewer!
  • Programs organized in modules:
    • Files Viewer which features the following file types:
      • .txt
      • .mp3
      • .log
      • .mov
      • .exe
      • It has the following folders and subfolders:
        • C:
          • Program Files
            • Calculator
            • Media Player
            • Notepad
        • A: (for the GigaUSB data storage device)
        • LAN (for wireless data transfer trough 4 radios of 5 values each)
      • ///There may not be two folders with the same name on the system... :sad:
      • You navigate with the arrow keys in the following way:
        • Up select the line above
        • Down select the line below
        • Left go to previous directory
        • Right access directory or file
    • Notepad, which can save and open .txt files!
      • .txt files feature:
        • Unlimited length!
        • 30 characters-wide lines!
      • You may scroll trough the lines with the up and down arrow keys
    • Media player, to open .mp3 files and play them! (Those files are hl2 music)
    • Movie player, to open .mov files and play them!
      • .mov files are movies that feature:
        • Unlimited play time
        • 999 colors
        • 3 Frames per second
    • Calculator, which may do the following operations:
      • + (add)
      • - (substract)
      • * (multiply)
      • / (divide)
      • ^ (exponential)
      • % (modulo)
      • !!! It also saves every command in a .log file!
  • Processor power: Expression2 Ops limit
  • RAM: Unlimited
  • Memory: TableRAM
  • Performance-wise code arrangement
    • Anything happens in huge if's, well-organized by condition to avoid useless code running and lagging! (So it lags ONLY when spawned, because it needs to initialize a LOT of data!)
  • Full keyboard listening!
    • Can detect only one key at a time! :sad:
  • Display LED's for power and enter key press.
  • _-^More to come!
I've been working on this for a couple of weeks... Almost 3 months.
The E2 code is 1200 lines long.
When the power is off, it stays at 0-5 Ops, but I will probably reduce it to 0-2 Ops soon enough.
It takes most Ops on the LAN module, because every second it has to check a few conditions and process some arrays together with some wirelinks. It can get up to 170 Ops, but that's still not lagging. The frames will drop by 25% in worst case.
I will show you a sample of code from the LAN module:
(I use php tags just 'cause I like the highlight!)
PHP:
elseif ( OnWiFi ) ################ WIRELESS MODULE #####################################################################################
    {
        if ( ~Keyboard ) # Keyboard Actions
        {
            if ( Keyboard == 13 ) # ENTER Actions
            {
                #
                if ( MENU ) # MENU Actions
                {
                    if ( MENUs == "Write" )
                    {
                        #
                    }
                    elseif ( MENUs == "Read" )
                    {
                        #
                    }
                }
            }
                if ( Keyboard == 17 & ViewMod > 0 ) # Runs on Down Arrow Key
            {
                ViewMod-- , S[2041]=1,SU=1
            }
            elseif ( Keyboard == 18 & ViewMod < ( 8 - OnWiFi ) ) # Runs on Down Arrow Key
            {
                ViewMod++ , S[2041]=1,SU=1
            }
            elseif ( Keyboard == 19 ) # Runs on LEFT Arrow Key
            {
                S[2041]=1, SU=1
                LINE = NewlineLine, String = ""
                OnWiFi = 0
                OnFileManager = 1
                Pos = 3, PosMod = 0
                FMC:clear()
                
                FMC[0,number] = 5
                COL = TRAM["_C",number]
                    
                FMC[3,string] = "C:" , S:writeString("C:" ,1,3,999,333,0)
                                       S:writeString(" "  ,0,3,888,COL,0)
                FMC[4,string] = "A:" , S:writeString("A:" ,1,4,999,  0,0)
                                       S:writeString(" "  ,0,4,888,COL,0)
                FMC[5,string] = "LAN", S:writeString("LAN",1,5,999,  0,0)
                                       S:writeString(" "  ,0,5,888,COL,0)
            }
            if ( inrange(Keyboard,163,165) ) # If the pressed key is either F1, F2, F3
            {
                if ( Keyboard == 163 & OnWiFi != 1 ) # Runs on F1
                {
                    LINE = NewlineLine, String = ""
                    OnWiFi = 1
                    S[2041]=1, SU=1
                }
                elseif ( Keyboard == 164 & OnWiFi != 2 ) # Runs on F2
                {
                    LINE = NewlineLine, String = ""
                    OnWiFi = 2
                    S[2041]=1, SU=1
                }
                elseif ( Keyboard == 165 ) # Runs on F3
                {
                    LINE = NewlineLine, String = ""
                    OnWiFi = 0
                    S[2041]=1, SU=1
                }
            }
        }
        #
    }
And a sample from my favorite part, the TableRAM folder initialization!
(I use php again...)
PHP:
INIT_PATH=""
            INIT_N = 0, TRAM[INIT_PATH+"_IS",number] = 0
            
                INIT_S="C:"
                INIT_N++
                TRAM[INIT_PATH+"_IS"     ,number] = TRAM[INIT_PATH+"_IS",number] + 1
                TRAM[INIT_PATH+"_"+INIT_N,string] = INIT_S
                TRAM[INIT_S   +"_PATH"   ,string] = INIT_PATH
                TRAM[INIT_S   +"_FT"     ,string] = ""
                
                
                INIT_S="A:"
                INIT_N++
                TRAM[INIT_PATH+"_IS"     ,number] = TRAM[INIT_PATH+"_IS",number] + 1
                TRAM[INIT_PATH+"_"+INIT_N,string] = INIT_S
                TRAM[INIT_S   +"_PATH"   ,string] = INIT_PATH
                TRAM[INIT_S   +"_FT"     ,string] = ""
                
                
                INIT_S="LAN"
                INIT_N++
                TRAM[INIT_PATH+"_IS"     ,number] = TRAM[INIT_PATH+"_IS",number] + 1
                TRAM[INIT_PATH+"_"+INIT_N,string] = INIT_S
                TRAM[INIT_S   +"_PATH"   ,string] = INIT_PATH
                TRAM[INIT_S   +"_FT"     ,string] = "wifi"
                TRAM[INIT_S   +"_IS"     ,number] = 1

Doesn't seem too hard, does it?
That's the easy part, because the computer does most of my job here...
It's part of the initialization, which kinda lags... A fucking lot! :hohum:

I hope you like the way I'm coding! :smile:

Well, I hope you like my VPC's features!
After the Wiremod team will develop user-defined functions for E2, so I can make everything a lot easier for me, and (hopefully) for the user's processor!

By the way, here are some outdated screenshots of my PC!
I'm going to post a vide of it in action when I have a chance...


gm_flatgrass0037.jpg

gm_flatgrass0038.jpg

gm_flatgrass0039.jpg

gm_flatgrass0040.jpg

gm_flatgrass0041.jpg

gm_flatgrass0042.jpg

gm_flatgrass0043.jpg

gm_flatgrass0044.jpg

gm_flatgrass0045.jpg

gm_flatgrass0046.jpg

gm_flatgrass0047.jpg

gm_flatgrass0048.jpg

gm_flatgrass0049.jpg

gm_flatgrass0050.jpg

gm_flatgrass0051.jpg

gm_flatgrass0052.jpg



***Here is a screenshot of the desktop!***

gm_flatgrass0053.jpg
 
Level 21
Joined
Dec 9, 2007
Messages
3,096
So, do you like it? :grin:

If my garry's mod was working right now, I would work on this computer.

The movie player is still a prototype and I have just one frame now.

By the way, www.garrysmod.org and www.wiremod.com
These are the bibles of every garry's mod players!
And you should learn Expression2. It's a very easy language, and all you need is functions and some really nice operators!
Making a computer isn't that hard, but making modular and flexible programs like mine is something else...
 
Level 21
Joined
Dec 9, 2007
Messages
3,096
My patriot missile in Gmod is even more complex. 5000 lines of code, to make the perfect missile. I made it detect people aiming at it, nearby obstacles and a lot more. Plus a built-in special target finder! :smile:

This computer is still a prototype of my ideas.
I intend to make a lua entity for this computer, so I can customize it even more.
Maybe I'll make my own PCMod! :xxd:
 
Level 21
Joined
Dec 9, 2007
Messages
3,096
After I get my Gmod up and running!

And I promise you'll like it.

I think I'll also add a holo program, like the one in radiosity.
And maybe some more things... After I can use my game...
By the way, it's the new SWEP maker's fault.
"Could not load library client" is my error...
 
Level 21
Joined
Dec 9, 2007
Messages
3,096
Woohoo!
I finally got my Garry's Mod working again!
Can't wait to test the new addons I've installed while it wasn't working, and I'll make a video with Fraps to show the features of a little bit older version! (No movie player and calculator log... They are still prototype)

I'll soon comment around Wiremod forums to FORCE THEM to add functions to expression 2, and then I'll go in-game.

(I'll make the video after I fix some bugs.)

Edit:
Awesome... Now I get lots of errors in game whenever I need to draw a HUD like the popups of Undo...
(Yeah, my computer uses them too!)
 
Last edited:

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,284
Remember to take advantage of the hardware mpeg4 decoders in all modern graphic cards (if possible otherwise get them to atleast hardware decode the video) otherwise it will be unusable in any kind of actual game situation. Using graphics hardware accelerated MPEG4 decoding of formats like those used on youtube you can obtain HD video playback using a mear 4% of an I7 CPU (and that was using flashplayer in a browser). Logically you will not use it to play back HD video (as it is part of a 3D scene so standard def is more than enough) and when doing that my CPU hovers at 0% from flashplayer. Yes it does place some strain on your GPU however but this is not even worth mentioning considering how powerful modern graphic cards are (especially the DX11 ones) and it is certainly better than an overloaded CPU (in which case whole frames can be dropped due or, lord help us, the game can be forced to slow down).

Do not underestimate how demanding video playback is for MPEG4 videos, this has been a huge problem for ingame browser writers as you could not even play WoW while watching a youtube movie on top range hardware (quad cores before I7) without FPS reduction.
 
Level 21
Joined
Dec 9, 2007
Messages
3,096
And... Is that supposed to help me in any way?
I mean... It's not a real computer and I don't have such hardware on my PC or notebook... They are very old, and we can't afford new ones.
My own chance to make a career in programming now is mobile development...
I've already began a project of a 3D rpg for my LG GT505, that's also supposed to work on other touch screens with 320x240 pixels reserved for applications.

Update:
For the media player interface, where the "Track Number" menu pops up, you can write only numbers.
(Yee... Preventing future morons from doing anything stupid!)
I've also fixed a bug in the file viewer, showing the wrong color on the LAN when entering the applications.

By the way, you can surf the internet INSIDE Garry's Mod with a very old version of PCMod 1.0.1
It's not super-fast, you cannot download files, but you can watch youtube as well, if you keep clicking to make the screen update... :xxd:
 
Level 21
Joined
Dec 9, 2007
Messages
3,096
Anything crashes my game now...
My game is taking damage from joinging my brother's server and I think I have a missing file from either reslist or bin...
Anyway, I'll soon buy The Orange Box and Gmod + CS:S.
But I will reinstall the OS, and, most probably, re-format my PC before installing those awesome games. It'll be the perfect environment for playing Valve games.
 
Level 27
Joined
Jul 6, 2008
Messages
11,326
Oh, I haven't played it for quite a long time, so I forgot... hmmm... maybe one of your .lua files is missing? I could recommend you to make some of other countermeasures there are:
-You can make a "user" object from wiremod. When somebody presses "use" on occupied keyboard, it just makes the current user leave... so you can make a "user" pointing at the keyboard... not sure but it should work...
-you could also make some kind of contraption that would move you away from keyboard...
 
Level 21
Joined
Dec 9, 2007
Messages
3,096
Awesome news:
I finally purchased the game from Steam, now two problems:
It doesn't read some of my addons
Whener I try to join a server it sais I do not own the game!!

Whatever... I cannot even download from www.garrysmod.org now...
I want to get PCMod 1 and take a look at the core.
I wanted to start developing my own PCmod...
But what's the point if I cannot do anything now?
-_-"
I will get a refund and put Steam in a shit!!
 
Status
Not open for further replies.
Top