TheBoxyBear
TheBoxyBear
CC#
Created by Jason_Bjorn on 6/27/2024 in #help
LINQ help
It's always possible to look into the underlying code of .NET to confirm for yourself, in this case by looking at the body of Reverse
26 replies
CC#
Created by Jason_Bjorn on 6/27/2024 in #help
LINQ help
My guess would be to put Reverse first. Linq also has a lot of shortcuts for common collection types and I wouldn't be surprised if Reverse didn't simply enumerate with a decreasing index for arrays.
26 replies
CC#
Created by epel on 6/13/2024 in #help
Console Adventure Game Structure
Interactives can have base class methods for each of the verbs the game supports, with the base implementations outputting the generic "I can't do that"
14 replies
CC#
Created by epel on 6/13/2024 in #help
Console Adventure Game Structure
The areas can define Interactibles which can include items, observations and characters.
14 replies
CC#
Created by epel on 6/13/2024 in #help
Console Adventure Game Structure
With that, general structures like the layout of dialogue options, entering and exiting out of conversations can still be generalized through the base class.
14 replies
CC#
Created by epel on 6/13/2024 in #help
Console Adventure Game Structure
That's for a very generalized and fully data driven approach however which may be too complex for your needs. For a more code-based yet still generalized approach, you would have a base Character class with virtual/abstract methods like OnTalk, OnGiveItem and you derive the class for each character
14 replies
CC#
Created by epel on 6/13/2024 in #help
Console Adventure Game Structure
If you have proper dialogue, you would have a Character class that gets instantiated for areas with characters. The Character methods get called when interacting with them, with the instance defining things like dialogue trees.
14 replies
CC#
Created by epel on 6/13/2024 in #help
Console Adventure Game Structure
In practice, this also means exposing data externally, in an editor or by modifying files that are read at runtime.
14 replies
CC#
Created by epel on 6/13/2024 in #help
Console Adventure Game Structure
In a larger project, especially gamedev, you want to expose things for designers to mess with, ideally having to write zero code.
14 replies
CC#
Created by epel on 6/13/2024 in #help
Console Adventure Game Structure
That's one part of a greater benefit. By being data-driven, you can make changes in runtime without changin the code.
14 replies
CC#
Created by luness on 6/13/2024 in #help
Npuzzle
Otherwise, FillTiles seems a bit odd creating the instance ahead of time. It could be created within the loop, even storing it in a variable declared in the loop. With the current approach, an extra instance is created and discarded every time.
3 replies
CC#
Created by luness on 6/13/2024 in #help
Npuzzle
What do you mean by it not working? What happens and what is expected?
3 replies
CC#
Created by epel on 6/13/2024 in #help
Console Adventure Game Structure
For specific cases, you can always created derived types with custom logic or try to generalize it so you can apply it to various areas.
14 replies
CC#
Created by epel on 6/13/2024 in #help
Console Adventure Game Structure
There's really no best way of doing this but since this is a C# community, object-oriented is what is the language is best at. You would want things be mostly data-driven, with classes defining base concepts, such as an Area class that is intantiated for each area.
14 replies
CC#
Created by 𝐊𝐫ø𝐑ø𝐗 on 6/10/2024 in #help
✅ From App C# Error
One way or the other
30 replies
CC#
Created by 𝐊𝐫ø𝐑ø𝐗 on 6/10/2024 in #help
✅ From App C# Error
No description
30 replies
CC#
Created by tama on 6/9/2024 in #help
Project requirements?
Builds also include a deps.json file listing dependencies
4 replies
CC#
Created by tama on 6/9/2024 in #help
Project requirements?
Dependencies are handled automatically, either through NuGet packages or external project references. When cloning and building the project from source, project references are automatically linked as long as they are present in the repo, while NuGet packages are restored. When publishing a build, dependencies are included in the form of dlls
4 replies
CC#
Created by itsmevinh on 5/27/2024 in #help
Im new to C# and im kinda stuck here. Please help
Comparisons should use the == operator. In this current state, the single equal is trying to assign a value to myNumner % 2 which isn't something that can be assigned (not a variable)
6 replies