1. Post #1
    Gold Member
    PortalGod's Avatar
    August 2009
    2,297 Posts
    Hey. I'm PortalGod, and you probably know that already. I recently decided to remake my old Pokemon gamemode from scratch (not that I have a choice, I lost all of the original files). You might remember the old version from this thread. In all honesty, I'm pretty embarrassed of it. Since I'm a perfectionist, I couldn't keep passing by the pokemon folder in my gamemodes folder, and eventually got fed up. Contrary to the last two times, however, I have a (near) full understanding of GLua, and the resources to complete this. I've also decided to start with the harder, behind-the-scenes type stuff first. Unfortunately, this means I have very little to post. The reason I'm creating this thread now, and not when the gamemode is done, if not almost done, is because I want this to be a full log of my development process. So, after that wall of text, here we go.

    [release]
    [h2]Stuff that's done[/h2]
    I decided to give making a Pokemon gamemode another try. This time, doing the hard stuff first.

    I've got all the move sets stored as usable data:



    And I've got functions worked out for drawing the pokemon sprites:



    And it's all worked out on a spritesheet, so there's only one texture to download, instead of 4*151=604. The complete code for the above is:

    surface.SetDrawColor(255, 255, 255)
    surface.DrawPokemonFront(16, 16, 64, 64, "kakuna") //x, y, w, h, name
    surface.DrawPokemonBack(88, 16, 64, 64, 14) //all functions take pokemon names as well as IDs as an argument
    surface.DrawPokemonIcon1(160, 16, 32, 32, 14) 
    surface.DrawPokemonIcon2(160, 48, 32, 32, 14)
    

    Not really anything to show off about, but I wanted to share my progress and announce my gamemode.
    Unfortunately, I have marching band camp (American Pie joke here) every weekday from noon to nine, which doesn't leave that much time for working on this. I'll still post whatever I get done, though.
    [/release]

    [release]
    [h2]WIP stuff[/h2]
    I'm working on getting all the base information for pokemon, like type and evolutions.



    All I have to do now is shove it in a table, and save it as usable data.

    Funny story about that, actually: I was using this page to sort through all the HTML to find the element that had the overview info, and I had to ask my friend for help with regex. He pointed out I could just use this, and it took 15 minutes to format it into usable code
    [/release]

    [release]
    [h2]To-do[/h2]
    • Everything but the data
    [/release]

    So yeah. Leave any comments, CC, or expectations below, and I'll be sure to think about them.
    Reply With Quote Edit / Delete Reply Windows 7 United States Show Events Lua King x 4Funny x 4Optimistic x 4Winner x 4Friendly x 1 (list)

  2. Post #2
    Gold Member
    Jamie932's Avatar
    July 2008
    2,590 Posts
    It's great that your picking this back up. It seemed a very interesting idea to achieve within GMod back when you posted the original post.
    Reply With Quote Edit / Delete Reply Windows 7 United Kingdom Show Events Agree Agree x 2Dumb Dumb x 2 (list)

  3. Post #3
    Gold Member
    PortalGod's Avatar
    August 2009
    2,297 Posts
    Yeah, too bad I barely knew lua at that point. I'm hoping that since I'm doing the data first, (the point I had to stop at the first time), I can just blow through this. Also, why does it say I posted the OP with XP and IE? I don't have either installed..

  4. Post #4
    Gold Member
    Thermadyle's Avatar
    January 2011
    363 Posts
    I can't wait to try this out, is it going to support multiplayer?

    If it does, feel free to give me a message when you need someone to try out something.
    Also, if you don't have the pokemon sounds/themes and you need them; I would gladly get them for you.

  5. Post #5
    Gold Member
    PortalGod's Avatar
    August 2009
    2,297 Posts
    It's planned, yeah. I'll add you. Whatever happened to your hat gamemode? Haven't seen any updates on that in a while.

  6. Post #6
    CmdrMatthew's Avatar
    August 2010
    1,180 Posts
    Is this going to have giant maps? Or will it just be limited by normal source map dimensions with nothing making the map appear larger?

  7. Post #7
    Gold Member
    PortalGod's Avatar
    August 2009
    2,297 Posts
    It doesn't seem like the source map dimensions would be a problem, but yeah, that might be something to consider.

    What would you guys want in the map? Rate agree for something new, or disagree for a recreation of one of the pokemon games.
    Reply With Quote Edit / Delete Reply Windows 7 United States Show Events Disagree Disagree x 8Agree Agree x 5 (list)

  8. Post #8
    Ah... tits!
    sam6420's Avatar
    August 2009
    4,346 Posts
    I wan this to happen, it'll just be plain fun to play. :)

  9. Post #9

    August 2011
    32 Posts
    Yeah, looking good, hopefully this goes somewhere.

  10. Post #10
    Gold Member
    vexx21322's Avatar
    December 2008
    10,602 Posts
    It doesn't seem like the source map dimensions would be a problem, but yeah, that might be something to consider.

    What would you guys want in the map? Rate agree for something new, or disagree for a recreation of one of the pokemon games.
    Mix.

    Use the most popular or famous parts from the old games but also add new areas and such.

  11. Post #11
    CmdrMatthew's Avatar
    August 2010
    1,180 Posts
    It doesn't seem like the source map dimensions would be a problem, but yeah, that might be something to consider.

    What would you guys want in the map? Rate agree for something new, or disagree for a recreation of one of the Pokemon games.
    Create a new region, but keep the same basic workings as the latest Pokemon games and add some more stuff to make it more interesting.

  12. Post #12
    Gold Member
    PortalGod's Avatar
    August 2009
    2,297 Posts
    Band camp is over, starting tomorrow, expect constant updates on progress.
    Reply With Quote Edit / Delete Reply Windows 7 United States Show Events Funny Funny x 1Useful Useful x 1 (list)

  13. Post #13
    Gold Member
    PortalGod's Avatar
    August 2009
    2,297 Posts
    Well, it took forever, but I finally got around to getting the data for evolutions, an overview of the pokemon, and the base stats. Progress from here on out may be slow, because I can't have gmod open for more than 15 minutes without my graphics drivers failing.

    7197 lines of goodness:
    Reply With Quote Edit / Delete Reply Windows 7 United States Show Events Winner Winner x 4Optimistic Optimistic x 1 (list)

  14. Post #14
    Gold Member
    Dennab
    August 2009
    2,198 Posts
    v/nice :golfclap:

    I'm excited to hear more progress on this.

  15. Post #15
    KatNotDinner's Avatar
    June 2011
    792 Posts
    So am I! Speacially when coder is banned XD.
    Reply With Quote Edit / Delete Reply Windows 7 Greece Show Events Dumb Dumb x 3 (list)

  16. Post #16

    August 2011
    33 Posts


    And here we gooooo

    Edited:

    Much better:

    Reply With Quote Edit / Delete Reply Windows 7 Germany Show Events Lua King Lua King x 1Winner Winner x 1 (list)

  17. Post #17
    CmdrMatthew's Avatar
    August 2010
    1,180 Posts
    Looking awesome. Good luck with this! BTW: Are you PortalGod's alt?

  18. Post #18

    August 2011
    33 Posts
    He gave me those to post, he's just a RL friend.
    Reply With Quote Edit / Delete Reply Windows 7 Germany Show Events Lua Helper Lua Helper x 2Funny Funny x 1 (list)

  19. Post #19

    August 2011
    33 Posts
    I got garry's approval, my life is complete

    More plz
    What I have done on the map so far:


    Details (there's no pokemon center or pokemart in the second screenshot because I have to scale them and stuff):


    Credit to Plasma for making the models and materials, and for giving me the max files to do my own stuff to them. He's awesome.
    Reply With Quote Edit / Delete Reply Windows 7 Germany Show Events Artistic Artistic x 1 (list)

  20. Post #20
    Gold Member
    Hentie's Avatar
    May 2010
    2,129 Posts
    Is he going to being using some sort of tile editor?
    Mapping something like pokemon in valve hammer seems sort of counter-productive.

  21. Post #21

    August 2011
    33 Posts
    Using hammer. You made me realize that I should work on the gamemode stuff, instead of expanding the map, though. Thanks.
    Reply With Quote Edit / Delete Reply Windows 7 Germany Show Events Agree Agree x 1 (list)

  22. Post #22
    Dog
    What's worse than biting into an apple and finding a dick?
    Dog's Avatar
    March 2011
    3,767 Posts
    Wow this is great.

  23. Post #23
    Poesidan [GAG]'s Avatar
    October 2009
    1,649 Posts
    Tracking. I really hope you finish this. Lots of potential.

  24. Post #24
    Gold Member

    February 2006
    134 Posts
    sick man hope this is finished

  25. Post #25
    CmdrMatthew's Avatar
    August 2010
    1,180 Posts
    I hope you finish this time. I look forward to playing this in multiplayer.

  26. Post #26
    Typhoonx10's Avatar
    July 2010
    866 Posts
    looks great

  27. Post #27
    KatNotDinner's Avatar
    June 2011
    792 Posts
    Hope it gets finished, has server with 10-20 players and doesn't die like most of the epic gamemodes.

  28. Post #28
    Gold Member
    PortalGod's Avatar
    August 2009
    2,297 Posts
    School and band are taking up most of my time, leaving me with only 2 hours a day, most of that time, I don't feel like working on this. So, progress will be slow from here until November.

  29. Post #29
    Gold Member
    PortalGod's Avatar
    August 2009
    2,297 Posts
    Through hacky methods, I managed to make my own pause menu for my gamemode.



    The code I used:

    FakeConsole:SetVisible(false)
    
    local ConsoleOpen = false
    local FakeConsoleOpen = false
    function GM:HUDPaint()
    	ConsoleOpen = false
    end
    
    function GM:PostRenderVGUI()
    	if(ConsoleOpen) then
    		RunConsoleCommand("cancelselect")
    		FakeConsoleOpen = not FakeConsoleOpen
    		FakeConsole:SetVisible(FakeConsoleOpen)
    	end
    	ConsoleOpen = true
    end
    
    Reply With Quote Edit / Delete Reply Windows 7 United States Show Events Lua King Lua King x 6 (list)

  30. Post #30
    Gold Member
    PortalGod's Avatar
    August 2009
    2,297 Posts
    Another update, mostly just for me.

    Made a metatable for my pokemon, which makes my life a whole lot easier.



    The entire code to draw that is:
    for k,v in pairs(pokemon.GetAll()) do
    	surface.SetDrawColor(0, 0, 0)
    	surface.DrawOutlinedRect(-224 + (258*k), 16, 256, 64)
    	surface.SetDrawColor(255, 255, 255)
    	surface.DrawPokemonFront(-224 + (258*k), 16, 64, 64, v:GetName())
    	surface.SetTextColor(255, 255, 255)
    	surface.SetFont("defaultlarge")
    	surface.SetTextPos(-160 + (258*k), 24)
    	surface.DrawText("Name: "..v:GetName())
    	surface.SetTextPos(-160 + (258*k), 48)
    	surface.DrawText("Level: "..v:GetLevel())
    	surface.SetTextPos(-48 + (258*k), 24)
    	surface.DrawText("Real XP: "..v:GetXP())
    	surface.SetTextPos(-64 + (258*k), 48)
    	surface.DrawText("Draw XP: "..v:GetDrawXP())
    	surface.SetDrawColor(80, 104, 96)
    	surface.DrawRect(-220 + (258*k), 72, 248, 4)
    	surface.SetDrawColor(64, 200, 248)
    	surface.DrawRect(-220 + (258*k), 72, v:GetCurLevelXPFrac()*248, 4)
    end

    And the best part, the code to create it:
    local Pikachu = Pokemon("pikachu")
    Pokemon:AddXP(202)
    

    All the functions I have so far:
    Code:
    Pokemon(Name or ID) //Create a new pokemon object
    Pokemon:AddXP(XP) //Lerps the "fake" XP variable to the number given
    Pokemon:GetCurLevelXPFrac() //returns a frac from 0-1 based on a lerped xp variable (for drawing)
    Pokemon:GetDrawXP() //returns the lerping XP
    Pokemon:GetID()
    Pokemon:GetLevel()
    Pokemon:GetName()
    Pokemon:GetXP()
    Pokemon:LevelXP(Level) //returns the xp needed for the given level
    Pokemon:SetLevel(Level)
    Pokemon:SetXP(XP) //Sets XP without lerping
    HUGE thanks to TGiFallen for help, and the level function library.
    Reply With Quote Edit / Delete Reply Windows 7 United States Show Events Lua King Lua King x 3Optimistic Optimistic x 1 (list)

  31. Post #31
    Gold Member
    Llamalord's Avatar
    August 2009
    687 Posts
       Looking Good.   
    Fan-Fucking-Tastic

    PortalGod.: Looking good?
    PortalGod.: LOOKING GOOD
    PortalGod.: You think your fucking shit compliments are going to get you this gamemode
    [LL-Owner] Llamalords: D:
    PortalGod. is now Away.
    Reply With Quote Edit / Delete Reply Windows Vista United States Show Events Funny Funny x 9 (list)

  32. Post #32
    Gold Member
    PortalGod's Avatar
    August 2009
    2,297 Posts
    [LL-Owner] Llamalords: Everytime I see content for your gamemode
    [LL-Owner] Llamalords: I want it more
    [LL-Owner] Llamalords: D:
    PortalGod.: :D
    [LL-Owner] Llamalords: I loath you
    [LL-Owner] Llamalords: D:
    Reply With Quote Edit / Delete Reply Windows 7 United States Show Events Funny Funny x 5 (list)

  33. Post #33
    Gold Member
    Jamie932's Avatar
    July 2008
    2,590 Posts
    It looks as if it's coming along really well. Please don't drop this.
    Reply With Quote Edit / Delete Reply Windows 7 United Kingdom Show Events Agree Agree x 3Friendly Friendly x 1 (list)

  34. Post #34

    May 2010
    53 Posts
    It looks as if it's coming along really well. Please don't drop this.
    Nothing else needs to be said.

    This is really good, it makes me want to break out the game boy color and play pokemon yellow...
    Reply With Quote Edit / Delete Reply Windows 7 United Kingdom Show Events Agree Agree x 1 (list)

  35. Post #35
    Just a Homestuck OC with a massive dick
    Irockz's Avatar
    April 2011
    2,516 Posts
    so is this a full fledged remake of Kanto or multiple regions (the sensible ones being Kanto and Johto due to them being connected)?
    Reply With Quote Edit / Delete Reply Windows XP United Kingdom Show Events Agree Agree x 1 (list)

  36. Post #36
    Gold Member
    vexx21322's Avatar
    December 2008
    10,602 Posts
    so is this a full fledged remake of Kanto or multiple regions (the sensible ones being Kanto and Johto due to them being connected)?
    He mentioned that this will only be first gen. But he might make custom areas that aren't in any of the games.

  37. Post #37
    Gold Member
    PortalGod's Avatar
    August 2009
    2,297 Posts
    so is this a full fledged remake of Kanto or multiple regions (the sensible ones being Kanto and Johto due to them being connected)?
    So far, just Kanto. But I do have support for most of the newer things up to generation III, so it may come in the future.
    Reply With Quote Edit / Delete Reply Windows 7 United States Show Events Winner Winner x 3Informative Informative x 1 (list)

  38. Post #38
    liam6478's Avatar
    May 2007
    100 Posts
    This looks great, keep up the good work!

  39. Post #39
    sacred1337's Avatar
    July 2007
    130 Posts
    Since I asked you whether you would like to work on this together and you said no, I've done more than this, but this is the latest update to FP.

    http://www.facepunch.com/threads/108...1#post32810467
    Reply With Quote Edit / Delete Reply Windows 7 New Zealand Show Events Lua King Lua King x 3 (list)

  40. Post #40
    Gold Member
    PortalGod's Avatar
    August 2009
    2,297 Posts
    My marching band stuff is finally over and done with (we did the best at state competition/state finals in school history)! So now I'm free to work on this again.

    Edited:

    Since I asked you whether you would like to work on this together and you said no, I've done more than this, but this is the latest update to FP.

    http://www.facepunch.com/threads/108...1#post32810467
    Congrats on finishing, it looks good. I just hope you don't mind a little friendly competition when I continue work on mine.

    Updates coming soon!
    Reply With Quote Edit / Delete Reply Windows 7 United States Show Events Winner Winner x 1 (list)