martincohen / punity Goto Github PK
View Code? Open in Web Editor NEWA tiny game engine in C.
License: MIT License
A tiny game engine in C.
License: MIT License
Hey - wish Github had a DM feature so issue it is. My issue is I found this repo and it looks amazing. Any plans on continuing development?
Hope all is well
I would like to point out that an identifier like "_SOUND_CHANNELS
" does not fit to the expected naming convention of the C language standard.
Would you like to adjust your selection for unique names?
Hi! I was looking around for a hobbyist game engine for the Nintendo 3DS and someone mentioned this gem. Every time I search the web for some sort of documentation for Punity or research material on it the only things that appear are the Unity game engine and some random horror game. So, can you build ROMs or any other executable file format for DS/3DS? If not may someone help me navigate to where I would be able to find such a place?
P. S. As of now I won't be able to build the engine. I'm assuming everything here is text base[d], but I could be wrong. May someone please confirm or deny my theory? Thanks!
EDIT: Took a look at the source code, silly me no game preview or anything (not that it's a bad thing or anything). Sorry!
Deeper investigation is needed to find out why MinGW crashes. Building with DirectX turned off should work. Backtrace here:
Program received signal SIGSEGV, Segmentation fault.
0x67f2b808 in d3d11!CreateDirect3D11SurfaceFromDXGISurface () from C:\Windows\SysWOW64\d3d11.dll
(gdb) backtrace
#0 0x67f2b808 in d3d11!CreateDirect3D11SurfaceFromDXGISurface () from C:\Windows\SysWOW64\d3d11.dll
#1 0x0041ee77 in punp_win32_d3d_render (buffer=0x2680000) at punity.c:1890
#2 0x0041fd60 in WinMain@16 (instance=0x400000, prev_instance=0x0, command_line=0x866430 "",
show_code=10) at punity.c:2273
#3 0x00427c6b in main ()
Hey mate, thought i would give this a shot and try to build, but this really isn't setup for other people to use, which is a shame as a tiny little c engine is a pretty cool idea as a learning tool.
first off the readme is wrong, it seems to look for sdl in a base level folder called SDL2 rather than a folder called SDL in lib.
Then there is no samples and no explanation of the asset packing. I get this is a fun little project for you but i don't see the point in a public repository unless you are going to at least have a sample and make sure the build instructions is correct.
I hope you can fix this stuff up so others can have a play!
-Muzz
Hello, i was testing a bit your engine, and it seems that im not able to load a bitmap and draw it on the screen, i got this error message:
here is my code:
``#define PUNITY_IMPLEMENTATION
#include "punity.h"
Bitmap image;
typedef struct Game_
{
Bitmap font;
}
Game;
static Game *GAME = 0;
int
init()
{
GAME = bank_push_t(CORE->storage, Game, 1);
font_load_resource(&GAME->font, "font.png", 4, 7);
CORE->canvas.font = &GAME->font;
Bitmap* imagee = ℑ
bitmap_load_resource(imagee, "image.png", 0);
return 1;
}
void
step()
{
canvas_clear(1);
Bitmap* imagee = โ
Rect oho = rect_make(60, 100, 40, 140);
Rect* oo = &oho;
bitmap_draw(imagee, 60, 10, 0, 0, oo);
if (key_down(KEY_ESCAPE)) {
CORE->running = 0;
}
}
I tried changing Assert(comp == 4) to Assert(comp = 4), this seems to work, but it fills the rest of the screen with the main colour of the image.
i just dont know what's happening
PS: i do have image.png declared in the main.rc
When running just the default files and code from your github I noticed that every time I pressed the spacebar to use the sound2.ogg it would leave a little bit of a clicking sound in the background and every time space is pressed it increases a bit in volume. I tried a different .ogg at rates of 16000 and 48000 and there doesn't seem to be any clicking. Not too sure if this is an issue of the way sound is loaded or just the sound2.ogg file itself but thought I'd mention it in case sounds similar to the .ogg have the same issue.
MSVC 2015 supports C99, but older versions only support C90. This needs a significant change in the whole codebase. MinGW is a preferred alternative for now.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.