Programming
 Pixel Joint Forum : The Lounge : PJ Game Design Corner (Private) : Programming
Message Icon Topic: PJ The Game : C++ Section(Topic Closed Topic Closed) Post Reply Post New Topic
<< Prev Page  of 2
Author Message
initial_reality
Midshipman
Midshipman
Avatar

Joined: 03 March 2005
Location: Brazil
Online Status: Offline
Posts: 53
bullet Posted: 12 March 2006 at 6:02pm
Originally posted by Boder

Ork, maybe you could explain a little bit more about the code and content pipeline.
Like how the .gfx files are made, what MPF is, what the other dependencies are.

I feel the same way. Were is the tile map stored rigth now?

About my editor: I can place objects in the map but I have to write the code to save'em to the map file.

Ork, can send-me your msn?
IP IP Logged
Ork
Midshipman
Midshipman
Avatar

Joined: 21 April 2014
Location: Finland
Online Status: Offline
Posts: 46
bullet Posted: 12 March 2006 at 11:44pm

I have started a technical document here. If it doesn't answer your questions now, it will later;)
http://koti.mbnet.fi/satte/pj/doc/PJGame_Tech.txt
This will be maintained in the debug package from now on.

> Boder: Also, what file format are we thinking of for storing level data and user
> preferences? Text, binary, XML, or SQL?

I prefer binary. it's fast and simple. Formats must be discussed though...

> Boder: One thing I would definitely suggest is to put the tiles on one image
> that is size power-of-two and use bounding rectangles

I'll change it for you

> Initial_Reality: Where is the tile map stored rigth now?

Look at GameWorld.cpp .. contains some ugly hardcoded hacks Note that everything starting with TEST-keyword will be removed/changed...

I'll setup MSN. don't have account yet...

IP IP Logged
Boder
Commander
Commander
Avatar

Joined: 07 February 2015
Online Status: Offline
Posts: 112
bullet Posted: 13 March 2006 at 1:14am
I'm going to vote for text files. There are some very good reasons for this.

Binary files are very opaque so you have to document them like initial_reality did in this thread. Text files can be somewhat self-explanatory and digestable by humans

Binary files are not as flexible. I have a feeling throughout the game we are going to want to make many little changes. With a well designed text file you can simply drop in a new section and still be backwords-compatible. Binary files are less forgiving between versions.

Easier to debug.

With binary files, you have to be concerned with endianness. Best to play it safe.

Binary files load faster, but I don't think you'll notice the difference. Remember, "90% of the time is spent in 10% of the code"
IP IP Logged
imaxcs
Midshipman
Midshipman


Joined: 22 July 2005
Online Status: Offline
Posts: 44
bullet Posted: 13 March 2006 at 8:53am
XML-files all the way. In combination with TinyXML, it's really simple to use and yet very powerful. :)
Don't let the dark side take control of you...use smileys!
---
http://everlands.imaxcs.com/
IP IP Logged
miau
Commander
Commander
Avatar

Joined: 11 December 2005
Online Status: Offline
Posts: 122
bullet Posted: 13 March 2006 at 11:51am
I always used binary files in my projects as well.. I was too lazy to code a decent parser/invent a decent syntax scheme for a text file format.
Well, why reinvent the wheel if TinyXML takes care of most of that? Although I'm not too acquainted with XML itself, but I guess it would be a good choice... Implementing an XML based format in Flash should be no problem so level data could be shared easily, right?

Well, I messed around with bg layers and sprites on GBA recently.. merely for self-education, not going to continue it and nothing special. Just to see how PJ would look on the GBA.
PJtest.gba
Works well with VBA and any other emulators... probably :S

Edited by miau
...
IP IP Logged
kwigbo
Commander
Commander
Avatar

Joined: 18 February 2021
Online Status: Offline
Posts: 346
bullet Posted: 13 March 2006 at 1:20pm
The flash game will be using XML. Something to think about if ya wanna try to use the same level structure. Instead of making the levels twice once for each game.

IP IP Logged
Boder
Commander
Commander
Avatar

Joined: 07 February 2015
Online Status: Offline
Posts: 112
bullet Posted: 13 March 2006 at 3:14pm
I think it is something we want to think about! 

We would only need one level editor. Has someone started on a level editor in flash?
IP IP Logged
Ork
Midshipman
Midshipman
Avatar

Joined: 21 April 2014
Location: Finland
Online Status: Offline
Posts: 46
bullet Posted: 13 March 2006 at 11:05pm

XML is fine and TinyXML does the job.

Kwigbo, do you already have any plans or specs on the level structure? Could you write an example of a small level so we can investigate further?

IP IP Logged
kwigbo
Commander
Commander
Avatar

Joined: 18 February 2021
Online Status: Offline
Posts: 346
bullet Posted: 14 March 2006 at 7:14am
I will post something tommorrow on the xml structure. Today is my day away from the computer. For the most part.

IP IP Logged
randomblink
Commander
Commander
Avatar

Joined: 13 February 2014
Online Status: Offline
Posts: 403
bullet Posted: 14 March 2006 at 9:24am
I am currently working on an XML structure that works.
However, I am building it with my knowledge of Flash behind me...
So I will need some feedback from the C/C++ team so we can make it all work together.

If you would like to see the structure as it is coming together?
http://www.kwigbo.com/ninjasquirrels/FlashFiles/PlatformEngi ne/xml_structure.xml

