How to make a menu

General Programming help in C, C++ or ASM, Compiling / Debugging, and R3000A Central Processing Unit (CPU) information
Post Reply
User avatar
New Nova
Active PSXDEV User
Active PSXDEV User
Posts: 61
Joined: Oct 27, 2018
I am a: Collector, developper, artist
Motto: RTFM
PlayStation Model: DTL-H2000
Location: France
Contact:

How to make a menu

Post by New Nova » October 30th, 2018, 9:07 am

Yup !
I need some help ! I need to know how to make a menu.
Something basic, with a choice (like 1 player/2player), but I don't know how to make a cursor for highlighting the choice.
Can someone help me out ? :)
Development PC : Compaq PC, Intel Pentium III 600MHz, 256MB RAM, NVIDIA GeForce4 MX 440 (AGP)
Development Unit : DTL-H2000 board + DTL-H2010 CD-ROM drive
Retail Unit : SCPH-1002 + XplorerFX + caetla + modchip + activity LED mod

User avatar
gwald
Net Yaroze Enthusiast
Net Yaroze Enthusiast
Posts: 282
Joined: Sep 18, 2013
I am a: programmer/DBA
PlayStation Model: Net Yaroze
Contact:

Post by gwald » October 30th, 2018, 9:57 pm

New Nova wrote: October 30th, 2018, 9:07 am Yup !
I need some help ! I need to know how to make a menu.
Something basic, with a choice (like 1 player/2player), but I don't know how to make a cursor for highlighting the choice.
Can someone help me out ? :)
Sounds easy to do, a good exercise for a beginner.
Get text rendering on screen first, then get controllers working, then put boxes around it (I used GsSortBoxFill), and put it all together!
Also, best to use your own font, this is the one I used:
Image


And you'll get something like my craptasctic menu at 0:20: :lol:
[BBvideo=560,315] https://www.youtube.com/watch?v=E5XPaKG ... tu.be&t=21 [/BBvideo]

User avatar
New Nova
Active PSXDEV User
Active PSXDEV User
Posts: 61
Joined: Oct 27, 2018
I am a: Collector, developper, artist
Motto: RTFM
PlayStation Model: DTL-H2000
Location: France
Contact:

Post by New Nova » October 31st, 2018, 1:09 am

Thanks ! :)
you're helpful !
Development PC : Compaq PC, Intel Pentium III 600MHz, 256MB RAM, NVIDIA GeForce4 MX 440 (AGP)
Development Unit : DTL-H2000 board + DTL-H2010 CD-ROM drive
Retail Unit : SCPH-1002 + XplorerFX + caetla + modchip + activity LED mod

User avatar
gwald
Net Yaroze Enthusiast
Net Yaroze Enthusiast
Posts: 282
Joined: Sep 18, 2013
I am a: programmer/DBA
PlayStation Model: Net Yaroze
Contact:

Post by gwald » October 31st, 2018, 7:59 am

no problem, there's easier ways to do a menu actually.
Just generate the list in an image and displaying it would be easier then using a font (but font's are need in games! :) )
Then just move something (another image or a coloured RECT etc) on screen.
But the basics are rendering and moving something, but it depends on your context.
If you youtube some games you'll see many ideas for menus, some good, some really poor.

User avatar
New Nova
Active PSXDEV User
Active PSXDEV User
Posts: 61
Joined: Oct 27, 2018
I am a: Collector, developper, artist
Motto: RTFM
PlayStation Model: DTL-H2000
Location: France
Contact:

Post by New Nova » October 31st, 2018, 8:50 am

Thanks.
I think it would be helpful for others.
I'm learning slowly, because I don't understand everything about the system. It's the first time that I make a game with pictures, sprites etc..
Also, what did you think about the code of my "pong" ? :)
Development PC : Compaq PC, Intel Pentium III 600MHz, 256MB RAM, NVIDIA GeForce4 MX 440 (AGP)
Development Unit : DTL-H2000 board + DTL-H2010 CD-ROM drive
Retail Unit : SCPH-1002 + XplorerFX + caetla + modchip + activity LED mod

User avatar
gwald
Net Yaroze Enthusiast
Net Yaroze Enthusiast
Posts: 282
Joined: Sep 18, 2013
I am a: programmer/DBA
PlayStation Model: Net Yaroze
Contact:

Post by gwald » November 1st, 2018, 8:20 am

Looks good, simple yet functional.
I would look at moving the functions from the headers though, maybe into a constants.c (building it with -c, getting the .o (or .obj), then linking it to the exe), leaving the declaration prototypes.
or keep it as is and define them as inline?
ie: https://stackoverflow.com/questions/942 ... -or-static

maybe do a screen cap video if you can?

User avatar
New Nova
Active PSXDEV User
Active PSXDEV User
Posts: 61
Joined: Oct 27, 2018
I am a: Collector, developper, artist
Motto: RTFM
PlayStation Model: DTL-H2000
Location: France
Contact:

Post by New Nova » November 1st, 2018, 9:10 am

I don't understand. What is an .o ? XD
I'm a little noob at C programming XD
Development PC : Compaq PC, Intel Pentium III 600MHz, 256MB RAM, NVIDIA GeForce4 MX 440 (AGP)
Development Unit : DTL-H2000 board + DTL-H2010 CD-ROM drive
Retail Unit : SCPH-1002 + XplorerFX + caetla + modchip + activity LED mod

User avatar
gwald
Net Yaroze Enthusiast
Net Yaroze Enthusiast
Posts: 282
Joined: Sep 18, 2013
I am a: programmer/DBA
PlayStation Model: Net Yaroze
Contact:

Post by gwald » November 1st, 2018, 2:47 pm

-c on gcc (unix/linux/etc compiler) give you not an exacutable but a binary 'object' windows uses .obj instead of .o (unix/linux).
Look at makefiles, you'll see -c producing .o (.obj) files then the last command links main, libraries and the obj's to create a executable.

You should read up on the toolchain, ie pre compiler compiler, linker, library, make etc.
It's all pretty standard, on many hardware platforms and OS'es and its applicable to C++.
It's something that has a learning curve, but it's worth knowing very well!

I'm not sure on the pro PSX compiler, but i'm sure it's based on gnu gcc toolchain.

Post Reply

Who is online

Users browsing this forum: No registered users and 8 guests