Skip to content

GabrielConner/PumpkinRoll

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Pumpkin Pie

Introduction

Pumpkin Pie is a basic framework for running a 3D single-scene project. It can be switched into development which turns it into a console app for creating the scene, and managing basic settings.

To switch into development mode use the -d command line argument

While in the development mode the scene can be saved to a *.pmpknrl file for reloading into development. The scene can be built into a *.pmpknrl.cpp file for compiling directly into the project, for creating the release version.

After creating the build file a function with the signature int SceneBuild() should be called right before Pumpkin_Update() is called. This should be commented out and the *.pmpknrl development file should be used if anything needs to be updated then rebuilt.

While in debug mode the built file will contain new lines to help format, these are removed while in release.

The default controls for the development camera and the PumpkinRoll__CameraFreeMovement script are

Control Description
WASD Basic forward/left type stff
E Move up
Q Move down
Right-click Activate movement (Hold in dev, toggle in script) Can be changed for the script

System requirements

Pumpkin Pie is available Windows 7 and above [needs testing]. Can be ported to other systems as the main Windows requirement is the CRT memory checking and getting the location of the executable.

Compiling

To setup the source the prod zipped files in release can be used for all the visual studio and ppm files. There is a bunch of settings that would make creating from new slow, and unless bored I won't be making a (C)MAKE file(s).

Compiled on Visual C++ (2026) but should be available for earlier. Clang can also be used but does have some problems with the ScriptAllocateFunction macro. Other compilers are untested.

Highly recommened to not self build but use prebuilt binaries found in release

GLFW, GLAD, and GLM are required to compile

Creating a project

The basic structure of a project should follow

#include "pumpkin/pumpkinRoll.h"

using namespace ::pPack;
using namespace ::pumpkin;

int SceneBuild();
int main(int argc, char** argv) {
  if (!Load(argc, argv)) return 1;

  StartReturn ret = Pumpkin_Init(StartSettings(), argc, argv, nullptr);
  if (ret == StartReturn::FAILURE) {
    End();
    return 1;
  }

  if (ret != StartReturn::ERROR) {
    Pumpkin_RegisterCamera("primary camera"); 

    SceneBuild();
    Pumpkin_Update();
  }

  Pumpkin_End();
  End();
}

Load and End are for the pumpkin pie library dll, holds some common things that all the dll's use.

A camera should always be created as they cannot be created within the development console, though they can be set as the primary camera.

All available functions, past Load/End, are found in pumpkinFunctions.h and some virtual overridable functions in pumpkin/types.h

pumpkin/pumpkinRoll.h contains macros for registering scripts, a quick script allocate function, and error printing.

Project structure

Based on the prebuilt binaries; There are a total of 6 dlls. 4 for debug and release compiled with/without development enabled and 2 for debug and release library.

The pumpkinRoll*.dll files do not have related *.lib files as they are automatically loaded from within pumpkinRoll.cpp based on build mode and command line arguments.

The pumpkinLibGen*.dll files do have related *.lib and should be linked into their respective build types.

GLFW and GLAD are required (for the moment) within the project to work as well. Just for the macros and typedefs so I'll try and get them out.

All external projects used

Self made projects used to help build

  • PPM
  • Utility (no specific utility/utilities used)

About

No description, website, or topics provided.

Resources

License

Stars

0 stars

Watchers

0 watching

Forks

Packages

 
 
 

Contributors