Not logged inGosu Forums
Forum back to libgosu.org Help Search Register Login
Up Forum
Search
Topic get clicked pixel color By jlnr Date 2016-07-20 20:01
Yes, but enable_undocumented_retrofication was a only temporary hack while I was working on the :retro flag, which is the new way of doing things: Image.new("filename.png", retro: true)
Topic get clicked pixel color By OldBoy Date 2016-07-20 17:34
I've set my goal to make a simpler game first, hopefully I'll be back to your explanation sometime ... :)

> Also, :retro only sets a few OpenGL parameters that change how the image is rendered when it is stretched or rotated, it does not affect the image's pixel data.


is "Gosu::enable_undocumented_retrofication", the same thing?
Topic Gosu 0.10.0 released By jlnr Date 2015-08-20 08:51
Gosu 0.10.0 is out. It contains two things that I thought I had already released:

• Add new ifRetro/:retro parameter to image constructors
• Ruby: Fix mouse position getter/setter interaction

Sorry for the delay, I meant to release 0.9.3 months ago. The tl;dr is that you should start using Image.new("filename.png", :retro => true) instead of using Gosu::enable_undocumented_retrofication.

I've also replaced a few third-party libraries with easier-to-maintain public domain code.
(The version was bumped to 0.10.0 because some exotic image files might not work anymore — but at least they will consistently be broken across platforms now! No more surprises during porting.)

• Use stb_image(_write) for image I/O instead of GDI+, FreeImage, UIImage/NSImage etc.
• Use stb_vorbis for OGG decoding instead of libogg/libvorbis/libvorbisfile

This is also great news because libogg/libvorbis require written attribution in every game that uses the libraries (BSD license) - and readers of our games' README files honestly don't care about audio codecs. Less clutter for everyone.

The biggest changes in 0.10.0 are in the non-Ruby build scripts, though:

• Windows: Upgrade to Visual C++ 2015 (the free Express Desktop edition works). Microsoft has pulled all downloads for good old Visual C++ 2010, time to move on.
• Unix: Fix the CMake build files.
• Xcode: The Gosu.podspec for OS X and iOS is now versioned, instead of being stuck at v0.0.1.

Precompiled libraries for Windows, and a source code tarball for UNIX systems can be found here: https://libgosu.org/downloads/

To keep the Gosu codebase somewhat manageable, I have also ripped out the Socket classes for C++ and moved them to https://github.com/jlnr/Sockets.
Topic Gosu 0.9.2 released By jlnr Date 2015-06-15 08:53
I see. I've been meaning to finally replace enable_undocumented_retrofication with a new flag during image creation, e.g. Image.new("tile.png", :retro => true), same for load_tiles etc.; would this help?

(It's gotten a lot easier to actually implement this based on the new interface :) )
Topic Are retro-style supported? By RunnerPack Date 2014-03-02 06:50
Try Gosu::enable_undocumented_retrofication
Topic Are retro-style supported? By satgo1546 Date 2014-03-02 03:55
Really? It's an undefined method. My code:
require 'gosu'

class GameWindow < Gosu::Window
  def initialize
    super(640, 480, false)
    self.caption = "Retro test"
    enable_undocumented_retrofication ### <-- Insert this method here?
    @img = Gosu::Image.new(self, "test.png", false)
  end
  def update
  end
  def draw
    @img.draw(0, 0, 0, 10.0, 10.0)
  end
end

GameWindow.new.show
Topic Are retro-style supported? By jahmaican Date 2014-03-01 13:45
You have to call enable_undocumented_retrofication method - just once, preferably on program start.
Topic Turning off interpolation? By jlnr Date 2014-01-07 07:44
The OpenGL snippet has since been turned into the Gosu::enable_undocumented_retrofication method. Just call it once during startup. And please wrap it in a rescue block because I want to deprecate it as soon as I have found a better interface for it %)
Topic A different type of "pixel game" support By hmans Date 2013-06-17 10:00
I'm aware of Gosu::enable_undocumented_retrofication, which, as I understand it, deactivates texture filtering/antialiasing/whatever to make sure large pixels are nice and clean.

What I'd much prefer to do is rendering the entire scene to a small canvas and then zooming that canvas so it fills the window. For example, I'd render to a canvas that is 320x240 pixels, and zoom it by a factor of 2 so it fills my window of 640x480 (still using what Gosu::enable_undocumented_retrofication does, of course).

