Ultibo game programming

Anything and everything about programming graphics with Ultibo
Gavinmc42
Posts: 1460
Joined: Sun Jun 05, 2016 12:38 pm
Location: Brisbane, Australia

Ultibo game programming

Postby Gavinmc42 » Mon Jun 05, 2017 7:04 am

Saw this and thought, hmm games
https://www.adafruit.com/product/3464

Tronixlabs have some in stock in OZ ;)
https://tronixlabs.com.au/raspberry-pi/ ... australia/

Portable TFT version?
Loose a bunch of pins due to DPI LCD taken most of the GPIO, but DPI is simpler/smaller than HDMI interface.
https://tronixlabs.com.au/cables/fpc/ad ... australia/
https://tronixlabs.com.au/display/lcd/t ... australia/

Joy bonnet interesting, use same GPIO for Arcade games, 6502, Z80 emulation games.
USB Gadget mode, plug 2nd Joy bonnet into first for two player games or 4 bonnets into a Pi3 for 4 player games :roll:
Add gyro etc to Zero W and you have a Wii numchuck....

Last week got 4.3" rear view tv input monitor LCD working for a portable project output, it's now in Russia somewhere.
Last minute change, It autoscaled, not good coding, just lucky coding, whew.
Gavinmc42
Posts: 1460
Joined: Sun Jun 05, 2016 12:38 pm
Location: Brisbane, Australia

Re: Ultibo game programming

Postby Gavinmc42 » Mon Jun 05, 2017 8:18 am

Zero will need HDMI audio.
https://www.raspberrypi.org/forums/viewtopic.php?t=5062
https://www.phoronix.com/scan.php?page= ... io-Patches

If I remember right the audio is embedded in the video data?
Interesting, I did not know 1.4 had Ethernet, hmm on pins so not going to be on the Pi's
https://en.wikipedia.org/wiki/HDMI

Don't think HDMI audio is working in Ultibo yet?
Gavinmc42
Posts: 1460
Joined: Sun Jun 05, 2016 12:38 pm
Location: Brisbane, Australia

Re: Ultibo game programming

Postby Gavinmc42 » Mon Jun 05, 2017 8:48 am

Simple side scrolling mountains in Java
http://nick-aschenbach.github.io/blog/2 ... l-terrain/

Been about 35 years since I have done this thing called fractal maths in graphics :lol:
Back then only had 2K screen ram, 32K ram total, strange how I can remember that.
It was a real pain to make sure it fitted in 2KB. Hmm, that code will be on an Audio tape in a box some where.
Gavinmc42
Posts: 1460
Joined: Sun Jun 05, 2016 12:38 pm
Location: Brisbane, Australia

Re: Ultibo game programming

Postby Gavinmc42 » Mon Jun 05, 2017 9:00 am

Might start with 2D map editing
http://www-cs-students.stanford.edu/~am ... eneration/
This would be handy when the VC4 3D stuff gets working.
Hmm, all this math, vector stuff is in hardware, how to access and use?

Could just make a game but making a game engine is fun too.
Make tools to make games?
Got lots of math to relearn and newly learn.
Need to get something working quick before I chicken out.
pik33
Posts: 829
Joined: Fri Sep 30, 2016 6:30 pm
Location: Poland
Contact:

Re: Ultibo game programming

Postby pik33 » Mon Jun 05, 2017 9:48 am

Zero will need HDMI audio.


Or simply make 2 RC filters + opamp and attach this to gpio. The noise shaper I did for RPi3 is too power hungry for Zero, but then it can be simplified to be less CPU consuming (with of course worse, but still good sound quality)
Gavinmc42
Posts: 1460
Joined: Sun Jun 05, 2016 12:38 pm
Location: Brisbane, Australia

Re: Ultibo game programming

Postby Gavinmc42 » Tue Jun 06, 2017 2:50 am

Not too worried about sound at the moment.

A search for Fractals lead me to this
http://wiki.freepascal.org/TAChart_Tuto ... s,_Zooming
Of interest is the TColorMapSeries, good for 2D representation of 3D maps.
Does it need fcl? try on normal Laz/FPC first? Dependencies?

So do we build a game engine into the game or make it a Win/Lin/Pi Laz/FPC based or separate Ultibo app?
With Ultibo QEMU on the cloud, multiplayer games?

Or to grab some interest just port a simple game to Ultibo?
A lot of them require SDL2 or OpenGL for the 3D ones.
Gavinmc42
Posts: 1460
Joined: Sun Jun 05, 2016 12:38 pm
Location: Brisbane, Australia

Re: Ultibo game programming

Postby Gavinmc42 » Tue Jun 06, 2017 8:04 am

Archived Game Developer Mag for those who have lots of time
http://www.gdcvault.com/gdmag
Er download them all and read to find out which ones use Pascal?

Anyone know links to Pascal Game coding that is current and simple?
A lot of the Game engine stuff is old. Er which might be fine on a Pi.
http://www.casteng.com/casteng/whypascal.shtml

This demo is cool, works in Windows and is tiny.
https://www.saschawillems.de/?page_id=83
Gavinmc42
Posts: 1460
Joined: Sun Jun 05, 2016 12:38 pm
Location: Brisbane, Australia

Re: Ultibo game programming

Postby Gavinmc42 » Thu Jun 08, 2017 7:09 am

I have been playing with the MouseCursor and MouseDrawing examples to understand how the VC4 cursor tile stuff works.

I can get stuff working on the Pi's but is there a way to emulated the maximum 64x64x4 mouse cursor in QEMU?
That would get us a way to test code in QEMU.

If I want to animate this mouse sprite then all I have to do is change the Address pointer?

Code: Select all

   CursorSetInfo(64,64,0,0,Pointer(Address),Size);     


I like the way you fill the Cursor array, could be used for a SVG method instead of bitmap.
Generate the image by code and not bitmapped artwork.
A tiny version of OpenSCAD with raytracing to make 64x64xARGB images. Will Povray do 64x64?
Gavinmc42
Posts: 1460
Joined: Sun Jun 05, 2016 12:38 pm
Location: Brisbane, Australia

Re: Ultibo game programming

Postby Gavinmc42 » Thu Jun 08, 2017 8:39 am

Will Povray do 64x64? No
But it will do 160x120 and with a bit of scaling the torpedo examples becomes a tiny steam punk blimp.
Gavinmc42
Posts: 1460
Joined: Sun Jun 05, 2016 12:38 pm
Location: Brisbane, Australia

Re: Ultibo game programming

Postby Gavinmc42 » Thu Jun 08, 2017 8:43 am

This image can be trimmed/scaled to fit 64x64.
Poyray can also do landscapes.
More software to learn.
Attachments
torpedo.png
torpedo.png (5.22 KiB) Viewed 1500 times

Return to “Graphics”

Who is online

Users browsing this forum: No registered users and 1 guest