Reproramming Cave Story

Dec 20, 2012 at 12:37 PM
Not anymore
"Run, rabbit run. Dig that hole, forget the sun."
Join Date: Jan 28, 2010
Location: Internet
Posts: 1369
Age: 34
It's not that hard to make PNGs display using C++.
 
Dec 21, 2012 at 7:28 AM
Hoxtilicious
"Life begins and ends with Nu."
Join Date: Dec 30, 2005
Location: Germany
Posts: 3218
Age: 32
Yup, SOIL supports pngs, so loading pngs is no problem.


This is the next version:
http://tile44.org/files/NetStory-0.1.0.1.zip

First I wanted to have a tree like hirachy because it's easier to use imo when you code (like in .NET).
However, GIR told me that structs in structs might slow down the programme because of multiple references. Thanks for your help GIR.

Everyone who is interested in this project, should take a look at the file and the coding style used, give me critic and tell me if it looks like a good starting point. And I also need to know about your knowledge, skills and interests, especially when it comes to certain libraries.


@Carrotlord Nah, I was talking about using structs instead of classes. ;)
Structs are a nice way to make your code well arranged without needing to stick fully to a oo paradigm.

Anyway, if this thing needs to run in a browser, I would surely stick to Java but there is no need for it. Also I know no AAA Titles who are coded in Java, most are coded in C or C++. However, this shouldn't be a reason why I wouldn't like to use Java. I never heared about a graphic library which supports hardware acceleration in Java.

Anyway, compiling for other systems should be no problem, I know some programmers who use Linux and they could compile the code. Also if it's open source, there will surely be one who compiles it for other systems.

If you are still interested then take a look at the code and give me some feedback.
 
Dec 21, 2012 at 7:32 AM
In my body, in my head
Forum Moderator
"Life begins and ends with Nu."
Join Date: Aug 28, 2009
Location: The Purple Zone
Posts: 5998
S. P. Gardebiter said:
Anyway, if this thing needs to run in a browser, I would surely stick to Java but there is no need for it. Also I know no AAA Titles who are coded in Java, most are coded in C or C++. However, this shouldn't be a reason why I wouldn't like to use Java. I never heared about a graphic library which supports hardware acceleration in Java.
runescape, #1 computer game of all time
 
Dec 21, 2012 at 8:01 AM
Not anymore
"Run, rabbit run. Dig that hole, forget the sun."
Join Date: Jan 28, 2010
Location: Internet
Posts: 1369
Age: 34
Java does support that.
And also I don't care about AAA either.

Yeah and I know you're not planning to use classes for tons (tonnes?) of things. Just have certain functions operate on structs. Same idea.
 
Dec 21, 2012 at 8:31 AM
Hoxtilicious
"Life begins and ends with Nu."
Join Date: Dec 30, 2005
Location: Germany
Posts: 3218
Age: 32
The AAA thing doesn't matter at all, I was talking about hardware acceleration.
I still need more information if you want to help me.
 
Dec 21, 2012 at 8:37 AM
Not anymore
"Run, rabbit run. Dig that hole, forget the sun."
Join Date: Jan 28, 2010
Location: Internet
Posts: 1369
Age: 34
We are working in C++, no?

Does Java H-Accel matter?

EDIT: Also why Lua? Lua uses only double-precision floats for numbers or at least it seems like it. That's not very efficient on older machines. It's almost as bad as writing part of your engine in Java and somehow combining it with the C++.
 
Dec 21, 2012 at 10:32 AM
Hoxtilicious
"Life begins and ends with Nu."
Join Date: Dec 30, 2005
Location: Germany
Posts: 3218
Age: 32
Yup, C++, allthough I don't care if the coding style is a little bit different, as long as it's readable, understandable and efficient code. However, formatting should be the same.

Java hardware acceleration would matter, if we would use Java. Imo, it's not a good idea though because C++ has a better performance, supports multiple platforms, there is a bigger variety of libraries, you aren't forced to use oo, you can use structs, etc..

