Skip to content

Commit

Permalink
Get the game fully working on the real console
Browse files Browse the repository at this point in the history
- made the player model low-poly
- stripped out parts of the 'default' world to get it to load
  • Loading branch information
bl0ckeduser committed Apr 13, 2012
1 parent 4c6d7ae commit 67f48a3
Show file tree
Hide file tree
Showing 9 changed files with 1,041 additions and 71 deletions.
17 changes: 15 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# [this is a copy of the libnds all-purpose template Makefile]
# [this is based on the libnds (http://devkitpro.org) template Makefile]

#---------------------------------------------------------------------------------
.SUFFIXES:
Expand All @@ -10,6 +10,19 @@ endif

include $(DEVKITARM)/ds_rules

ifeq ($(strip $(GAME_SUBTITLE1)),)
GAME_SUBTITLE1 := mini 3d platformer engine by Bl0ckeduser
endif

ifeq ($(strip $(GAME_SUBTITLE2)),)
GAME_SUBTITLE2 := Made with devkitpro (http://devkitpro.org/)
endif

ifeq ($(strip $(GAME_ICON)),)
GAME_ICON := $(DEVKITPRO)/libnds/icon.bmp
endif


#---------------------------------------------------------------------------------
# TARGET is the name of the output
# BUILD is the directory where object files & intermediate files will be placed
Expand All @@ -36,7 +49,7 @@ CFLAGS += $(INCLUDE) -DARM9
CXXFLAGS := $(CFLAGS) -fno-rtti -fno-exceptions

ASFLAGS := -g $(ARCH)
LDFLAGS = -specs=ds_arm9.specs -g $(ARCH) -mno-fpu -Wl,-Map,$(notdir $*.map)
LDFLAGS = -specs=ds_arm9.specs -g $(ARCH) -Wl,-Map,$(notdir $*.map)

#---------------------------------------------------------------------------------
# any extra libraries we wish to link with the project
Expand Down
50 changes: 3 additions & 47 deletions README
Original file line number Diff line number Diff line change
@@ -1,15 +1,10 @@
This is a port to NDS of my 3d platformer engine, "clown3d".

The development environment used is the devKitPro toolchain
and libnds (both available at http://devkitpro.org).

Thanks Dovoto for the useful example code and mtheall for the tech
support.

-------------------------------------------------------------------

* Currently only the "maze" world successfully loads on the
real console. I'm going to try to fix the default world so
it also loads.
Big thanks to Dovoto for the useful example code
and to mtheall for the technical support.

-------------------------------------------------------------------

Expand All @@ -25,42 +20,3 @@ The game controls are:
D-pad movement

-------------------------------------------------------------------

DEVELOPMENT NOTES

* The code doesn't seem to build OK with devKitARM r38.
It does however build right with devKitARM r37.
With devKitARM >= 38 it might be necessary to tweak the
Makefile (remove "no-fpu").

The source here was forked from the November 12, 2011 snapshot of
clown3d.

The first phase of porting involved decreasing the
vertex count of all the models to make them "fit" on
the DS' limited GPU; I also made sure the engine's RAM
usage didn't exceed the DS' limit (4 MB, I think).
Finally, I had to store model files as char[]'s in source
files (could have been header files, more typical) and
implement a reader (string-read.c) because
you don't usually have a filesystem available on NDS.
(i.e. model data is stored directly as text in the game ROM.
the data-source directory contains the low-poly model files,
which are "compiled" to model-data.c via the "data2src"
script/program).

I then copy-pasted libnds 3D example code by Dovoto to
start porting to the libnds pseudo-GL API (and DS buttons,
timing, etc.)

Following that, several quirks in libnds had to be worked
around.

----

Note that the current clown3D-ds can still be built for the
PC using either Makefile.pc or mingw-build.bat; to build the
libnds version use Makefile. The PC build shows a vertex count
and (optionally, see main.c) a RAM usage estimation.


4 changes: 2 additions & 2 deletions TODO
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

+ *Test the game on real console !*
The maze world loads & runs perfectly, but the
default world gives a black screen.
default world gives a black screen [FIXED].
I suspect maxed out polygon count.

- Get the default world to load on the real console.
+ Get the default world to load on the real console.
Binary file modified clown3d-DS.nds
Binary file not shown.
Loading

0 comments on commit 67f48a3

Please sign in to comment.