Vircon32: Creating my own console

A place to house devlogs of member’s projects.
Post Reply
User avatar
carra
Posts: 163
Joined: Thu May 13, 2021 10:39 am

Re: Vircon32: Creating my own console

Post by carra »

Since the console does not allow direct access to video memory, I will be making some tutorials showing how to achieve certain graphic effects. I have upoaded the first one, which is your typical moving water reflection. This GIF is a bit too small to see the effect well enough, but if I made it bigger it could get too large.

Image

The code is uploaded at GitHub. I included an explanation of how each effect is made. Each of them (distortion and lighting) can be deactivated using gamepad buttons.
User avatar
carra
Posts: 163
Joined: Thu May 13, 2021 10:39 am

Re: Vircon32: Creating my own console

Post by carra »

I have uploaded tutorial projects for a couple more graphical effects. The first is motion blur. In this GIF you can roughly see how 2 types of blur are used: first only the ship, and then the full-screen blur is activated. This could be used for slow motion effects.

Image

The other is showing how to achieve a silhouette effect out of any image we want to draw. The resulting effect is similar to some edge detection filters in programs like Photoshop.

Image

Same as before you can find the code for both of these at GitHub.
User avatar
carra
Posts: 163
Joined: Thu May 13, 2021 10:39 am

Re: Vircon32: Creating my own console

Post by carra »

For now this will be the last graphic tutorial. Rather than an effect, what I demonstrate here is a way to draw 3D polygons in a console that can only draw 2D. Due to Vircon's limitations this technique only allows drawing flat, shaded polygons without texturing.

This example is not particularly optimized (I preferred writing more readable code), but still the console will not have a good performance in this kind of graphics (CPU use here reaches 90%).

Image

Here you have a link to the code in GitHub.
User avatar
carra
Posts: 163
Joined: Thu May 13, 2021 10:39 am

Re: Vircon32: Creating my own console

Post by carra »

New C compiler version

I have uploaded a new version to the website, along with its source code.
Ther compiler guide is also updated, both the English and Spanish version.

There are some important new features:
  • Enumerations can now be used
    Very useful, since there are no constants implemented. It is also an easier way to define game textures and sounds, which always have consecutive IDs, instead of making 20 #defines.
  • I added switch, case and default
    Before this, the selection of scenes or state machines was done by chaining if-else, because there was nothing else. Now it will look better.
  • Also included now are labels and goto
    In theory they should not be used, but since C supports them, I added them just in case. There might be situations where it simplifies program flow.
  • Structures and arrays can now be initialized with lists
    We can now declare typical arrays: int[ 3 ] Array = { 1, 2, 3 }; It also comes in handy for structures or compound data like vectors. This will save many lines of code.
There are also a couple of other new features, but these are the most important.
User avatar
Sirocco
Site Admin
Posts: 806
Joined: Fri Feb 12, 2021 10:25 pm
Location: Outer Demoscenia
Contact:

Re: Vircon32: Creating my own console

Post by Sirocco »

carra wrote: Tue Feb 15, 2022 8:57 am For now this will be the last graphic tutorial. Rather than an effect, what I demonstrate here is a way to draw 3D polygons in a console that can only draw 2D. Due to Vircon's limitations this technique only allows drawing flat, shaded polygons without texturing.

This example is not particularly optimized (I preferred writing more readable code), but still the console will not have a good performance in this kind of graphics (CPU use here reaches 90%).

Image

Here you have a link to the code in GitHub.
That's still really impressive work. :D
User avatar
carra
Posts: 163
Joined: Thu May 13, 2021 10:39 am

Re: Vircon32: Creating my own console

Post by carra »

The first Jam for Vircon32 will be held in a few days, in case someone is interested

https://itch.io/jam/first-vircon32-jam
BadMrBox
Posts: 36
Joined: Tue Feb 16, 2021 3:45 pm

Re: Vircon32: Creating my own console

Post by BadMrBox »

At some point I'm going to look into how to make something with this thing
User avatar
carra
Posts: 163
Joined: Thu May 13, 2021 10:39 am

Re: Vircon32: Creating my own console

Post by carra »

BadMrBox wrote: Mon Mar 07, 2022 10:28 pm At some point I'm going to look into how to make something with this thing
Good to hear :) If you need help at any point feel free to ask.

To prepare things for the jam I have built a basic editor to visually define the regions within game textures. This will automatically generate the C code needed by the console to use these images, so it will save some time. Here you have a quick video showing how it works:

User avatar
carra
Posts: 163
Joined: Thu May 13, 2021 10:39 am

Re: Vircon32: Creating my own console

Post by carra »

Just a small update, in case some of you are interested the Vircon32 Jam is already ongoing and has reached 10 participants :)

Also some people have made donations and we now have a first and second prize.
User avatar
Sirocco
Site Admin
Posts: 806
Joined: Fri Feb 12, 2021 10:25 pm
Location: Outer Demoscenia
Contact:

Re: Vircon32: Creating my own console

Post by Sirocco »

Congrats on the turnout! That's fantastic news :D
Post Reply