Is that possible to do with the current version of Gosu? If it's not, what are the chances of getting this in a future version?

Cheers,
Hendrik

Edit: I've attached a screenshot of the kind of effect (rotated pixels) that I would like to prevent using the technique described above.
Attachment: ScreenShot2013-06-17at12.20.55.png - It's the "rotated pixels" effect that I would like to prevent with this. (128k)
Topic scaling without interpolation By lol_o2 Date 2013-06-01 18:21
Gosu::enable_undocumented_retrofication - just call it somewhere

And you could search for it before posting:
http://www.libgosu.org/cgi-bin/mwf/topic_show.pl?pid=6800
http://www.libgosu.org/cgi-bin/mwf/topic_show.pl?pid=4876
http://www.libgosu.org/cgi-bin/mwf/topic_show.pl?pid=2561
Topic Antialiasing in Gosu By Dahrkael Date 2013-05-08 12:08
you can use Gosu::enable_undocumented_retrofication
I think thats the name of the function, or something similar, to keep the aliasing out
Topic Wrong window size By jlnr Date 2012-12-11 01:51
scale expects a block with the code that will scale...

scale(2) do  # passing 2 is the same as 2, 2, 0, 0 :)
  image3.draw(1,2,3)
end


You can stack and combine these transforms.

For pixelated-style games, use Gosu::enable_undocumented_retrofication (sic)
Topic BkSmith - Mark's Quest v0.4 By Spooner Date 2012-10-09 22:11
Seemed a decent engine. Important thing is to scale the screen so I can see it ;)

Use Gosu#enable_undocumented_retrofication to stop it from blurring, run at 640x480 (or 800x600) res and scale it down with:

class Game < Chingu::Window
  def draw
    scale 0.5 do
       super
    end
  end
end
Topic Image blurring when using draw_rot By jlnr Date 2011-02-06 09:35
It does exactly what you posted above for all textures. Just use it like that: "begin; Gosu::enable_undocumented_retrofication; rescue; end". It's undocumented on purpose because it will be part of the new Image constructors later. You can use it to play around in the meanwhile though.
Topic Image blurring when using draw_rot By bestguigui Date 2011-02-04 19:50
I don't see what Gosu::enable_undocumented_retrofication refers to, I'm no native english and don't understand what it represents exactly, can you explain it to me ?

BTW, my method didn't work on textures not power of two because Gosu::Images that are not power of two don't have a gl_tex_info method.
Topic Image blurring when using draw_rot By kaBOOM Date 2011-02-04 05:58
Hi. I'm so stupid. Until a couple of days ago, I didn't realized all I had to do was put "Gosu::enable_undocumented_retrofication" in my code to get the rsults I wanted. I was thinking it was a method with lots of necessary arguments "a la" draw_rot.
Thanks good sir. I love GOSU.
Topic Image blurring when using draw_rot By jlnr Date 2011-02-03 03:07
That is exactly what the 'Gosu::enable_undocumented_retrofication' method is doing. BTW you can do this without power of two textures, no problem. :)
Topic Gosu 0.7.19 released By jlnr Date 2010-04-24 16:16
Hello,

Even though there are still some problems left with Linux/RVM and apparently Ruby 1.9.2 on OS X, I decided to release Gosu 0.7.19 in time for the currently running Ludum Dare competition. Excuse the delay, the first item took a lot longer than expected.

As usual, the release is available on GoogleCode and as a RubyGem.

Changes:

* Mac: Fixed custom TTF loading on 64-bit OS X 10.6 (thanks Tri&Alex for trying it out); see GettingStartedOnOsx for necessary Xcode project setup instructions.
* All: Renamed the semi-documented gosuToRadianScale to degreesToRadian and vice versa (in Ruby, instance methods of Numeric). gosuToRadians and radiansToGosu remain unchanged. Sorry for anyone who already used this and has code breaking now. I only know of one person though, who agreed with the change. :)
* C++: Sockets should work on 64-bit systems now.
* Ruby: Added Gosu::enable_undocumented_retrofication. It globally disables all texture bilinear filtering. Will be removed when proper interface is available, please put this in a "try" block when using. This is provided so developers can avoid the hard-to-distribute ruby-opengl gem to achieve this effect. (Hey, ippa. ;) )

Powered by mwForum 2.29.7 © 1999-2015 Markus Wichitill