We need a scripting language, also you should keep in mind that a library needs an appropiate size and needs to be fast (boost for example, would be an overkill), also it should be a multiplatform library (Win32, Win64, Linux and Mac). I don't care about the license too much, allthough I prefer something different from the regular GPL, I believe in free people and not in free software, hence I usually license under PD, if I do a project like this.

Anyway, recommend a different library if you know a better one, I'm all ears.
At the moment the programm only uses standard libraries and graphic libraries, those are SOIL, GLEW and GLFW.
 
Dec 21, 2012 at 11:37 AM
Been here way too long...
Discord Group Admin
Org Discord Moderator
"Life begins and ends with Nu."
Join Date: Oct 18, 2011
Location:
Posts: 2337
Why not make the script a modified form of TSC? With <VAR you can do anything, if what Carrot says about TSC being Turing-complete is true. I wouldn't think that it'd be too difficult to implement a TSC parser; everyone knows how it works.
 
Dec 21, 2012 at 12:20 PM
Hoxtilicious
"Life begins and ends with Nu."
Join Date: Dec 30, 2005
Location: Germany
Posts: 3218
Age: 32
A modified TSC is surely needed but I'm talking about NPC AI, Weapons and other stuff, I don't think TSC is suited for that. A easy Basic esque scripting language is more powerful and easier to use.
Also we need to remember that the scripting language is for modders and not for programmers, so different data types just makes it more complicated.
 
Dec 21, 2012 at 5:51 PM
Not anymore
"Run, rabbit run. Dig that hole, forget the sun."
Join Date: Jan 28, 2010
Location: Internet
Posts: 1369
Age: 34
I know a programming language that uses mainly 4-byte integers instead of 8-byte doubles for counting whole numbers, zero, and negative whole numbers.
Regular double precision floats are also supported by this language.

It's a pretty good scripting language.
Should be fast on C++.
Supports multiple inheritance, closures, function factories, functions that create objects, and everything Python and JavaScript have to offer.
Plus, if you really want precision, BigInt (big integer) and PreciseReal (arbitrary number of digits floating point number)
functionality is built-in.

Syntax is Ruby-ish, and should be readable.
Libraries have a lot of content, including graphics display, scraping websites, downloading files,
and even connecting to IRC without using any objects! (functional IRC bot)
 
Dec 21, 2012 at 6:05 PM
Hoxtilicious
"Life begins and ends with Nu."
Join Date: Dec 30, 2005
Location: Germany
Posts: 3218
Age: 32
You forget the name of the language you're talking about... :p

Do you know how to implement it?
 
Dec 21, 2012 at 6:07 PM
Not anymore
"Run, rabbit run. Dig that hole, forget the sun."
Join Date: Jan 28, 2010
Location: Internet
Posts: 1369
Age: 34
Yes, source code is available online.
 
Dec 21, 2012 at 6:34 PM
Hoxtilicious
"Life begins and ends with Nu."
Join Date: Dec 30, 2005
Location: Germany
Posts: 3218
Age: 32
Still you haven't even told me, what language you are talking about.
 
Dec 21, 2012 at 10:33 PM
Been here way too long...
Discord Group Admin
Org Discord Moderator
"Life begins and ends with Nu."
Join Date: Oct 18, 2011
Location:
Posts: 2337
I don't know why you put "might" there, considering that's a perfect description of Mint. Although, I'm not entirely sure about the fast part. Carrot likely knows best though.
 
Dec 22, 2012 at 12:26 AM
Not anymore
"Run, rabbit run. Dig that hole, forget the sun."
Join Date: Jan 28, 2010
Location: Internet
Posts: 1369
Age: 34

Will this compile? I'm too lazy to check.
Code:
#ifndef FOR_EACH_H
    #define FOR_EACH_H
    #define foreach(alpha,beta,sequenceLength){ for(int SYS_I=0;SYS_I<sequenceLength;SYS_I++){void *alpha=beta[SYS_I];
#endif
If you do this, you can apply the following.
Code:
#include <iostream>
#include "ForEach.h"

using namespace std;

