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

  • Context: C/C++ 
  • Thread starter Thread starter mr.Jelle-Beat
  • Start date Start date
  • Tags Tags
    3d C++
Click For Summary

Discussion Overview

The discussion centers around the choice of programming language for a project involving the design and implementation of a 3D pong console using a microcontroller and FPGA. Participants explore the suitability of C++ compared to C, particularly in the context of game logic and object-oriented programming functionalities.

Discussion Character

  • Exploratory
  • Technical explanation
  • Debate/contested

Main Points Raised

  • Some participants propose that C++ is a reasonable choice for the project due to its object-oriented programming capabilities, which may be beneficial for developing the game logic.
  • Others suggest checking compiler support for C++ on the LPCExpresso1769 microcontroller, indicating that compatibility is a crucial factor.
  • One participant mentions that while C++ can simplify certain tasks, it may also lead to larger program sizes compared to C, raising concerns about memory usage.
  • Another viewpoint emphasizes that while C can accomplish similar tasks, it may require more effort to implement necessary libraries for 3D calculations, which are more readily available in C++.
  • There is a recognition that using C++ may necessitate a stronger background in mathematics for certain functionalities, particularly in vector calculations and 3D rendering.

Areas of Agreement / Disagreement

Participants express a mix of support for using C++ while also acknowledging potential drawbacks. There is no consensus on whether C++ is definitively the better choice, as some highlight the advantages of C in terms of simplicity and memory efficiency.

Contextual Notes

Participants note the importance of compiler support and the potential impact of program size on memory usage, but these aspects remain unresolved in terms of their implications for the project.

Who May Find This Useful

Students and developers interested in embedded systems programming, game development, and those exploring the use of C++ in microcontroller applications may find this discussion relevant.

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   Reactions: 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
 

Similar threads

  • · Replies 3 ·
Replies
3
Views
2K
Replies
1
Views
931
  • · Replies 86 ·
3
Replies
86
Views
13K
  • · Replies 397 ·
14
Replies
397
Views
21K
  • · Replies 5 ·
Replies
5
Views
2K
Replies
1
Views
2K
  • · Replies 9 ·
Replies
9
Views
12K
Replies
6
Views
3K
  • · Replies 11 ·
Replies
11
Views
2K
  • · Replies 9 ·
Replies
9
Views
4K