Monday, May 29, 2017

Game Development: Working on Rhennevad Escape again!

the title screen is now animated.
its been a while since i worked on this game.  The basic premise is its a Island themed, Point and click escape adventure.

Its powered by Desutezeoid (ignore the version number in the screenshot)

Whats Desutezeoid? Well, its my point and click game engine. written in python and using the pygame SDL bindings.

Ive done some more remixes of the Rhennevad Theme music, and have included a few of them. ive started work on chapter 1 again, and various screens and such now use the new image scrolling capacity to their advantage. for example in the title screen, a boat and a shark will move across that picture, and those clouds actually move.

I'll post about this game more as it develops.

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









Saturday, May 27, 2017

SBTCVM: Benchmarking - part 2

if you read the previous post, you will remember me talking about not having benchmarked that Pentium 4? How does it compare to my much more modern 64bit laptop? lets find out!


I put both of them through 2 tests.

each of these two tests consisted of running the new benchmark1.trom Fibonacci benchmark 5 times with execution logging enabled.

results are in Operations(clock cycles) per second

Pentium 4:

Our first contestant is a 1.4Ghz Pentium 4 with 384MB ram.

with readouts enabled:
high: 183.7
low: 60.1
Average: 154.12

with readouts disabled:
high: 211.1
low: 90.9
Average: 177.26

Overall Average:
165.74


AMD A4 dual core:

Our second contestent is a Dual core 64bit AMD at 1000Mhz Per core. with 4GB ram.

with readouts enabled:
high: 321.7
low: 310.8
average: 317.54

with readouts disabled:
high: 444.8
low: 399.5
average: 413.82

Overall Average:
365.68


 ⚑⚐⚑⚐⚑ And now for the final Rank ⚑⚐⚑⚐⚑

1st place: AMD A4 at 365.68 operations/second average

2nd place: Pentium 4 at 165.74 operations/second average

Friday, May 26, 2017

SBTCVM: Benchmarking

With a new execution log counter for seconds since start of execution, i decided to take a look at how well SBTCVM preforms.

if you are wondering what execution logs look like. Well, they are usually thousands and thousands of lines like this one:
data: 000000000 |Inst: --000- |adr: -----00+- |thread: -- |exec bank: A |reg1: 000++++++ |reg2: 000++++++ |tic #: 6590 |secs: 11.4083640575

tip: you can activate execution logging when launching with MK2-RUN.py by using the -le option.

That's from the end of colmap3's execlog to be exact. whats important here is "tic #" and "secs" by dividing the clock tic number by the time passed (secs), we can get the operations/second value of 577.

ranging from 607 operations/second for a stripped down variant of the
"Dazzle" demo, to 286 for the Fibonacci demo, after calculating the average operations/second for several SBTCVM programs, it means out to around the ~460 operations/second range on a 64bit AMD A4 dual core on a puny 11 inch wide laptop.

with some CPU delay adjustment (I increased the delay time from 0.0005 to 0.001 seconds) I was even able to get SBTCVM Mark 2 working on a 1.4Ghz Pentium 4 with ~400MB ram. so no, you don't need a high end binary number-cruncher to run SBTCVM.

like any virtual machine, mileage WILL vary, as many factors affect how well SBTCVM preforms.

Thursday, May 25, 2017

LepVulpes Art: Logos and UI: SBTCVM's aesthetic improvments.

LepVulpes Art: Logos and UI: SBTCVM's aesthetic improvments.: Ah SBTCVM. my balanced ternary virtual machine. Usually when i blog about sbtcvm, I'm over on the tech blog, talking about the latest ...

Tuesday, May 23, 2017

SBTCVM: a bit of graphical polish

old logo
First off you might notice the logo is much more vibrant.

the lettering is the same shape, but more flat and polished.

new menu

old menu
next lets take a look at the main menu:

compared to the old menu look, the new menu style looks much more polished, and less garishly blue. also the logo in the side of the window has changed to a more basic one, the lettering being overlaid on the blue background directly.  And to top things off, the status area actually shows something.
















The about screen has been replaced by a new one featuring a scrolling credits motif. Complete with Logo and graphics that scroll smoothly with the text.






Not many changes in the vm itself, other than that side area logo change.

you might notice the new thread ID display as well.

Sunday, May 21, 2017

SBTCVM: now with a custom command shell

SBTCVM Command Shell


To run it, just start MK2-CS.py in a terminal.
When it first starts. it waits for libraries to load, prints its version string, then says its ready, prompting the user with a ":".

it has various uses. From working with SBTCVM utilities, to translating a balanced ternary integer to decimal.

naturally, the first thing a new SBTCVM user would be wise to do is type "help". doing this will spit out a few lists of commands like this:

:help
Commands:
run [arguments] : SBTCVM command line launcher. use "run help" for help.
asm [arguments] : SBTCVM assembler. "asm help" for help.
gfx [arguments] : SBTCVM graphics toolkit. use "asm help" for help.
list [type]     : use "list help" for help on the list command.
help            : this text
version         : version info
about           : about info
quit            : quit SBTCVM command shell

