don't click here

Working Palette Cycling in GM

Discussion in 'Fangaming Discussion' started by Mercury, May 7, 2011.

  1. nineko

    nineko

    I am the Holy Cat Tech Member
    6,364
    522
    93
    italy
    I get a full 60/60, with Task Manager reporting a 2% CPU usage, on my main computer:
    Code (Text):
    1. ------------------
    2. System Information
    3. ------------------
    4. Time of this report: 5/10/2011, 14:37:08
    5.        Machine name: COMPUTER
    6.    Operating System: Windows XP Professional (5.1, Build 2600) Service Pack 2 (2600.xpsp_sp2_rtm.040803-2158)
    7.            Language: Italian (Regional Setting: Italian)
    8. System Manufacturer: ECS
    9.        System Model: A790GXM-AD3
    10.                BIOS: Default System BIOS
    11.           Processor: AMD Phenom(tm) II X3 720 Processor,  MMX,  3DNow (3 CPUs), ~2.8GHz
    12.              Memory: 3328MB RAM
    13.           Page File: 827MB used, 5410MB available
    14.         Windows Dir: C:\WINDOWS
    15.     DirectX Version: DirectX 9.0c (4.09.0000.0904)
    16. DX Setup Parameters: Not found
    17.      DxDiag Version: 5.03.2600.2180 32bit Unicode
    18.  
    19. (...)
    20.  
    21. ---------------
    22. Display Devices
    23. ---------------
    24.         Card name: NVIDIA GeForce 6600 GT
    25.      Manufacturer: NVIDIA
    26.         Chip type: GeForce 6600 GT
    27.          DAC type: Integrated RAMDAC
    28.        Device Key: Enum\PCI\VEN_10DE&DEV_0140&SUBSYS_00000000&REV_A2
    29.    Display Memory: 256.0 MB
    30.      Current Mode: 1152 x 864 (32 bit) (75Hz)
     
  2. Vinchenz

    Vinchenz

    Yo! Hustle! Hustle! Member
    Now, I know nothing about GameMaker, but can you not animate something based on GameTime? That seems like it would be a lot easier than using a shader.
     
  3. Overbound

    Overbound

    Member
    607
    21
    18
    Iowa
    Sonic Time Twisted Creator
    I wouldn't exactly call his engine a small project. But I have an AM2 motherboard I could give you too. Still kinda old but better, it has a PCI-e slot so if Andrew gave you that GFX card it should work. I also have a 550wat power supply you could have too, it may or may not be enough to power the GFX card.
     
  4. Mercury

    Mercury

    His Name Is Sonic Tech Member
    1,740
    21
    18
    Location Location
    AeStHete
    When it comes to cycling palettes huge swathes of the zone are animated (think of the glowing rocks in Lava Reef, or the glistening ice in Ice Cap). The amount of graphics you'd have to copy to have swapped frames for everything would fill up memory very quickly, plus swapping out all of the tile layers would eat up CPU time. Also, try to imagine the headache of baking Super Sonic or Hyper Knuckles' glowing colours into their sprite animations. Ouch!

    I appreciate the offers, guys, but I'm basically designing classic style games here and what I have is plenty. I don't really want people sending me computer parts, and I don't have the time or expertise to assemble them, anyway. Chances are I'll just get a brand new computer when I can.
     
  5. nineko

    nineko

    I am the Holy Cat Tech Member
    6,364
    522
    93
    italy
    QUOTED FOR EMPHASIS.

    This has got to be the best post on Retro, ever. These days too many people tend to think they need more processing power while they actually need better, less bloated code... Glad to see you're doing it right instead.

    In the mean time I tested it on my laptop, and I get a full 60/60, with Task Manager reporting a CPU usage oscillating between 6% and 22%, on this configuration:
    Code (Text):
    1. ------------------
    2. System Information
    3. ------------------
    4. Time of this report: 5/11/2011, 09:33:05
    5.        Machine name: SAGER
    6.    Operating System: Windows XP Professional (5.1, Build 2600) Service Pack 3 (2600.xpsp.080413-2111)
    7.            Language: Italian (Regional Setting: Italian)
    8. System Manufacturer: SAGER
    9.        System Model: M980NU          
    10.                BIOS: BIOS Revision: 1.00.05LS1      
    11.           Processor: Intel(R) Core(TM)2 Duo CPU     P9700  @ 2.80GHz (2 CPUs)
    12.              Memory: 2558MB RAM
    13.           Page File: 701MB used, 3746MB available
    14.         Windows Dir: C:\WINDOWS
    15.     DirectX Version: DirectX 9.0c (4.09.0000.0904)
    16. DX Setup Parameters: Not found
    17.      DxDiag Version: 5.03.2600.5512 32bit Unicode
    18.  
    19. (...)
    20.  
    21. ---------------
    22. Display Devices
    23. ---------------
    24.         Card name: NVIDIA GeForce GTX 280M      
    25.      Manufacturer: NVIDIA
    26.         Chip type: GeForce GTX 280M
    27.          DAC type: Integrated RAMDAC
    28.        Device Key: Enum\PCI\VEN_10DE&DEV_060A&SUBSYS_98001558&REV_A2
    29.    Display Memory: 1024.0 MB
    30.      Current Mode: 1920 x 1080 (32 bit) (60Hz)
    SLI is disabled, but I don't think it would make a difference.
     
  6. Andrew75

    Andrew75

    Technical Artist Member
    2,033
    108
    43
    Project AXSX(Sonic Xtreme) + Misc Projects
    Hey no problem, I like the work you did in fan remix .
    and I was thinking free hardware would be useful for you if you decided to go back into doing a 3D engine.
    I think it would be amazing to see some kind of open end 2.5D engine where people could drop level chunks in just like editing the 2D games in sonicED2.
    level chunks could be 256 x 256 x 256 xyz units for example. its sort of what I'm doing with Sonic CD remix anyways.(minus the sonicED2 style editor)
     
  7. nineko

    nineko

    I am the Holy Cat Tech Member
    6,364
    522
    93
    italy
    For the lulz I tried it on my older computer. It complains about some missing DLLs and it doesn't even start. Bonus points for the executable icon (the flower) not displaying correctly, either.
    Code (Text):
    1. ------------------
    2. System Information
    3. ------------------
    4. Time of this report: 5/11/2011, 17:11:47
    5.        Machine name: COMPUTER
    6.    Operating System: Windows 2000 Professional (5.0, Build 2195)
    7.            Language: Italian (Regional Setting: Italian)
    8. System Manufacturer: n/a
    9.        System Model: n/a
    10.                BIOS: Default System BIOS
    11.           Processor: AMD-K7(tm) Processor,  MMX,  3DNow, ~550MHz
    12.              Memory: 128MB RAM
    13.           Page File: 51MB used, 251MB available
    14.         Windows Dir: D:\WINNT
    15.     DirectX Version: DirectX 9.0b (4.09.0000.0902)
    16. DX Setup Parameters: Not found
    17.      DxDiag Version: 5.03.0001.0902 32bit Unicode
    18.  
    19. (...)
    20.  
    21. ---------------
    22. Display Devices
    23. ---------------
    24.         Card name: Matrox Graphics MGA-G100 AGP
    25.      Manufacturer: Matrox Graphics
    26.         Chip type: MGA-G100 B4 R2
    27.          DAC type: Integrated, 230 MHz
    28.        Device Key: Enum\PCI\VEN_102B&DEV_1001&SUBSYS_FF00102B&REV_02
    29.    Display Memory: 4.0 MB
    30.      Current Mode: 640 x 480 (32 bit) (60Hz)
    It used to have a G400 as video card, but a friend of mine broke it so I traded it with Oerg who sent me his old G100 (he also fixed my G400, but he can keep it as decided in our deal). I don't think a G400 would have made the miracle, though. This test was just for the lulz as I said.
     
  8. Mercury

    Mercury

    His Name Is Sonic Tech Member
    1,740
    21
    18
    Location Location
    AeStHete
    ^ That doesn't sound like it'd even run plain vanilla Game Maker. It sounds like the old Dell I have that I sometimes test things on. It fails to create the proper icon, too, and doesn't have enough video memory to "initialize the drawing surfaces". It's like expecting a homo habilis to enjoy Scott Pilgrim.

    (Oh, and the Game Maker icon is supposed to be a gear, not a flower. That's supposed to be a generic pacman in the middle, but I see where the G opens up as a nose and just think Mr Game and Watch. =P )

    [​IMG]
     
  9. nineko

    nineko

    I am the Holy Cat Tech Member
    6,364
    522
    93
    italy
    Interesting, this is how the icon looks like on my (working!) computers: [​IMG]

    You have to admit it does look a bit like a flower.
     
  10. Mercury

    Mercury

    His Name Is Sonic Tech Member
    1,740
    21
    18
    Location Location
    AeStHete
    Ah yes. It slipped my mind that the game icon is a simplified version. It's the GM editor that has the icon I posted.

    And it does look like a flower. It's hard to make gear icons look like gears, I've had the same problem myself - they always end up looking like sunbursts or something if they're too small.

    Anyway, thanks again to those who tested. It looks like nobody had any serious problems with it, and at this rate I doubt there are any alternatives for GM anyway, so I guess it's a keeper.
     
  11. HighFrictionZone

    HighFrictionZone

    Hi. Member
    855
    1
    16
    Katy, Texas
    Nothing
    AMD Phenom II X6 2.8 GHz, 8 GB ram, Windows 7 64-bit. Smooth as butter.
     
  12. Hayate

    Hayate

    Tech Member
    Works fine for me, 60fps. My dxdiag.txt: http://freetexthost.com/qn263agp5c

    What kind of code does this use? Any chance it could be backported to GM5.3a? :v:
     
  13. RetroKoH

    RetroKoH

    Member
    1,728
    107
    43
    S1Fixed: A successor to ReadySonic
    Are all animated backgrounds done with pallete color swaps? I want to find a way to draw sprites onto the background to make more dynamic backgrounds. Anyone know yet? I've tried a couple things, nothing works...
     
  14. Mercury

    Mercury

    His Name Is Sonic Tech Member
    1,740
    21
    18
    Location Location
    AeStHete
    No, the extension I'm using for it is tied to GM8.0.

    Not all background animation in Sonic is done by manipulating the palette. For instance, SBZ's smokestacks are animated by swapping out whole tiles. GM doesn't have animated tiles, though. One option is to put objects wherever there's animation and make them move along with the background; another is to use a shader extension and write a custom shader for it (but that's pretty difficult and advanced, my attempts to do so are still incomplete).
     
  15. RetroKoH

    RetroKoH

    Member
    1,728
    107
    43
    S1Fixed: A successor to ReadySonic
    I've tried inserting objects into the background to follow the background... I've even tried getting my parralax object to insert sprites in the same fashion that it places background images. Cant get it to work.
     
  16. stormislandgal

    stormislandgal

    It's not a phase! Tech Member
    4,534
    10
    18
    Married life <3
    What I did for the water in Pokemon Azure was set the background to one frame of the water animation. Then, in an object that was present in every map, it would change the background to a different frame of the water animation. The water would animate under static tiles without too much fuss. For example, you could have an object that draws a single frame of the Scrap Brain Zone smokestacks, tiled, and switches between different frames (defined as backgrounds) on a timer. Then, above that background, you draw the normal SBZ background with transparent holes in it that allow the smokestacks to appear. Set them both to the same parallax speed and there you go. It can get complex for larger, more detailed backgrounds, though.

    As for the demo in the original post, I reached ~58fps. I imagine that would plummet once you brought the actual engine that this would be attached to into the equation. I'm running on 1.3ghz, 1gb ram, 128mb video ram I believe.
     
  17. RetroKoH

    RetroKoH

    Member
    1,728
    107
    43
    S1Fixed: A successor to ReadySonic
    Thanks for the suggestion. I will take the idea and go try it again... hopefully I can get it to work. I'm building a Sonic Engine... Obviously why I'm interested in this. I can get 60 FPS no prob... I'm running on a lil bit higher specs than you are, but you are correct, attaching this to an engine will slow things down a bit... My primary concern is making sure I can get it to work... then, I wanna find ways to increase speed to ensure it can run smoothly.