void doCompletelyUselessThings() {
    int[] derp = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10};
    foreach(element,derp,10){
        cout << element;
    }
}

int main(int argc, char *argv[]) {
    doCompletelyUselessThings();
}


EDIT:

The scripting language I am talking about is not regular PythonMint or JavaMint, but C++Mint.



Code:
/**
=== LICENSE FOR THIS PROJECT, C++MINT ===
Copyright (C) Jiangcheng Oliver Chu of
CodeHive, www.oliverchu.com, and Carrot Lord Studios - All Rights Reserved

Unauthorized copying of this file, and any of the
files in the C++Mint repository on Github or any
other website, via any medium is strictly prohibited.
Proprietary and confidential.
Contact Oliver Chu by sending an email to: j@oliverchu.com
Written 21 December 2012, 4:10 PM Pacific Standard Time.

Unlike JMint, which operates under a more permissive
and open license, C++Mint is a fully proprietary project.

You may view the source code.
You may not edit the source code, or distribute it or
give out any modified versions of it in any way.

You may not compile the source code, and you cannot
download executables that are the compiled versions of
the C++Mint source code.

You cannot use C++Mint as a client (regular user).

In other words, do not write Mint code that is supposed
to run on C++Mint. You are ABSOLUTELY NOT allowed to download and/or use any
Mint language interpreters written in C, C++, or any variants
thereof. Java is not considered a C/C++ variant. Neither is Python.

All ideas and concepts, or innovative implementations used in C++Mint
cannot be used in other programs or other pieces of source code
without the explicit written permission of Jiangcheng Oliver Chu,
unless United States Federal and State Laws in combination
with International Laws do not permit such a restriction on the
users.

Written Permission means a letter or note sent to you by
traditional non-electronic mail, with all writing on that letter or
note being written using a black pen in cursive.
If this is not so, the note is probably forged or fake in some way.

Note that fake notes can still be on pieces of paper and written
with black pen in cursive. Do not assume a note is real
if it follows the guidelines.

Remember to use the email address given above to contact the creator
of C++Mint and to ask questions about this license or the program
itself. */



I will post a link to the source code shortly.

SPG, I give you explicit permission to modify and use the C++Mint source code for whatever projects you want, even if it's not this one.

This permission has ONLY been given to SPG, not any other person on this forum.



I, as the creator of Mint, am now overriding the license. SPG does not need a note from me sent using snail-mail (regular mail, as in physical envelopes, papers, and letters) to use C++Mint and modify the source code.
 
Dec 23, 2012 at 12:11 AM
Hoxtilicious
"Life begins and ends with Nu."
Join Date: Dec 30, 2005
Location: Germany
Posts: 3218
Age: 32
Thanks Carrot. :)

This is the newest version of the project, including the documents: http://tile44.org/files/NetStory-0.1.1.0.zip
Any resolution will work now, even if it is 16:9. It creates some nice borders:

diph.php


Bugs but no criticial errors will occur if the resolution is smaller than the viewport. Also I changed some structs because I've thought of some future features.

Anyway because someone else might need to understand this software, this project isn't too small and because it's easier to split tasks if done correctly, I've done some planning work: http://tile44.org/files/NetStory.html

Feedback, critic? Don't be shy.
 
Dec 23, 2012 at 2:05 AM
Veteran Member
"Wacka-Wacka-Wacka-Wacka-Wacka-Wacka-Wacka-Wacka-BLEIUP"
Join Date: Aug 21, 2012
Location: At a computer
Posts: 333
p161687-0-openglfail.png


Yeah...
 
Dec 23, 2012 at 2:30 AM
Hoxtilicious
"Life begins and ends with Nu."
Join Date: Dec 30, 2005
Location: Germany
Posts: 3218
Age: 32
Can you post details about your graphics card?
 
Dec 23, 2012 at 2:44 AM
Veteran Member
"Wacka-Wacka-Wacka-Wacka-Wacka-Wacka-Wacka-Wacka-BLEIUP"
Join Date: Aug 21, 2012
Location: At a computer
Posts: 333
It's an Intel graphics media accelerator 3150.
 
Top