I am going to create an explanation sheet to go with it. If you have any questions, please direct them to your team leader...

C/C++ Team Leader: Ork
Flash Team Leader: kwigbo

I believe that does it for this post...
Peace out one and all...
www.randomblink.com
I am me... no! Really!
IP IP Logged
Shark
Commander
Commander
Avatar
a.k.a. Feron

Joined: 02 July 2005
Online Status: Offline
Posts: 2136
bullet Posted: 14 March 2006 at 9:38am
random: perhaps put many of the decisions from this topic eg the
XML choice, in with your stickied topic that isnt for discussion.
Snark, we love yuu.
IP IP Logged
randomblink
Commander
Commander
Avatar

Joined: 13 February 2014
Online Status: Offline
Posts: 403
bullet Posted: 14 March 2006 at 12:36pm
great idea as well... thx
www.randomblink.com
I am me... no! Really!
IP IP Logged
Ork
Midshipman
Midshipman
Avatar

Joined: 21 April 2014
Location: Finland
Online Status: Offline
Posts: 46
bullet Posted: 14 March 2006 at 10:57pm
Randomb: Nice. So this xml describes all the levels and the actual tilemap data is in separate file? (..makes sense..)
IP IP Logged
randomblink
Commander
Commander
Avatar

Joined: 13 February 2014
Online Status: Offline
Posts: 403
bullet Posted: 15 March 2006 at 6:30am
I will be putting together a description file to go with this once I get it perfected.
The idea behind it is basically that by creating this XML file, AND having the related files necessary, the game should be able to create each map, level, character, etc...

SO...
I am working as fast as I can.
Creating / Editing the actual classes in Flash as I go.
Peace
www.randomblink.com
I am me... no! Really!
IP IP Logged
initial_reality
Midshipman
Midshipman
Avatar

Joined: 03 March 2005
Location: Brazil
Online Status: Offline
Posts: 53
bullet Posted: 30 March 2006 at 5:59am
hey guys

I think I won't be able to work in my editor for a couple of months . I just moved and I don't have a computer to work. A tool to place obects in the map is almost finished. If someone wants to work on it, I can send the source files. It's a Builder 3 project wich can be ported to Builder 6. Otherwise, feel free to use another editor.

Good luck!
IP IP Logged
ElvenProgrammer
Seaman
Seaman
Avatar

Joined: 02 May 2021
Location: Italy
Online Status: Offline
Posts: 26
bullet Posted: 20 April 2006 at 5:33am
I was trying to compile it with mingw but...
Where are GetSystem and APP_ASSERT declared? Thanks
IP IP Logged
Boder
Commander
Commander
Avatar

Joined: 07 February 2015
Online Status: Offline
Posts: 112
bullet Posted: 21 April 2006 at 1:44am
I've been working on a tile editor that can be used in the game for a while. It uses OpenGL and GLFW, so it should be 100% portable, and it currently uses text files which helps with the portability.

Features:
* smooth scrolling controls
* 2-levels of tilemap (foreground and background)
* load map from text file
* Zoom from 4x to 0.25x
* Message Feedback
* Unlimited Undo/Redo
* Eraser
* Right-click tile select
* Tile Select Mode
* Area Fill

Soon:
* save to text file
* level boundary marker
* increase map dimensions
* background layer
* load image command

Future:
* collision map layer
* static object placement
* parallax layers front and rear
* game entity placement and attribute adjustment
IP IP Logged
Boder
Commander
Commander
Avatar

Joined: 07 February 2015
Online Status: Offline
Posts: 112
bullet Posted: 28 April 2006 at 11:59pm
Here is a link to the editor, try to make a nice background if you dare! The background has to be power-of-two 2,4,8,16,32,64,128,256

Download Link


Forgot some controls:
W,A,D,S - movement
NUMPAD+ - zoom in
NUMPAD- - zoom out


Edited by Boder
IP IP Logged
Boder
Commander
Commander
Avatar

Joined: 07 February 2015
Online Status: Offline
Posts: 112
bullet Posted: 02 May 2006 at 10:54pm
Did anyone try it? 
IP IP Logged
Souly
Commander
Commander
Avatar

Joined: 13 December 2020
Online Status: Offline
Posts: 2451
bullet Posted: 03 May 2006 at 8:59am

Oh, I noticed if you hold shift you can make a large filled square.
It's looking good, I'm thinking that you'll be making the tile selection in the next update?

 

OK so I decided to read the readme... and I noticed that by holding spacebar you can select the tiles...

 



Edited by Souly

I am the jesus of PJ.
IP IP Logged
ElvenProgrammer
Seaman
Seaman
Avatar

Joined: 02 May 2021
Location: Italy
Online Status: Offline
Posts: 26
bullet Posted: 29 May 2006 at 1:06am
Has the development of this game stopped? If not is there any way I can contribute? I could share some time and help with the programming part.

Regards


Edited by ElvenProgrammer
IP IP Logged
Demon
Commander
Commander
Avatar

Joined: 16 March 2005
Online Status: Offline
Posts: 562
bullet Posted: 29 May 2006 at 1:45am
Ya, but if we switched over to Java, we could both have run at developing it. 
"At least we killed some boredom..." - Death Note.
IP IP Logged
<< Prev Page  of 2
Post Reply Post New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum