Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Divided - My LD22 Entry  (Read 3986 times)

0 Members and 1 Guest are viewing this topic.

fatum

  • Newbie
  • *
  • Posts: 47
    • MSN Messenger - bowsers7@hotmail.com
    • AOL Instant Messenger - therealblah569
    • View Profile
    • http://boards.psynetfm.com
Divided - My LD22 Entry
« on: December 22, 2011, 06:05:35 am »
Divided is a short puzzle platformer that was created in 3 days for the Ludum Dare 22 game jam.  

Download
Windows
Windows - Minimal
Linux
Source

Controls
Right and Left: Move
Up: Enter Doors
Space: Jump
Enter: Select
R: Reset Level

The game also supports gamepads!

If anyone does take the time to look at the source, I'm sure there are several poor practices, but I'd appreciate any pointers and critiques on what I could have done better.

Some of the game logic was also "hacked together," or implemented quickly without thinking about re-usability so that we could reach the deadline.

If the game crashes for you, try the "Minimal" version.

Here are some screenshots:


Richy19

  • Full Member
  • ***
  • Posts: 190
    • View Profile
Divided - My LD22 Entry
« Reply #1 on: December 22, 2011, 06:57:30 am »
trying to build it as runnning it doesnt work.
I get this on the final build:

Code: [Select]
richy@R-Laptop:~/Desktop/Divided$ g++ -o Divided main.cpp obj/bin/tinystr.o obj/bin/tinyxml.o obj/bin/tinyxmlerror.o obj/bin/tinyxmlparser.o obj/bin/util/AnimateSprite.o obj/bin/util/helper.o obj/bin/sfx_jump_ogg.o Door.cpp Player.cpp PlayerW.cpp SplashScreenWorld.cpp SettingsPanel.cpp MainMenuWorld.cpp LevelWorld.cpp EndingWorld.cpp CreditsWorld.cpp TextOverlay.cpp Spike.cpp Lever.cpp Block.cpp MovingBlock.cpp FallingBlock.cpp -lsfml-window -lsfml-graphics -lsfml-audio -lsfml-system
/usr/bin/ld: Warning: size of symbol `TiXmlString::TiXmlString()' changed from 14 in obj/bin/tinystr.o to 21 in obj/bin/tinyxmlparser.o
/usr/bin/ld: Warning: size of symbol `TiXmlString::TiXmlString(char const*)' changed from 91 in obj/bin/tinyxml.o to 110 in obj/bin/tinyxmlparser.o
/usr/bin/ld: Warning: size of symbol `TiXmlString::~TiXmlString()' changed from 19 in obj/bin/tinystr.o to 26 in obj/bin/tinyxmlparser.o
/usr/bin/ld: Warning: size of symbol `TiXmlCursor::TiXmlCursor()' changed from 19 in obj/bin/tinyxml.o to 26 in obj/bin/tinyxmlparser.o
/usr/bin/ld: Warning: size of symbol `TiXmlBase::TiXmlBase()' changed from 41 in obj/bin/tinyxml.o to 53 in obj/bin/tinyxmlparser.o
/usr/bin/ld: Warning: size of symbol `TiXmlBase::~TiXmlBase()' changed from 40 in obj/bin/tinyxml.o to 46 in obj/bin/tinyxmlparser.o
/usr/bin/ld: Warning: size of symbol `TiXmlBase::~TiXmlBase()' changed from 40 in obj/bin/tinyxml.o to 46 in obj/bin/tinyxmlparser.o
/usr/bin/ld: Warning: size of symbol `TiXmlBase::~TiXmlBase()' changed from 30 in obj/bin/tinyxml.o to 46 in obj/bin/tinyxmlparser.o
/usr/bin/ld: Warning: size of symbol `TiXmlAttribute::TiXmlAttribute()' changed from 88 in obj/bin/tinyxml.o to 109 in obj/bin/tinyxmlparser.o
/usr/bin/ld: Warning: size of symbol `TiXmlComment::TiXmlComment()' changed from 36 in obj/bin/tinyxml.o to 42 in obj/bin/tinyxmlparser.o
/usr/bin/ld: Warning: size of symbol `TiXmlText::TiXmlText(char const*)' changed from 89 in obj/bin/tinyxml.o to 114 in obj/bin/tinyxmlparser.o
/usr/bin/ld: Warning: size of symbol `TiXmlDeclaration::TiXmlDeclaration()' changed from 78 in obj/bin/tinyxml.o to 90 in obj/bin/tinyxmlparser.o
/usr/bin/ld: Warning: size of symbol `TiXmlUnknown::TiXmlUnknown()' changed from 36 in obj/bin/tinyxml.o to 42 in obj/bin/tinyxmlparser.o
/usr/bin/ld: Warning: size of symbol `TiXmlAttribute::~TiXmlAttribute()' changed from 79 in obj/bin/tinyxml.o to 90 in obj/bin/tinyxmlparser.o
/usr/bin/ld: Warning: size of symbol `TiXmlAttribute::~TiXmlAttribute()' changed from 30 in obj/bin/tinyxml.o to 90 in obj/bin/tinyxmlparser.o
/usr/bin/ld: i386:x86-64 architecture of input file `obj/bin/tinyxmlparser.o' is incompatible with i386 output
obj/bin/tinyxmlparser.o: In function `TiXmlBase::ReadName(char const*, TiXmlString*, TiXmlEncoding)':
tinyxmlparser.cpp:(.text+0x72b): undefined reference to `TiXmlString::assign(char const*, unsigned long)'
obj/bin/tinyxmlparser.o: In function `TiXmlBase::ReadText(char const*, TiXmlString*, bool, char const*, bool, TiXmlEncoding)':
tinyxmlparser.cpp:(.text+0xd1b): undefined reference to `TiXmlString::append(char const*, unsigned long)'
tinyxmlparser.cpp:(.text+0xe4d): undefined reference to `TiXmlString::append(char const*, unsigned long)'
obj/bin/tinyxmlparser.o: In function `TiXmlNode::Identify(char const*, TiXmlEncoding)':
tinyxmlparser.cpp:(.text+0x1410): undefined reference to `operator new(unsigned long)'
tinyxmlparser.cpp:(.text+0x1473): undefined reference to `operator new(unsigned long)'
tinyxmlparser.cpp:(.text+0x14d6): undefined reference to `operator new(unsigned long)'
tinyxmlparser.cpp:(.text+0x1554): undefined reference to `operator new(unsigned long)'
tinyxmlparser.cpp:(.text+0x15d3): undefined reference to `operator new(unsigned long)'
obj/bin/tinyxmlparser.o:tinyxmlparser.cpp:(.text+0x1617): more undefined references to `operator new(unsigned long)' follow
obj/bin/tinyxmlparser.o: In function `TiXmlComment::Parse(char const*, TiXmlParsingData*, TiXmlEncoding)':
tinyxmlparser.cpp:(.text+0x20f1): undefined reference to `TiXmlString::append(char const*, unsigned long)'
obj/bin/tinyxmlparser.o: In function `TiXmlString::init(unsigned long, unsigned long)':
tinyxmlparser.cpp:(.text._ZN11TiXmlString4initEmm[TiXmlString::init(unsigned long, unsigned long)]+0x43): undefined reference to `operator new[](unsigned long)'
collect2: ld returned 1 exit status


Any chance we could get a makefile for linux, or even better codeblocks project :D

mentaman10

  • Newbie
  • *
  • Posts: 16
    • View Profile
Divided - My LD22 Entry
« Reply #2 on: December 22, 2011, 08:22:13 am »
Did you do fps-lock?
the game is about 50-70 precent CPU!!


Cool game.

fatum

  • Newbie
  • *
  • Posts: 47
    • MSN Messenger - bowsers7@hotmail.com
    • AOL Instant Messenger - therealblah569
    • View Profile
    • http://boards.psynetfm.com
Divided - My LD22 Entry
« Reply #3 on: December 22, 2011, 08:48:11 am »
Quote from: "Richy19"
trying to build it as runnning it doesnt work.
I get this on the final build:

Any chance we could get a makefile for linux, or even better codeblocks project :D


Whoops, I forgot to mention that the Linux binary is 64bit (I assume that's the issue, or maybe I forgot to package a shared object!)

This Makfile should work.
Code: [Select]

CXX := g++

Divided: TinyXML AnimateSprite.o helper.o Assets
$(CXX) -o Divided main.cpp tinystr.o tinyxml.o tinyxmlerror.o tinyxmlparser.o AnimateSprite.o helper.o sfx_jump_ogg.o Door.cpp Player.cpp PlayerW.cpp SplashScreenWorld.cpp SettingsPanel.cpp MainMenuWorld.cpp LevelWorld.cpp EndingWorld.cpp CreditsWorld.cpp TextOverlay.cpp Spike.cpp Lever.cpp Block.cpp MovingBlock.cpp FallingBlock.cpp -lsfml-window -lsfml-graphics -lsfml-audio -lsfml-system

TinyXML: obj/xml/tinystr.cpp obj/xml/tinyxml.cpp obj/xml/tinyxmlerror.cpp obj/xml/tinyxmlparser.cpp
$(CXX) -o tinystr.o -c obj/xml/tinystr.cpp
$(CXX) -o tinyxml.o -c obj/xml/tinyxml.cpp
$(CXX) -o tinyxmlerror.o -c obj/xml/tinyxmlerror.cpp
$(CXX) -o tinyxmlparser.o -c obj/xml/tinyxmlparser.cpp

AnimateSprite.o: AnimateSprite.cpp
$(CXX) -o AnimateSprite.o -c AnimateSprite.cpp

helper.o: helper.cpp
$(CXX) -o helper.o -c helper.cpp

Assets: obj/sfx_jump_ogg.cpp
$(CXX) -o sfx_jump_ogg.o -c obj/sfx_jump_ogg.cpp


Quote from: "mentaman10"
Did you do fps-lock?
the game is about 50-70 precent CPU!!


Cool game.


Thanks!

I didn't implement an FPS lock, I'm not entirely sure of a reasonable famerate to cap to.  I assume 60 is good, but I'm not entirely sure.

What do you guys like to limit your framerate to?

mentaman10

  • Newbie
  • *
  • Posts: 16
    • View Profile
Divided - My LD22 Entry
« Reply #4 on: December 22, 2011, 08:55:31 am »
60 is recmonded, yeh.

look at this:
http://gaming.stackexchange.com/questions/25465/why-do-video-game-framerates-need-to-be-so-much-higher-than-tv-and-cinema-framer/25517#25517


And whith out any FPS lock it will do like now (take 50% CPU).
You must FPS lock

Tank

  • SFML Team
  • Hero Member
  • *****
  • Posts: 1486
    • View Profile
    • Blog
    • Email
Divided - My LD22 Entry
« Reply #5 on: December 22, 2011, 03:52:49 pm »
Vertical sync?