C/C++ C++ on LPCExpresso-1769 to make 3D pong console

  • Thread starter Thread starter mr.Jelle-Beat
  • Start date Start date
  • Tags Tags
    3d C++
AI Thread Summary
A group of students from Avans University of Applied Sciences is developing a 3D Pong console as part of their project, utilizing infrared communication for remote control. They are employing a microcontroller for game logic and an FPGA for rendering. After deliberation, they chose C++ for programming the microcontroller, citing its object-oriented programming capabilities as beneficial for their project. They believe the 128KB memory available will suffice despite C++ typically producing larger programs. The discussion highlights the advantages of C++ in handling game logic and 3D calculations, as well as the availability of libraries that simplify these tasks. Concerns about whether C might be a better choice were raised, but the consensus leans towards C++ due to its functionality. Participants encouraged the students to ensure their compiler supports C++ for their specific microcontroller and expressed interest in the project's progress.
mr.Jelle-Beat
Messages
1
Reaction score
1
Hello, PhisicsForumsWe are a group of students from the Avans University of Applied Sciences. We're currently doing a project where we have to design and make a 3D pong console.

The idea of the project is to make a "Dedicated Video Game Console" that can be remotely controlled by remotes using infrared communication.

For the game logic we're using a microcontroller and for the rendering of the frames we're using a FPGA.During the "design-phase" of our project we have made a lot of decisions,

One of them being: The programming language running on our microcontroller.In the end after a bit of discussion we’ve decided to use C++.The reason we've decided to choose C++ as the language for our project is because we think that some of C++'s functionalities can be quite helpful considering we have to program a version of the game 3D Pong. This mostly has to do with the ability to do Object Oriented Programming. We don't necessarily think that, even though C++ is known to produce much larger programs than regular C, we'll run into any program memory problems since we have 128KB of it.(Although we have no practical experience to confirm this).So, considering our project, is choosing C++ to use on a LPCxpresso1769 a reasonable choice? Would the obvious alternative(C) maybe a better choice? What are the risks and downsides of using C++ and it's additional functionalities compared to using other languages?
 
  • Like
Likes Greg Bernhardt
Technology news on Phys.org
You should check if your compiler supports C++ for the microcontroller you'll be using. Interesting project.
 
@NRoos The NXP eclipse version does support C++ for the LPCExpresso1769.
To answer you questions. Do you need C++ for the game logic?
In my opinion it is handy because of the OO.
Besides it being object oriented it is also handy to use C++ if you want the MCU to calculate the vectors and "3D" view.
You can find a lot of libraries that do this for you.
And yes this can be done in C but you will have to write your own library(or find one what i didn't manage to do).
This does require a bit more of math knowledge.

It definitely is a interesting project. Please keep us updated
Good luck
 
Dear Peeps I have posted a few questions about programing on this sectio of the PF forum. I want to ask you veterans how you folks learn program in assembly and about computer architecture for the x86 family. In addition to finish learning C, I am also reading the book From bits to Gates to C and Beyond. In the book, it uses the mini LC3 assembly language. I also have books on assembly programming and computer architecture. The few famous ones i have are Computer Organization and...
I had a Microsoft Technical interview this past Friday, the question I was asked was this : How do you find the middle value for a dataset that is too big to fit in RAM? I was not able to figure this out during the interview, but I have been look in this all weekend and I read something online that said it can be done at O(N) using something called the counting sort histogram algorithm ( I did not learn that in my advanced data structures and algorithms class). I have watched some youtube...
Back
Top