math commands:
add    : add two balanced ternary integers (separated by a space)
sub    : subtract two balanced ternary integers (separated by a space)
div    : divide two balanced ternary integers (separated by a space)
mul    : multiply two balanced ternary integers (separated by a space)
btdec  : convert a balanced ternary integer to decimal
decbt  : convert a decimal integer to balanced ternary
invert : invert a balanced ternary integer
mpi    : calculate the Max Positive Integer for a given number of trits
mcv    : calculate the Max Combinations Value for a given number of trits



Interesting eh? those math commands mainly expose the underlying libbaltcalc integer mathematics API as various commands. also some more specialized functions are available. such as the MPI and MCV commands:

:mpi 9
9841

:mcv 9
19683










you might also have noticed the run, asm, and gfx commands. these call MK2-RUN.py, SBTCVM-asm2.py, and MK2-GFX.py respectively. You can use the same exact arguments that those utilities use:
asm -t thisisanexample
would assemble  thisisanexample.tasm and create an apropiate tracelog just like:
./SBTCVM-asm2.py -t thisisanexample

also there is the list command. it can help when trying to see what files of a specific type are available. for example:

:list streg
VMSYSTEM/ROMS/fib.streg
VMSYSTEM/ROMS/gtt.streg
VMSYSTEM/ROMS/flower.streg
VMSYSTEM/ROMS/dazzle.streg
VMSYSTEM/ROMS/colmap3.streg
VMSYSTEM/ROMS/intro.streg


Saturday, May 20, 2017

SBTCVM: Working with SBTCVM assembly

Working with SBTCVM assembly.

Guess That Trit - Game
OK. so SBTCVM is a balanced ternary virtual machine with an
oddball
 
assembly language. How hard is it?

(note: if you want to try the tutorial in this post, make sure you have SBTCVM installed. you can get it here. SBTCVM requires python and pygame as well.)

hello world:
textstart
Hello World
textstop

That wasn't hard was it?
Ok. so the other 99.9% of use cases are not that simple.


The assembler does have these nifty address references.
for example: the goto reference pointer (or "pointer" for short):
null|000000000|foobar
(some commands...)
(this data-based goto is pointed to that "pointer")
gotodata|>foobar
this is a basic loop. Basically whatever "(some commands...)" is, is looped. and it doesn't matter where the pointer is in the resulting ROM, as the assembler automatically calculates that for you.

there are also similar, but predefined, IObus references:
IOread1|>random
IOwrite1|>mem1
This example reads from the random integer port, and writes that random integer to scratch memory point 1 (the scratch memory ranges from mem1 to mem729)

Lets look at how the Fibonacci demo works:


Thursday, May 18, 2017

A Game in SBTCVM?

A Game in SBTCVM? What is this magic? 😮

Ok, Seriously now. Its a number guessing game called Guess That Trit.

The goal is to guess a randomly chosen trit.  Its not going to win a game of the year award... but it does work.

And it tracks score and the number of rounds played.

Wednesday, May 17, 2017

SBTCVM: now with multiple text modes



For easy comparison, lets look at the latest version of the font test program:

both modes run at 648x486 and have 72 columns


54 line mode uses SBTCVM's older 9x9 font. much more information is able to be on screen at once, but the text itself is much more dense.




The new 27 line mode uses a new 9x18 font. As a trade off of the shorter screen height the text is much easier to read.







this doesn't mean 54 line mode doesn't have its uses. Take the Fibonacci demo for example:



Programs can change the tty mode to suit their needs through the regset system.

in SBTCVM assembly, its as easy as:

TTYmode|54
or

TTYmode|27


 

Tuesday, May 16, 2017

SBTCVM now has a pause menu

Unlike before when Escape would simply stop the VM, now it opens a nice pause menu.

You can press escape again, or select "Continue VM" to continue the VM, refresh on the key controls in "Quick Help", view the about screen, or Stop the VM. The pause menu will even have "Exit to Main Menu" instead of "Stop VM" if you launched SBTCVM from the main menu.

like the main menu, more features may be added in the future.

SBTCVM, TTYs, and Fibonacci

SBTCVM Mark 2 just got an upgrade:
its TTY is now 72 columns by 54 lines, as opposed to 36 columns by 27 lines.

So i took the liberty of enhancing a few demos.



 Old Fibonacci demo:

It only calculated a positive sequence.

 New Fibonacci demo:

with the extra space, i decided to add a negative sequence too :)

Monday, May 15, 2017

Question: SBTCVM utility programs

working on SBTCVM's utility programs and menu a bit.

Question:

