Showing posts with label pygame. Show all posts
Showing posts with label pygame. Show all posts

Tuesday, May 15, 2018

Zoxenpher & gopherspace - new features and an introduction to the gopher.


What is this gopherspace stuff anyways?

Gopher itself is a protocol for accessing information on the internet. Its similar to the world wide web in that respect. But in just about every other respect gopher is very different.

Gopher is made up of a system of menus, rather than many pages of html markup and complex scripts.  This first difference does mean gopher can run on a very low end system. I mean very low end, like the embedded system inside your smart toaster. Of course, not every gopher client is built alike, and they can very  wildly in what they support, and whether they even properly render it. (Arachne for example, a dos web browser, renders comment lines as links for whatever reason.)

There are gopher clients for Android, Modern PCs, web browsers, FreeDOS, and even the Commodore 64.

Gopher's simplicity and elegance may not wow with glamor or fancy styling, but its definitely useful when you need, say, weather reports when the power is out and you want to save battery by not running your web browser. or you want to look something up and are concerned about bandwidth usage. Or even if you just want to explore an online world that's a bit different for a change.



Zoxenpher: A gopherspace client.
Zoxenpher is a python/pygame-based gopherspace client.

as the screenshot suggests, it uses a multiwindow paradigm. (infact it uses a pygame windowing framework i had designed previously)


The gopher menus in zoxenpher now have gopher type icons for each link, as does a curious window hiding behind the large gopher menu in the center.

Bookmarks. It may not seem like much, but bookmarks can make or break a browser, and turns out thats true for gopher clients too. on top of the bookmark buttons visible in the menu windows, shift-clicking a link will let a user bookmark links too.

Zoxenpher has in-line image previewing and a dedicated image viewer when there are simply too many images to preview (default preview limit is 10)

The usual sort of small features like url entry boxes, help system, buttons to reload and return to the server root of a menu and so on, are also present.

Zoxenpher on github

Wednesday, May 9, 2018

Zoxenpher: A python/pygame gopher client.

Introduction:
Im not about to give you a history lesson on gopherspace, (perhaps that would be best in a separate blog post) but what i am going to do is introduce my gopher client: Zoxenpher

Basic UI:
Zoxenpher is powered by a virtual window manager framework of mine, Strazoloid-WM, and features a "desktop-like" UI paradigm. each "window" can be dragged via the title bar, and when applicable, resized via the extra bar at the bottom of the frame. the small square in the left of the title bar, likewise, closes the window.

Opening a gopher window is as simple as right clicking a menu link, or clicking the suspicious "new" button in the upper left hand corner.



Some other bits and bobs:

  • Zoxenpher features image support, with in-menu preview of up to 10 images. (the remaining images can be opened in a separate window manually)
  • Search queries thought gopherspace will open a query box when clicked, that will prompt the user for a search query.
  • Zoxenpher isn't entirely finished, but it is more-or-less capable of browsing gopherspace.
Zoxenpher on Github

Friday, May 4, 2018

python lib showcase: pyg-to-term

pygtotermlib.py is a python library of mine that converts pygame surfaces to block-graphics (think ansi-art), ready to be printed to a *nix-style terminal.

So what can you do with it?

The chart on the right shows the 5 main conversion modes. (interpolation options for the first and third modes not shown)

The second and fourth options use 256-color escape sequences, while the last one uses 24bit-color escape sequences.

While these modes allow nicer output, there is a catch: not all terminals will actually show these modes properly.

pyg-to-term on Github

Wednesday, March 14, 2018

Desutezeoid v1.7.1 Release


Desutezeoid has come a long way from its humble beginnings. Starting as just a experimental logic system that i originally developed for v5 of my maze engine (Now Rhennevad Maze). V1.7.1 Continues Desutezeoid's saga of improvement with a host of new features. the details are too much for a blog post, so here are some big ones:

Pausing, Resuming, Taking Breaks
pause menu
Like many adventure engines of old, Desutezeoid now has a proper save-state system. This is accessible from the new pause menu (ESCAPE key). the engine now also includes autosave and autoload functionality. Pause menu times are automatically calculated to extend timeout forks, and this is also exposed to the plugins through the new pause and resume calls.

Invman: items, objects, doughnuts and widgets.
Invman, SBTCVM's new inventor manager system, provides advanced item management based on ID strings called "itemids". the system provides forks to determine if the player is holding or has an item, as well as managing the player's inventory. A core object type, "actionrect", similar to an invisible box tag, is provided to streamline object actions.


Start screen, featuring a DZA script animation.
DZA: The Desutezeoid Animation System. 
As one of the most ground-breaking changes in v1.7.1, DZA allows frame-by-frame animations with looping, conditional loops, keyid manipulation and sound playback, in the form of new *.dza scripts.








Effects, Shaders and more!
Desutezeoid now also comes with a slew of special effect plugins, from Scanline emulation, to rain, to the pictured rainbow bubble effect.






In Conclusion: 
Desutezeoid is a much more capable engine than it was in the past. From save states to Shaders, v1.7.1 is a long way from Desutezeoid versions of old.




Downloads:
https://github.com/ThomasTheSpaceFox/Desutezeoid/releases/tag/v1.7.1

Wednesday, January 31, 2018

F.S.S.S. - A python array-based software synth

FSSS (or Floored Square Simple Synth) is a python array-based software synthesizer.

https://github.com/ThomasTheSpaceFox/Floored-Square-Simple-Synth/releases/latest

This synthesizer uses a generated-sample-based method of sound generation.

FSSDL (Floored Square Simple Drum Loop)


FSSS with default parameters.
FSSS features a wide variety of parameters. from stack synthesis method to waveform flooring method, to even several base waveforms.


FSSS also comes with FSSDL. A simple drum sequencer. With bass, snare, and hithat sounds, configurable cells per beat and beats per minute, and 8 and 16 cell display modes.



FSSS's main synth has a guide of its various key macros on the top of the screen. along with a waveform display, and parameter display at the bottom.


To play music with the synth, use the upper and lower two rows of keys.

(the arrangement is similar to several other music creation software, such as LMMS)


As for how it sounds, its probably best used for chiptune-esq music.

Sunday, May 28, 2017

Desutezeoid: v1.4.2 released.

a mouse-following mask creates a flashlight effect.
Download it here


Desutezeoid. my XML-driven, pygame-powered Point and click engine.  Featuring a page-based structure, object-based scripting, popup dialogs,  image, sound, text, and music support and more.

v1.4.2 adds various new features and improvements.

a literal "x" and "y" follow the mouse
the new mouseh and mousev img attributes allow various modes of following the mouse pointer position, including an inverted mode that's used to great effect in the demo program to show a wide panoramic image.

The demo provides 2 example panoramic views
the new hscroll and vscroll img attributes provide a means of continuously scrolling images. Such can be used in a variety of ways. such as moving clouds. visuals moving across a background, and more!



Dezutezeoid: scrolling img objects, flashlight effects, and an obsurdly simple panoramic effect.

Its been a while since ive worked on my point and click engine, dezutezeoid.
for those that dont know, its written in python and pygame, is entirely XML driven, and is partly inspired by html links.


One of the very recent additions is the hscroll and vscroll attributes for the img objects. example:
        <img x="400" y="100" vscroll="2" hscroll="4">
            <con>animtest1a.png</con>
            <act type="none"/>
        </img>
        <img x="500" y="100" vscroll='-2' hscroll="4">
            <con>animtest1a.png</con>
            <act type="none"/>
        </img>

Those are from the "test1.xml" page included with dezutezeoid as part of its example program.vscroll and hscroll are independent.

test1.xml when displayed in Dezutezeoid


here is a nifty trick: If you need a visual to slide across the screen, place it on a transparent image that is just bigger enough than the screen size to make sure only one "copy" of that visual is well, visible. then you just set vscroll and hscroll appropriately and presto!  Play around with things until it looks decent.

Looking for a nice wide angle view? well. the example program has a nifty example of that. just click on "warp things...".

mind=blown you say? its simple really. its just one of several uses of the new mousev and mouseh img object attributes.

        <img x="300" y="100" mouseh="2">
            <con>folx.png</con>
            <act type="none"/>
        </img>
        <img x="300" y="100" mousev="2">
            <con>foly.png</con>
            <act type="none"/>

        </img>
This is the XML for the literal "X" and "Y" in "test1.xml".
obviously mouseh and mousev take priority over x and y.

mousev and mouseh have a few modes:
1= normal top-left corner alignment
2= centered alignment
3= screen-reversed centered alignment


So whats the secret of warptest1.xml and its mind-blowing effect?
        <img x="0" y="0" mouseh="3" mousev="3">
            <con>warptest1.jpg</con>
            <act type="none" ref="test0.xml"/>
        </img>

its just mouseh="3" and mousev="3" and a lens-distorted image that's 2x the screen size. the telescope effect is just a black image the same size with a hole cut in it, using mouseh="2" and mousev="2", drawn above the simple panoramic effect.






warptest1.jpg for comparison:




Not complicated at all.

the screen size is 800x600
the panoramic to the right is 1600x1200. 2x the size.




And now for a flashlight effect:






again its a 1600x1200 image. this time it has a circular transparent-to-black gradient to it.


the difference is its using mode 2 of mouseh and mousev. also do remember to use a background image 😉


XML code:
        <img x="0" y="0" mouseh="2" mousev="2">
            <con>flashlight.png</con>
            <act type="none" ref="test0.xml"/>
        </img>




Dezutezeoid might not be the worlds most capable point and click engine, but it works quite well for what it is.

Dezutezeoid on github