What kind of utilities should SBTCVM include?
(if you haven't heard of SBTCVM, check the SBTCVM page on this blog.)

What it does have:
  • An Assembler                | SBTCVM-asm2.py
  • a graphics conversion tool  | MK2-GFX.py
  • a command line launcher.    | MK2-RUN.py
  • a menu system.              | MK2-MENU.py
  • The VM itself.              | SBTCVM_MK2.py

Saturday, May 13, 2017

Fun: Controlling a FreeDos VM from a KolibriOS VM in VirtualBox


 

Overview:

Yea i know, "why?"

well. why not? ☺

The basic idea is the KolibriOS and FreeDOS VMs are connected over a virtual serial connection via a host pipe.

I type ctty COM1 into the FreeDOS VM and start the KolibriOS terminal utility. (found in the "system" section of the menu). its basically useless,
but that's the point :p


Wednesday, May 10, 2017

KolibriOS - Operating System Review

Overview:

Ahh KolibriOS, it has vesa graphics, a desktop, sound, networking, and powered by a FASM x86 assembly-coded kernel thats less than 100KB. That can run on a Pentium I with MMX and 8MB RAM.

Primarily, KolibriOS is developed in Russian,  although English, Spanish, and Italian Translations are also available. ( In my experience, on occasion you will find something that is only in Russian.)

This puny OS boots up off a Floppy disk image, or a real floppy disk if you wish, though there is a set of additional programs that are loaded from an external directory. (the live CD includes these)

The desktop is fast and responsive. And KolibriOS will boot in not much more time than it takes to load the floppy image into ram.




It has the usual selection of basic desktop tools, such as a file manager, a command shell, calculator mp3 player, the works.  it also has an impressive selection of demos. such the TinyGL gears demo in the screenshot.

as far as networking goes, WiFi leaves something to be desired, but it does support plenty of Ethernet cards. and yes the networking works in VirtualBox.  internet tools range from the usual diagnostic and configuration tools, to an IRC client and a basic web browser.


games:

KolibriOS comes with a decent selection of games, conveniently collected in a nifty game center.

From checkers to Snake to even Freecell

and lets not forget, There are various Emulators, Even DosBox. and here is a fun fact: DosBox does not run well on a 397Mhz Pentium II :p (I tried it)


And last but not least of the games, are source ports of Doom AND Quake.  Not bad.  Not bad at all.


Conclusion:

KolibriOS may not be as advanced as the big three, but it is quite impressive for what it is, and works excellently in VirtualBox and on older x86 PCs and I recommend checking it out in VirtualBox or on that old Pentium you might have sitting around.

Old Tech: IBM thinkpad 600E

Specs:

397Mhz Mobile Pentium II Processor
224MB RAM
2.5MB MagicMedia graphics.
1024x768 TFT screen at 24bit color.
6GB HDD
1.44MB Floppy Disk Drive
PCMCIA CD-ROM drive
PCMCIA Ethernet networking
(working in Linux and FreeDOS)
Sound Blaster Pro II emulation
tri-booting:

  • Linux
  • FreeDOS
  • KolibriOS

Overview: 

My old IBM Thinkpad 600E, what a machine.  Not even close to enough power to do things like youtube and such, but as far as FreeDOS and KolibriOS are concerned, its quite well, overpowered. having around 200MB XMS memory in dos is a bit excessive, yes it has a ramdisk for temp files. and as far as kolibriOS, goes, givin that that OS can run on a Pentium I with MMS, and 8MB RAM, This old laptop is naturally quite suited for it.

As far as dos GUIs go, it blazes through the likes of SEAL 2 and the far less developed OZONE, oddly, only one DOS gui i tried had trouble, ill give you a hint it starts with "W" :p

With games, it has the usual selection of Apogee shareware, and also games like Duke Nukem 3D, the DOS version of Transport Tycoon Delux, and a selection of many other games.

And like any avid DOS user there are various other programs too: such as The Links web browser (just about the only graphical DOS browser that still gets updated),  some media players, such as an Allegro+VESA port of MPLAYER, and yes, it can just barely play a 320x240 OGG Theora Voribis Video. pausing slightly when the buffer runs out.

To conclude, its not the most capable computer, but it does work, and still manages to out-preform DOSBOX.

SBTCVM Mark 2 gets a menu system.

        SBTCVM Mark 2, (SBTCVM is a project of mine to make a balanced ternary VM people can actually use) can be a complex program. Few people seem to have tried to visualize a balanced ternary computer on a binary one.   Likely, for good reason too, as developing SBTCVM feels a lot like trying to emulate a pear on a orange at times.



I find one the strangest aspects of balanced ternary is its negative state. you see, balanced ternary handles negative values in a different way then say, decimal:

+-  |  2
-+  | -2
+0  |  3
-0  | -3
+-0 |  6
-+0 | -6

Odd huhhow zero is the most central value of the base instead of it being the lowest. notice how +- is 1 less than +0? 

Anyways With the new menu system, people who are new to SBTCVM can more easily see what its like, and learn.



  It even has an extras menu. not much there now, just that clock.  Perhaps more extras and other menu features will be added as time goes on...

cheers.